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

feat: Add nodeSelector for Linux nodes #20148

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,5 @@ spec:
items:
- key: controller.profile.enabled
path: profiler.enabled
nodeSelector:
Copy link
Member

Choose a reason for hiding this comment

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

Instead of hard coding this for all users this it can be an optional kustomization, we can document it in the docs to let users know how/when to use the kustomization if needed instead.

Copy link

Choose a reason for hiding this comment

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

What is the concern about adding this globally?

I'm not seeing a downside to applying this as it will have no effect on clusters that only have Linux nodes.

Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit ignorant about multi-OS clusters. Do we know with reasonable certainty that kubernetes.io/os will be set for all nodes for all relevant versions of Kubernetes across all major vendors? Or is it just a convention that may or may not be in place?

Choose a reason for hiding this comment

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

I believe this is autopopulated by Kubernetes. See the docs

For nodes, the kubelet populates this with runtime.GOOS as defined by Go.

Choose a reason for hiding this comment

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

In all current kubernetes clusters (version 1.14 (2019) to present (v1.31)), the kubernetes.io/os label is automatically set. Previous to that, the label was beta.kubernetes.io/os. Versions since 1.14 seem to have both labels for reverse compatibility, but officially, beta is deprecated.

kubernetes.io/os: linux
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,7 @@ spec:
name: argocd-cmd-params-cm
items:
- key: controller.profile.enabled
path: profiler.enabled
path: profiler.enabled

nodeSelector:
kubernetes.io/os: linux
Original file line number Diff line number Diff line change
Expand Up @@ -211,3 +211,5 @@ spec:
path: tls.key
- key: ca.crt
path: ca.crt
nodeSelector:
kubernetes.io/os: linux
2 changes: 2 additions & 0 deletions manifests/base/dex/argocd-dex-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,5 @@ spec:
matchLabels:
app.kubernetes.io/part-of: argocd
topologyKey: kubernetes.io/hostname
nodeSelector:
kubernetes.io/os: linux
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ spec:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
nodeSelector:
kubernetes.io/os: linux
2 changes: 2 additions & 0 deletions manifests/base/redis/argocd-redis-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ spec:
matchLabels:
app.kubernetes.io/part-of: argocd
topologyKey: kubernetes.io/hostname
nodeSelector:
kubernetes.io/os: linux
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,5 @@ spec:
matchLabels:
app.kubernetes.io/part-of: argocd
topologyKey: kubernetes.io/hostname
nodeSelector:
kubernetes.io/os: linux
2 changes: 2 additions & 0 deletions manifests/base/server/argocd-server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,5 @@ spec:
matchLabels:
app.kubernetes.io/part-of: argocd
topologyKey: kubernetes.io/hostname
nodeSelector:
kubernetes.io/os: linux
Loading