-
Notifications
You must be signed in to change notification settings - Fork 263
CORS-4180: Allow AWS and Azure as platforms that support dual-stack on Day-0 #2804
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
base: master
Are you sure you want to change the base?
Conversation
|
@sadasu: This pull request references CORS-4180 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@sadasu: This pull request references CORS-4180 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/retest-required |
|
This looks good to me. AWS tests are failing to find a lease... i think we're hitting ci infra problems. |
|
/retest-required |
4696a48 to
621b294
Compare
|
@sadasu: This pull request references CORS-4180 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.21.0" version, but no target version was set. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
621b294 to
9fbf4db
Compare
|
/jira-refresh |
|
/retest-required |
|
/cc |
|
/retest-required |
1 similar comment
|
/retest-required |
|
/retest |
|
/lgtm |
pkg/network/render.go
Outdated
| return nil, progressing, err | ||
| } | ||
|
|
||
| updateDualStackPlatforms(featureGates) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the function to earlier in the func Render so that any rendering, if any later on, can always pick up the most up-to-date list of supported dualstack platform?
| var conversionToDualStackPlatforms = sets.NewString( | ||
| string(configv1.BareMetalPlatformType), | ||
| string(configv1.NonePlatformType), | ||
| string(configv1.VSpherePlatformType), | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Previously, only OpenStack is rejected. Just wondering if we confirmed this is OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code comments seem to indicate so, but I have 0 clue 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the "allow" list so it contains the list of platforms that allow conversion to DualStack on Day-2. The code earlier was looking at OpenStack platform as the reject list. It could be implemented either ways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sounds good! I was just unsure if there are any other platforms that allow dualstack, which is not yet accounted for here...
9fbf4db to
43ceb4d
Compare
|
Maybe another rebase? |
Bringing in the feature gates added for AWS and Azure DualStack support.
This is required to bring in the lastest featuregates
1. Added AWS and Azure as platforms that support DualStack on Day-0 2. Created another set of platforms that support DualStack on Day-2 3. Updated Render logic to take enabled featuregates into consideration to determine supported DualStack platforms 4. Updated tests to reflect the newly supported platforms and when they support DualStack.
43ceb4d to
d95a14b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
@sadasu: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| // Update the list of supported DualStack platforms based on enabled feature gates. | ||
| updateDualStackPlatforms(featureGates) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sadasu this is added in the Render function is, I believe, is called when rendering manifests for bootstrap.
This means when the cluster-network-operator is running in the cluster, such function is not called, right? And the list is not modified at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm cancel
Pending question above 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have the function isSupportedDualStackPlatform keeps the list of supported platforms (i.e. both static and feature-gated items), instead of having a global variable and modifying them at runtime.
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, nvmind... It is also called during reconcilation 😓 so its fine. Please ignore it :D
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: jhixson74, sadasu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sadasu!
There are a few changes we need to make and I think we should be good.
| // of platforms that support DualStack on Day-0. Currently the 2 platforms added here | ||
| // donot support conversion to DualStack on Day-2. When that happens, we will need to | ||
| // update `conversionToDualStackPlatforms` too. | ||
| func updateDualStackPlatforms(featureGates featuregates.FeatureGate) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the fact that we are modifying the global variable through this function. My proposal is to set the supported platforms as part of the bootstrap.InfraStatus and read it from there. Same applies to conversionToDualStackPlatforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kyrtapz happy to make that change but I am not sure how future proof that is. As long as the dualStackPlatforms is in place, we run the risk of someone using that global instead of the InfraStatus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the change I proposed we should get rid of the global dualStackPlatforms variable.
| objs := []*uns.Unstructured{} | ||
|
|
||
| // Update the list of supported DualStack platforms based on enabled feature gates. | ||
| updateDualStackPlatforms(featureGates) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling it here would mean adding elements to dualStackPlatforms every time Render is called, we cannot do that.
Edit: this isn't a problem since we use a set. I still don't like the fact that it tries to modify the global variable so often.
| return errors.Errorf("%s is not one of the supported platforms for dual stack (%s)", infraRes.PlatformType, | ||
| strings.Join(dualStackPlatforms.List(), ", ")) | ||
| } else if string(configv1.OpenStackPlatformType) == string(infraRes.PlatformType) { | ||
| } else if !isConversionSupportedDualStackPlatform(infraRes.PlatformType) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you didn't introduce this but we can simplify the code and ditch the else if since the if returns.
something like this:
if !isSupportedDualStackPlatform(infraRes.PlatformType) {
return ...
}
if !isConversionSupportedDualStackPlatform(infraRes.PlatformType) {
return ...
}
Uh oh!
There was an error while loading. Please reload this page.