-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add Node affinity #1003
Add Node affinity #1003
Conversation
In my opinion since its technically just a refactor I would say to keep it in |
- key: kubernetes.io/arch | ||
operator: In | ||
values: | ||
- amd64 |
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.
Do we also want s390x
and ppc64le
like in downstream?
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.
We don't build those targets in upstream, so no? I'm not sure how this will work in downstream though if we have additional arches.
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.
In downstream we have a separate setNodeAffinity function that adds the other arches to the Kafka CR
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.
Do we also want s390x and ppc64le like in downstream?
No, we only build x86_64 upstream
I'm not sure how this will work in downstream though if we have additional arches.
We don't use this file downstream. The downstream operator will deploy the manageiq operator with the correct values.
|
func OperatorNodeAffinityArchValues(deployment *appsv1.Deployment, client client.Client) []string { | ||
podName := os.Getenv("POD_NAME") | ||
pod := FindPodByName(client, deployment.ObjectMeta.Namespace, podName) | ||
values := []string{"amd64"} |
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 added a commit to default to amd64
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, just a note that Strimzi Kafka will require a different method of setting node affinity (similar to downstream). But that can be handled in #1005 I suppose
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, also want @nasark approval before merge.
This will discover the node affinities applied to the operator and apply the same affinities to httpd, postgres, memcached and the orchestrator. I'll be opening a PR shortly that does the same tihng inside the orchestrator for the deployments that it creates. |
@bdunne Can we merge this now or do we have to wait for the core orchestrator change? Second question. If we run on an older OpenShift, will these nodeAffinities cause issues, or are they just ignored on older OpenShifts |
This can be merged before the orchestrator changes. My test cluster is 4.13.4 and it's working fine there. I can't find when |
Skipping backport to |
Skipping backport to |
For OpenShift 4.14 support
Part of #988