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
Bug 1809005: Always set node selector kubernetes.io/os to linux #518
Bug 1809005: Always set node selector kubernetes.io/os to linux #518
Conversation
@ricardomaraschini: This pull request references Bugzilla bug 1809005, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
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 kubernetes/test-infra repository. |
/assign @adambkaplan @gabemontero |
pkg/resource/podtemplatespec.go
Outdated
for k, v := range cr.Spec.NodeSelector { | ||
nodeSelectors[k] = v | ||
} | ||
nodeSelectors["kubernetes.io/os"] = "linux" |
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.
Shouldn't we allow users to override our default?
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 it makes sense. I have adjusted it to avoid overwrite.
/retest |
manifests/07-operator.yaml
Outdated
@@ -21,6 +21,7 @@ spec: | |||
priorityClassName: system-cluster-critical | |||
nodeSelector: | |||
node-role.kubernetes.io/master: "" | |||
kubernetes.io/os: linux |
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 somewhat redundant - we only support RHCOS masters I believe.
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 vaguely recall a Jira story where we had to do something similar, i.e. make sure it doesn't run on windows, but I can't find the Jira story or analogous yaml in the repos I think I might have had to do this for.
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 see your point @adambkaplan. I will get rid of this.
/retest |
@@ -336,13 +336,21 @@ func makePodTemplateSpec(coreClient coreset.CoreV1Interface, proxyLister configl | |||
} | |||
} | |||
|
|||
nodeSelectors := map[string]string{} |
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'm not sure how I feel about this. The image registry has to run on linux, but we are saying that an administrator can set a different os, even if it won't run there? Seems sketchy.
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.
Settings kubernetes.io/os
in this selector to anything other than linux
is not supported today. However, if a customer decides to change its value anyway, the configuration should be broken today.
I can envision a situation when someone sets kubernetes.io/os
to windows
and forget about it, it works. Later we add support of this OS and his configuration suddenly has a new meaning.
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.
Settings kubernetes.io/os in this selector to anything other than linux is not supported today
I don't think that is true. We are moving towards supporting Windows Containers (and that means Windows nodes) in the near future. My understanding is that this is "dev preview" in 4.4.
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.
@adambkaplan are you saying that someone is trying to build the image registry for Windows?
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.
@dmage - at this point no, just that there will be Windows workers and we need to ensure we don't schedule or workloads on them by default. If a customer sets the node selector to be windows
, their cluster goes degraded. So 🤷
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 agree with @dmage. It is better to crash with a wrong configuration now. This way we assure that the configuration reflects user intentions once we start supporting Window hosts.
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.
Hey guys, any extra consideration here? I would like to get this moving ahead.
This assures we only run the operator and the operand on linux nodes.
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dmage, ricardomaraschini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest Please review the full test history for this PR and help us cut down flakes. |
@ricardomaraschini: All pull requests linked via external trackers have merged: openshift/cluster-image-registry-operator#518. Bugzilla bug 1809005 has been moved to the MODIFIED state. 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 kubernetes/test-infra repository. |
This assures we only run the operator and the operand on linux nodes.