From 174b4a06666e818fbbb1615896297a317e11830d Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 16 Sep 2025 09:47:33 +0200 Subject: [PATCH 1/4] chore(template): Disable yamllint for comments-indentation --- template/.yamllint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/template/.yamllint.yaml b/template/.yamllint.yaml index 769cda16..08bf167f 100644 --- a/template/.yamllint.yaml +++ b/template/.yamllint.yaml @@ -12,3 +12,4 @@ rules: min-spaces-from-content: 1 # Needed due to https://github.com/adrienverge/yamllint/issues/443 indentation: indent-sequences: consistent + comments-indentation: disable # This is generally useless and interferes with commented example values From 72f3b9bacee345e782ad4434f7453d40e953cacc Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 16 Sep 2025 09:47:44 +0200 Subject: [PATCH 2/4] chore: Disable yamllint for comments-indentation --- .yamllint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.yamllint.yaml b/.yamllint.yaml index fff66c5d..5b315dc4 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -13,6 +13,7 @@ rules: check-keys: false comments: min-spaces-from-content: 1 # Needed due to https://github.com/adrienverge/yamllint/issues/443 + comments-indentation: disable # This is generally useless and interferes with commented example values yaml-files: - '*.yaml' From b84851bc032b1b23e9ed25f0ad778dd698637ab4 Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 16 Sep 2025 09:51:19 +0200 Subject: [PATCH 3/4] feat(template/helm): Allow Pod priority, priorityClassName, and preemptionPolicy to be configured Part of https://github.com/stackabletech/issues/issues/765 --- .../helm/[[operator]]/templates/deployment.yaml.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 index 06bfbe78..fa60d70c 100644 --- a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 +++ b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 @@ -104,6 +104,15 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.priority }} + priority: {{ . }} + {{- end }} + {{- with .Values.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} + {{- with .Values.preemptionPolicy }} + preemptionPolicy: {{ . }} + {{- end }} {[% else %}] # Templated Deployment disabled for this operator {[% endif %}] From 0e86593f9a332e6c649104824d6c9c30b00d79ff Mon Sep 17 00:00:00 2001 From: Nick Larsen Date: Tue, 16 Sep 2025 10:53:06 +0200 Subject: [PATCH 4/4] fix(template/helm): Remove priority and preemptionPolicy. Note: These should be configured in a PriorityClass and the admission controller will stop you setting these on the pod directly. --- .../deploy/helm/[[operator]]/templates/deployment.yaml.j2 | 6 ------ 1 file changed, 6 deletions(-) diff --git a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 index fa60d70c..1654f9b5 100644 --- a/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 +++ b/template/deploy/helm/[[operator]]/templates/deployment.yaml.j2 @@ -104,15 +104,9 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} - {{- with .Values.priority }} - priority: {{ . }} - {{- end }} {{- with .Values.priorityClassName }} priorityClassName: {{ . }} {{- end }} - {{- with .Values.preemptionPolicy }} - preemptionPolicy: {{ . }} - {{- end }} {[% else %}] # Templated Deployment disabled for this operator {[% endif %}]