diff options
| author | Ćukasz Maksymczuk <tehasdf@users.noreply.github.com> | 2023-11-01 07:42:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-31 23:42:55 -0700 |
| commit | d401e374f7aef02f5fd367c79c0be6778aca2042 (patch) | |
| tree | a623e6f7d5644afa9b09b0cef2b50594bdb011e6 | |
| parent | 4bb3911fde1b73ef096dbe9d3a91a56c983d8c80 (diff) | |
| download | seaweedfs-d401e374f7aef02f5fd367c79c0be6778aca2042.tar.xz seaweedfs-d401e374f7aef02f5fd367c79c0be6778aca2042.zip | |
Add podLabels & podAnnotations to all pods (#4959)
The pods of all statefulsets/deployments can now have customizable
labels and annotations
5 files changed, 33 insertions, 0 deletions
diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml index 5f2092be2..df299a145 100644 --- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml @@ -33,6 +33,13 @@ spec: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: filer + {{ with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + {{ with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: restartPolicy: {{ default .Values.global.restartPolicy .Values.filer.restartPolicy }} {{- if .Values.filer.affinity }} diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml index 1da629dc6..0efde8f4b 100644 --- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml @@ -32,6 +32,13 @@ spec: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: master + {{ with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + {{ with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: restartPolicy: {{ default .Values.global.restartPolicy .Values.master.restartPolicy }} {{- if .Values.master.affinity }} diff --git a/k8s/charts/seaweedfs/templates/s3-deployment.yaml b/k8s/charts/seaweedfs/templates/s3-deployment.yaml index 3cf3008df..2a343b573 100644 --- a/k8s/charts/seaweedfs/templates/s3-deployment.yaml +++ b/k8s/charts/seaweedfs/templates/s3-deployment.yaml @@ -24,6 +24,13 @@ spec: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: s3 + {{ with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + {{ with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: restartPolicy: {{ default .Values.global.restartPolicy .Values.s3.restartPolicy }} {{- if .Values.s3.tolerations }} diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml index 9f851fee0..616a233dd 100644 --- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml +++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml @@ -26,6 +26,13 @@ spec: helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/component: volume + {{ with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + annotations: + {{ with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} spec: {{- if .Values.volume.affinity }} affinity: diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml index 99799f3a0..2884621c1 100644 --- a/k8s/charts/seaweedfs/values.yaml +++ b/k8s/charts/seaweedfs/values.yaml @@ -654,3 +654,8 @@ certificates: # you will need to store your provided certificates in the secret read by the different services: # seaweedfs-master-cert, seaweedfs-filer-cert, etc. Can see any statefulset definition to see secret names enabled: false + +# Labels to be added to all the created pods +podLabels: {} +# Annotations to be added to all the created pods +podAnnotations: {} |
