diff options
Diffstat (limited to 'kubernetes/common')
7 files changed, 25 insertions, 3 deletions
diff --git a/kubernetes/common/cassandra/templates/statefulset.yaml b/kubernetes/common/cassandra/templates/statefulset.yaml index b6bd8f6aa7..960d97ed52 100644 --- a/kubernetes/common/cassandra/templates/statefulset.yaml +++ b/kubernetes/common/cassandra/templates/statefulset.yaml @@ -143,4 +143,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} + selector: + matchLabels: + release: "{{ .Release.Name }}" {{- end }} diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml index d3bad4f5b6..2266bfc4e2 100644 --- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml +++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml @@ -126,4 +126,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} + selector: + matchLabels: + name: {{ include "common.fullname" . }} {{- end }} diff --git a/kubernetes/common/mongo/templates/pvc.yaml b/kubernetes/common/mongo/templates/pvc.yaml index d1558f131f..372c106800 100644 --- a/kubernetes/common/mongo/templates/pvc.yaml +++ b/kubernetes/common/mongo/templates/pvc.yaml @@ -25,6 +25,7 @@ metadata: chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }} {{- if .Values.persistence.annotations }} annotations: {{ toYaml .Values.persistence.annotations | indent 4 }} @@ -35,5 +36,8 @@ spec: resources: requests: storage: {{ .Values.persistence.size }} + selector: + matchLabels: + name: {{ include "common.fullname" . }} storageClassName: "{{ include "common.fullname" . }}-data" {{- end -}} diff --git a/kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml b/kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml index 103b1df1c1..009c40dbcc 100644 --- a/kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml +++ b/kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml @@ -103,7 +103,7 @@ spec: fieldRef: fieldPath: status.podIP volumeMounts: - - name: cassandra-data + - name: {{ template "common.name" . }}-data mountPath: /var/lib/cassandra resources: {{ toYaml .Values.resources | indent 10 }} @@ -112,12 +112,12 @@ spec: hostPath: path: /etc/localtime {{- if not .Values.persistence.enabled }} - - name: cassandra-data + - name: {{ template "common.name" . }}-data emptyDir: {} {{- else }} volumeClaimTemplates: - metadata: - name: cassandra-data + name: {{ template "common.name" . }}-data labels: app: {{ template "common.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" @@ -132,4 +132,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} + selector: + matchLabels: + release: "{{ .Release.Name }}" {{- end }} diff --git a/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml b/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml index 1efd46657c..135b59e2b6 100644 --- a/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml +++ b/kubernetes/common/music/charts/zookeeper/templates/statefulset.yaml @@ -185,4 +185,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} + selector: + matchLabels: + release: "{{ .Release.Name }}" {{- end }} diff --git a/kubernetes/common/mysql/templates/statefulset.yaml b/kubernetes/common/mysql/templates/statefulset.yaml index 1744940868..f73b10f460 100644 --- a/kubernetes/common/mysql/templates/statefulset.yaml +++ b/kubernetes/common/mysql/templates/statefulset.yaml @@ -251,4 +251,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size }} + selector: + matchLabels: + name: {{ include "common.fullname" . }} {{ end }} diff --git a/kubernetes/common/postgres/templates/statefulset.yaml b/kubernetes/common/postgres/templates/statefulset.yaml index 3c7ae65e4a..db4a256f12 100644 --- a/kubernetes/common/postgres/templates/statefulset.yaml +++ b/kubernetes/common/postgres/templates/statefulset.yaml @@ -149,4 +149,7 @@ spec: resources: requests: storage: {{ .Values.persistence.size }} + selector: + matchLabels: + name: {{ include "common.fullname" . }} #{{ end }} |