helm: add global.nodeSelector propagated to all pod specs#312
helm: add global.nodeSelector propagated to all pod specs#312
Conversation
…ives Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)
|
Consolidating into 2 PRs: chart features + docs |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a273d14bb8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with (include "codex-lb.nodeSelector" .) }} | ||
| nodeSelector: |
There was a problem hiding this comment.
Fix pod-spec indentation for deployment nodeSelector
The nodeSelector key in deployment.yaml is indented one space deeper than the surrounding pod-spec fields. When global.nodeSelector or nodeSelector is set, this block is emitted and no longer aligns with sibling keys like tolerations, producing invalid manifest structure and causing Helm render/apply failures for node-pinned deployments.
Useful? React with 👍 / 👎.
| {{- if .Values.postgresql.enabled }} | ||
| {{- end }} | ||
| {{- with (include "codex-lb.nodeSelector" .) }} | ||
| nodeSelector: |
There was a problem hiding this comment.
Correct migration hook nodeSelector indentation
The new nodeSelector block in the migration Job pod spec is also indented one space too far. If a selector is configured, this emits misaligned YAML relative to other keys in spec.template.spec, which breaks manifest parsing and prevents the migration hook from rendering/installing.
Useful? React with 👍 / 👎.
| template: | ||
| spec: | ||
| restartPolicy: OnFailure | ||
| {{- with .Values.nodeSelector }} |
There was a problem hiding this comment.
Apply merged global selector to db-init hook pod
The db-init Job still reads only .Values.nodeSelector, so deployments that rely on the new global.nodeSelector alone will not propagate selectors to this hook pod. In environments where scheduling requires explicit node labels (for example single-arch pools), the pre-install db-init hook can remain unschedulable and block installation.
Useful? React with 👍 / 👎.
Summary
global.nodeSelectorthat merges with per-resourcenodeSelectoracross all pod specsMotivation
On ARM-only clusters (e.g., OCI A1.Flex, AWS Graviton), every pod must have
kubernetes.io/arch: arm64. Currently users must set nodeSelector on each component separately.global.nodeSelectorsets it once.Changes
values.yaml: Addglobal.nodeSelector_helpers.tpl: Addcodex-lb.nodeSelectormerge helperdeployment.yaml: Use merged nodeSelectorhooks/migration-job.yaml: Use merged nodeSelectortests/test-connection.yaml: Use merged nodeSelector