Add possibiliy to define statefulset labels (#130)

This change adds a new value *statefulset.labels* to allow the user to add custom labels to the StatefulSet.

An example of where this could be useful is if gitea's pvc is stored on OpenEBS. With this new option, the user can add the extra *openebs.io/sts-target-affinity* label to specify that the volume target pod should run on the same node as gitea's StatefulSet.

Co-authored-by: Baptiste Covolato <[email protected]>
Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/130
Reviewed-by: luhahn <[email protected]>
Reviewed-by: lafriks <[email protected]>
Co-authored-by: Nakrez <[email protected]>
Co-committed-by: Nakrez <[email protected]>
This commit is contained in:
NakrezandBaptiste Covolato authored and lafriks committed 2021-03-17 08:07:42 +08:00
1 parent 1eb0eee3bc
commit 0f1e991889
2 files changed
+7

No files matched your search

+6
View File
@@ -9,6 +9,9 @@ spec:
selector:
matchLabels:
{{- include "gitea.selectorLabels" . | nindent 6 }}
{{- if .Values.statefulset.labels }}
{{- toYaml .Values.statefulset.labels | nindent 6 }}
{{- end }}
serviceName: {{ include "gitea.fullname" . }}
template:
metadata:
@@ -21,6 +24,9 @@ spec:
{{- end }}
labels:
{{- include "gitea.labels" . | nindent 8 }}
{{- if .Values.statefulset.labels }}
{{- toYaml .Values.statefulset.labels | nindent 8 }}
{{- end }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
+1
View File
@@ -69,6 +69,7 @@ statefulset:
# - name: VARIABLE
# value: my-value
terminationGracePeriodSeconds: 60
labels: {}
persistence:
enabled: true