From b15043c76d08bbf26a827f0df7374cbb83000afc Mon Sep 17 00:00:00 2001 From: Eric Shen Date: Thu, 7 Mar 2024 13:04:09 +0800 Subject: [PATCH] feat: support podLabel and podAnnotation for toolset and console (#1152) * support podLabel and podAnnotation for toolset and console Signed-off-by: ericsyh * apply to sn-platform chart Signed-off-by: ericsyh --------- Signed-off-by: ericsyh (cherry picked from commit 66384746ebc6185cc598b9fcf263d00b95fa446c) --- .../streamnative-console-statefulset.yaml | 4 ++-- .../templates/toolset/toolset-statefulset.yaml | 4 ++-- charts/sn-platform-slim/values.yaml | 4 ++++ .../streamnative-console-statefulset.yaml | 4 ++-- charts/sn-platform/templates/toolset/toolset-statefulset.yaml | 4 ++-- charts/sn-platform/values.yaml | 4 ++++ 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/charts/sn-platform-slim/templates/streamnative-console/streamnative-console-statefulset.yaml b/charts/sn-platform-slim/templates/streamnative-console/streamnative-console-statefulset.yaml index d8994de19..17b54774b 100644 --- a/charts/sn-platform-slim/templates/streamnative-console/streamnative-console-statefulset.yaml +++ b/charts/sn-platform-slim/templates/streamnative-console/streamnative-console-statefulset.yaml @@ -48,11 +48,11 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: {{ .Values.streamnative_console.component }} -{{- with .Values.streamnative_console.labels }} +{{- with .Values.streamnative_console.podLabels }} {{ toYaml . | indent 8 }} {{- end }} annotations: -{{- with .Values.streamnative_console.annotations }} +{{- with .Values.streamnative_console.podAnnotations }} {{ toYaml . | indent 8 }} {{- end }} spec: diff --git a/charts/sn-platform-slim/templates/toolset/toolset-statefulset.yaml b/charts/sn-platform-slim/templates/toolset/toolset-statefulset.yaml index 542e5d8b6..de288f866 100644 --- a/charts/sn-platform-slim/templates/toolset/toolset-statefulset.yaml +++ b/charts/sn-platform-slim/templates/toolset/toolset-statefulset.yaml @@ -48,14 +48,14 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: {{ .Values.toolset.component }} -{{- with .Values.toolset.labels }} +{{- with .Values.toolset.podLabels }} {{ toYaml . | indent 8 }} {{- end }} annotations: {{- if .Values.toolset.autoRollDeployment }} checksum/config: {{ include (print $.Template.BasePath "/toolset/toolset-configmap.yaml") . | sha256sum }} {{- end }} -{{- with .Values.toolset.annotations }} +{{- with .Values.toolset.podAnnotations }} {{ toYaml . | indent 8 }} {{- end }} spec: diff --git a/charts/sn-platform-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 175d8b224..a42de0413 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -1561,6 +1561,8 @@ toolset: # cloud.google.com/gke-nodepool: default-pool labels: {} annotations: {} + podLabels: {} + podAnnotations: {} tolerations: [] gracePeriod: 0 resources: @@ -1985,6 +1987,8 @@ streamnative_console: # cloud.google.com/gke-nodepool: default-pool labels: {} annotations: {} + podLabels: {} + podAnnotations: {} tolerations: [] gracePeriod: 0 # Resources requests/limits for both init containers and app containers diff --git a/charts/sn-platform/templates/streamnative-console/streamnative-console-statefulset.yaml b/charts/sn-platform/templates/streamnative-console/streamnative-console-statefulset.yaml index 64c69d6aa..d57140797 100644 --- a/charts/sn-platform/templates/streamnative-console/streamnative-console-statefulset.yaml +++ b/charts/sn-platform/templates/streamnative-console/streamnative-console-statefulset.yaml @@ -48,11 +48,11 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: {{ .Values.streamnative_console.component }} -{{- with .Values.streamnative_console.labels }} +{{- with .Values.streamnative_console.podLabels }} {{ toYaml . | indent 8 }} {{- end }} annotations: -{{- with .Values.streamnative_console.annotations }} +{{- with .Values.streamnative_console.podAnnotations }} {{ toYaml . | indent 8 }} {{- end }} spec: diff --git a/charts/sn-platform/templates/toolset/toolset-statefulset.yaml b/charts/sn-platform/templates/toolset/toolset-statefulset.yaml index b4f9e8b24..2745c1387 100644 --- a/charts/sn-platform/templates/toolset/toolset-statefulset.yaml +++ b/charts/sn-platform/templates/toolset/toolset-statefulset.yaml @@ -48,14 +48,14 @@ spec: labels: {{- include "pulsar.template.labels" . | nindent 8 }} component: {{ .Values.toolset.component }} -{{- with .Values.toolset.labels }} +{{- with .Values.toolset.podLabels }} {{ toYaml . | indent 8 }} {{- end }} annotations: {{- if .Values.toolset.autoRollDeployment }} checksum/config: {{ include (print $.Template.BasePath "/toolset/toolset-configmap.yaml") . | sha256sum }} {{- end }} -{{- with .Values.toolset.annotations }} +{{- with .Values.toolset.podAnnotations }} {{ toYaml . | indent 8 }} {{- end }} spec: diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index 70f1019c9..2d324ab5f 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1638,6 +1638,8 @@ toolset: # cloud.google.com/gke-nodepool: default-pool labels: {} annotations: {} + podLabels: {} + podAnnotations: {} tolerations: [] kafka: enabled: false @@ -2072,6 +2074,8 @@ streamnative_console: # cloud.google.com/gke-nodepool: default-pool labels: {} annotations: {} + podLabels: {} + podAnnotations: {} tolerations: [] gracePeriod: 0 # Resources requests/limits for both init containers and app containers