-
Notifications
You must be signed in to change notification settings - Fork 462
pkg/operator: Remove infra platform string constants #814
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
pkg/operator: Remove infra platform string constants #814
Conversation
|
/retest |
pkg/operator/render.go
Outdated
| case configv1.VSpherePlatformType: | ||
| platform = "vsphere" | ||
| } | ||
| platform := strings.ToLower(string(infra.Status.PlatformStatus.Type)) |
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 only semantic difference is that we don't fallback to a none platform right? cc @abhinavdahiya for confirmation
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.
actually looks like the none platform is defined? @runcom not sure if that's used by installer though.
https://github.com/openshift/api/blob/master/config/v1/types_infrastructure.go
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 great, nevermind this comment then
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: is there any way the platform won't be set to anything (not None, but empty)? maybe we should check to make sure it has a value?
|
Looks great as is, just a friendly ping to installer 👍 |
849ae0a to
a4bada1
Compare
|
gosh, fat fingers (wanted to comment) /approve |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
uhm, something isn't properly working here /hold |
kikisdeliveryservice
left a comment
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.
Is the intention of this PR to add support for additional platforms? For example, the previous state put baremetal, GCP, libvirt to None as opposed to passing them as actual platform values. I'm pretty sure this is why the switch statement was originally used and that we should make sure we actually want to expand the potential platform values that we are passing before we merge this.
4.2 supports that set of platforms so we should be good landing this to master (cross checked with Ian as well) |
is there any issue merging here before they are fully supported? |
nope afaict, the installer sets the platform and if someone is using master is not something released so free to break anytime w/o support. |
Fair enough! 😄 Just 1 comment from me above, as I'd like a check that platform has a value otherwise set to None: #814 (comment) |
|
/lgtm cancel keep holding this PR because the PlatformStatus is still empty because we need openshift/installer#1725 (comment). We can go ahead with this PR once the installer PR lands |
a4bada1 to
41b59b5
Compare
|
Added empty string check so this will be ready once the installer PR is merged. |
|
Added a unit test for the function I modified 😃 |
41dfa81 to
7d3a890
Compare
|
/retest |
|
/approve |
|
/retest |
7d3a890 to
155f738
Compare
|
verify isn't allowing the new check bc the type is deprecated here: https://github.com/openshift/api/blob/49f610c1a3a8461a9d0623ad35fa08d943b12c68/config/v1/types_infrastructure.go#L42 |
|
Let's just add a |
nice!! i thought that was the way but wasn't sure. just saw similar here: https://github.com/openshift/machine-config-operator/pull/918/files#diff-fa45321336db7ad1cedc28bf643a4f97 |
155f738 to
e0b06c4
Compare
|
@sgreene570: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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/test-infra repository. I understand the commands that are listed here. |
|
/skip |
|
i think we're just probably waiting for that e2e test to stop flaking |
|
/retest |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: runcom, sgreene570 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
- What I did
The openshift v1 infrastructure API types have been updated (https://github.com/openshift/api/blob/master/config/v1/types_infrastructure.go). As is,
render.godoes not take into account bare metal or GCP cluster type strings. The currently used struct fields are also marked as deprecated in the API source code.- How to verify it
Should not be semantically different.
- Description for the changelog
Update platform type strings in controller config spec