From 3542a408ffb61af6ae560a063ad511055f57942e Mon Sep 17 00:00:00 2001 From: ericsyh Date: Tue, 5 Mar 2024 22:15:33 +0800 Subject: [PATCH 1/2] support podLabel and podAnnotation for toolset and console Signed-off-by: ericsyh --- .../streamnative-console-statefulset.yaml | 4 ++-- .../templates/toolset/toolset-statefulset.yaml | 4 ++-- charts/sn-platform-slim/values.yaml | 4 ++++ 3 files changed, 8 insertions(+), 4 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 From 86d47ce0fd65adfee2a026a0227e7cce1fd66dcc Mon Sep 17 00:00:00 2001 From: ericsyh Date: Tue, 5 Mar 2024 22:43:16 +0800 Subject: [PATCH 2/2] apply to sn-platform chart Signed-off-by: ericsyh --- .../streamnative-console-statefulset.yaml | 4 ++-- charts/sn-platform/templates/toolset/toolset-statefulset.yaml | 4 ++-- charts/sn-platform/values.yaml | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) 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 773226819..da06c6ea1 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -1637,6 +1637,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