Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Elasticsearch: set PVC labels through setting all StatefulSet labels …
Browse files Browse the repository at this point in the history
…to its volumeClaimTemplate.

Allows to track created PVCs (example: delete all PVCs from this recently deleted Release).
  • Loading branch information
desaintmartin committed Jun 15, 2020
1 parent 4f40f6d commit be3c093
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions elasticsearch/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ spec:
volumeClaimTemplates:
- metadata:
name: {{ template "elasticsearch.uname" . }}
labels:
heritage: {{ .Release.Service | quote }}
release: {{ .Release.Name | quote }}
chart: "{{ .Chart.Name }}"
app: "{{ template "elasticsearch.uname" . }}"
{{- range $key, $value := .Values.labels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- with .Values.persistence.annotations }}
annotations:
{{ toYaml . | indent 8 }}
Expand Down

0 comments on commit be3c093

Please sign in to comment.