diff --git a/Chart.yaml b/Chart.yaml index 3653e64..96c29a1 100755 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: etcd home: https://github.com/coreos/etcd -version: 0.1.1 +version: 0.1.2 appVersion: v3.4.15 description: Distributed reliable key-value store for the most critical data of a distributed system. diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index dcf8486..c1fcb68 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -50,6 +50,22 @@ app.kubernetes.io/name: {{ include "etcd.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Server selector labels +*/}} +{{- define "etcd.server.selectorLabels" -}} +app.kubernetes.io/component: server +{{ include "etcd.selectorLabels" . }} +{{- end }} + +{{/* +Snapshotter selector labels +*/}} +{{- define "etcd.snapshotter.selectorLabels" -}} +app.kubernetes.io/component: snapshotter +{{ include "etcd.selectorLabels" . }} +{{- end }} + {{/* Create the name of the service account to use */}} diff --git a/templates/cronjob.yaml b/templates/cronjob.yaml index 0ec600d..f7d3bdf 100644 --- a/templates/cronjob.yaml +++ b/templates/cronjob.yaml @@ -17,8 +17,7 @@ spec: template: metadata: labels: - app.kubernetes.io/component: snapshotter - {{- include "etcd.selectorLabels" . | nindent 12 }} + {{- include "etcd.snapshotter.selectorLabels" . | nindent 12 }} spec: restartPolicy: OnFailure serviceAccountName: {{ include "etcd.serviceAccountName" . }} diff --git a/templates/podmonitor.yaml b/templates/podmonitor.yaml index 6db51df..ea25d6e 100644 --- a/templates/podmonitor.yaml +++ b/templates/podmonitor.yaml @@ -20,5 +20,5 @@ spec: {{- toYaml .Values.podMonitor.relabelings | nindent 8 }} selector: matchLabels: - {{- include "etcd.selectorLabels" . | nindent 6 }} + {{- include "etcd.server.selectorLabels" . | nindent 6 }} {{- end }} diff --git a/templates/service.yaml b/templates/service.yaml index ca9a4d8..879e0a5 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -13,7 +13,7 @@ spec: - port: {{ .Values.clientPort }} name: etcd-client selector: - {{- include "etcd.selectorLabels" . | nindent 4 }} + {{- include "etcd.server.selectorLabels" . | nindent 4 }} --- apiVersion: v1 kind: Service @@ -26,4 +26,4 @@ spec: - port: {{ .Values.clientPort }} name: etcd-client selector: - {{- include "etcd.selectorLabels" . | nindent 4 }} + {{- include "etcd.server.selectorLabels" . | nindent 4 }} diff --git a/templates/statefulset.yaml b/templates/statefulset.yaml index d7959d5..41bc46a 100644 --- a/templates/statefulset.yaml +++ b/templates/statefulset.yaml @@ -11,7 +11,7 @@ spec: replicas: {{ .Values.replicas }} selector: matchLabels: - {{- include "etcd.selectorLabels" . | nindent 6 }} + {{- include "etcd.server.selectorLabels" . | nindent 6 }} serviceName: {{ template "etcd.fullname" . }} template: metadata: @@ -21,7 +21,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "etcd.selectorLabels" . | nindent 8 }} + {{- include "etcd.server.selectorLabels" . | nindent 8 }} spec: serviceAccountName: {{ include "etcd.serviceAccountName" . }} securityContext: