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

Support Ingress from Networking API version #1529

Merged
merged 13 commits into from
Oct 26, 2021

Conversation

leoluz
Copy link
Contributor

@leoluz leoluz commented Sep 21, 2021

Overview

This is related to #1507

Checklist:

  • 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, (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.

@codecov
Copy link

codecov bot commented Sep 24, 2021

Codecov Report

Merging #1529 (e811c36) into master (a398ff9) will increase coverage by 0.17%.
The diff coverage is 90.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1529      +/-   ##
==========================================
+ Coverage   81.58%   81.76%   +0.17%     
==========================================
  Files         112      113       +1     
  Lines       15169    15563     +394     
==========================================
+ Hits        12376    12725     +349     
- Misses       2136     2176      +40     
- Partials      657      662       +5     
Impacted Files Coverage Δ
rollout/trafficrouting/nginx/nginx.go 80.19% <75.94%> (-5.62%) ⬇️
utils/ingress/wrapper.go 89.25% <89.25%> (ø)
rollout/trafficrouting/alb/alb.go 84.00% <92.85%> (-0.87%) ⬇️
ingress/alb.go 96.25% <100.00%> (+0.47%) ⬆️
ingress/ingress.go 60.60% <100.00%> (+0.40%) ⬆️
.../apis/rollouts/validation/validation_references.go 84.58% <100.00%> (ø)
rollout/controller.go 74.66% <100.00%> (ø)
rollout/trafficrouting.go 68.61% <100.00%> (ø)
utils/ingress/ingress.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a398ff9...e811c36. Read the comment docs.

Signed-off-by: Leonardo Luz Almeida <[email protected]>
@alexmt alexmt requested review from jessesuen and alexmt October 4, 2021 17:48
leoluz added 2 commits October 4, 2021 14:37
Signed-off-by: Leonardo Luz Almeida <[email protected]>
Signed-off-by: Leonardo Luz Almeida <[email protected]>
Comment on lines 283 to 290

func GetIngressAPIVersion() string {
return ingressAPIVersion
}

func SetIngressAPIVersion(apiVersion string) {
ingressAPIVersion = apiVersion
}
Copy link
Member

Choose a reason for hiding this comment

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

I have a proposal to make this easier for users to improve the UX. Instead of making users explicitly specify this, could we instead have a function called:

func DetermineIngressAPIVersion() 

DetermineIngressAPIVersion() would be called in main.go and the way it would work is that it would first attempt a list on networking.io, but if that errors with resource not found, it would fall back to extensions.

I think we want to stem off all of the support/questions that we get where we have to tell people to use the flag. We can still have the flag, in case people want to explicitly use a specific version for some reason, but I think the default behavior should be to automatically pick for the user.

Copy link
Contributor Author

@leoluz leoluz Oct 22, 2021

Choose a reason for hiding this comment

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

Good idea. I'm thinking that just instead of doing a list attempt, implementing it by checking the server version with discovery.ServerVersionInterface. Everything above 1.19 will automatically use the NetworkIngress mode. How that sounds?

Signed-off-by: Leonardo Luz Almeida <[email protected]>
@leoluz
Copy link
Contributor Author

leoluz commented Oct 22, 2021

@jessesuen just pushed a new commit implementing the improvements. Pls take a look.

@harikrongali harikrongali added the ready-for-review Ready for final review label Oct 22, 2021
rollout/controller_test.go Outdated Show resolved Hide resolved
rollout/controller_test.go Outdated Show resolved Hide resolved
@leoluz leoluz requested a review from jessesuen October 25, 2021 14:23
Copy link
Member

@jessesuen jessesuen left a comment

Choose a reason for hiding this comment

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

LGTM. There's one conflict that happened after merging in another PR but otherwise loogs good to go.

@leoluz leoluz requested a review from jessesuen October 26, 2021 01:54
Signed-off-by: Leonardo Luz Almeida <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2021

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 31 Code Smells

No Coverage information No Coverage information
4.4% 4.4% Duplication

@jessesuen jessesuen merged commit ac155f1 into argoproj:master Oct 26, 2021
kiranmeduri added a commit to kiranmeduri/argo-rollouts that referenced this pull request Oct 27, 2021
jessesuen pushed a commit that referenced this pull request Oct 28, 2021
agrawroh pushed a commit to agrawroh/argo-rollouts that referenced this pull request Oct 28, 2021
agrawroh pushed a commit to agrawroh/argo-rollouts that referenced this pull request Oct 28, 2021
@leoluz leoluz added this to the v1.2 milestone Jan 27, 2022
danielm-codefresh pushed a commit to codefresh-io/argo-rollouts that referenced this pull request Jan 31, 2022
noam-codefresh pushed a commit to codefresh-io/argo-rollouts that referenced this pull request Feb 9, 2022
noam-codefresh pushed a commit to codefresh-io/argo-rollouts that referenced this pull request Feb 9, 2022
danielm-codefresh pushed a commit to codefresh-io/argo-rollouts that referenced this pull request Mar 2, 2022
danielm-codefresh pushed a commit to codefresh-io/argo-rollouts that referenced this pull request Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review Ready for final review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants