Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: istio destionationrule subsets enforcement #3126

Merged
merged 6 commits into from
Nov 1, 2023

Conversation

dnguy078
Copy link
Contributor

@dnguy078 dnguy078 commented Oct 25, 2023

Checklist:
Relates to issue in #3125

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

@dnguy078 dnguy078 changed the title istio destionationrule subsets enforcement fix: istio destionationrule subsets enforcement Oct 25, 2023
@dnguy078 dnguy078 force-pushed the destinationrule-enforcement branch from c354708 to 23706d6 Compare October 25, 2023 18:14
@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

Go Published Test Results

2 085 tests   2 085 ✔️  2m 49s ⏱️
   118 suites         0 💤
       1 files           0

Results for commit 8402330.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 25, 2023

E2E Tests Published Test Results

    4 files      4 suites   4h 0m 12s ⏱️
103 tests   82 ✔️   6 💤 15
454 runs  388 ✔️ 24 💤 42

For more details on these failures, see this check.

Results for commit 8402330.

♻️ This comment has been updated with latest results.

Signed-off-by: Dennis Nguyen <[email protected]>
@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (423be7b) 81.85% compared to head (9af7c90) 81.86%.

❗ Current head 9af7c90 differs from pull request most recent head 8402330. Consider uploading reports for the commit 8402330 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3126      +/-   ##
==========================================
+ Coverage   81.85%   81.86%   +0.01%     
==========================================
  Files         134      134              
  Lines       20556    20568      +12     
==========================================
+ Hits        16826    16839      +13     
+ Misses       2866     2865       -1     
  Partials      864      864              
Files Coverage Δ
rollout/trafficrouting/istio/istio.go 76.11% <75.00%> (+0.32%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@agrawroh agrawroh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me overall. @zachaller Could you please take a look as well?

@dnguy078 Could you please also add some tests for the failure cases?

return nil, false, err
}

if host != "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to have an empty host? We should check if Istio allows it.

Copy link
Contributor Author

@dnguy078 dnguy078 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the host is required for Istio DestinationRule. We can do this check on the DestinationRule if included in .spec.strategy.canary.trafficRouting.istio.destinationRule

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah that check already exist :)

if r.rollout.Spec.Strategy.Canary.TrafficRouting.Istio.DestinationRule != nil {

@dnguy078
Copy link
Contributor Author

dnguy078 commented Nov 1, 2023

Thank you for the review @agrawroh !

Signed-off-by: Dennis Nguyen <[email protected]>
Copy link

sonarcloud bot commented Nov 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@zachaller zachaller enabled auto-merge (squash) November 1, 2023 13:28
@zachaller zachaller merged commit 04e1119 into argoproj:master Nov 1, 2023
22 checks passed
zachaller pushed a commit that referenced this pull request Nov 1, 2023
* istio destionationrule subsets enforcement

Signed-off-by: Dennis Nguyen <[email protected]>

* add users

Signed-off-by: Dennis Nguyen <[email protected]>

* add test case for failure cases

Signed-off-by: Dennis Nguyen <[email protected]>

---------

Signed-off-by: Dennis Nguyen <[email protected]>
@zachaller zachaller added the cherry-pick-completed Used once we have cherry picked the PR to all requested releases label Nov 1, 2023
@zachaller
Copy link
Collaborator

@agrawroh thanks for the review, I also picked this back to v1.6.1 which I am releasing now

@dnguy078 dnguy078 deleted the destinationrule-enforcement branch November 1, 2023 16:11
@zachaller
Copy link
Collaborator

@dnguy078 This might have caused this: https://cloud-native.slack.com/archives/C01U781DW2E/p1698875164861259 you mind taking a peak?

@zachaller
Copy link
Collaborator

Here is the issue: #3141

@dnguy078
Copy link
Contributor Author

dnguy078 commented Nov 2, 2023

I'll take a look @zachaller

zachaller added a commit that referenced this pull request Nov 2, 2023
zachaller added a commit to zachaller/argo-rollouts that referenced this pull request Nov 2, 2023
leoluz pushed a commit that referenced this pull request Nov 2, 2023
…#3147)

Revert "fix: istio destionationrule subsets enforcement (#3126)"

This reverts commit 04e1119.

Signed-off-by: zachaller <[email protected]>
zachaller added a commit that referenced this pull request Nov 2, 2023
…#3147)

Revert "fix: istio destionationrule subsets enforcement (#3126)"

This reverts commit 04e1119.

Signed-off-by: zachaller <[email protected]>
dnguy078 added a commit to dnguy078/argo-rollouts that referenced this pull request Nov 28, 2023
dnguy078 added a commit to dnguy078/argo-rollouts that referenced this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/release-1.6 cherry-pick-completed Used once we have cherry picked the PR to all requested releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants