diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index b034474..3035a3f 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -1,3 +1,10 @@ +{{/* +Selector labels +*/}} +{{- define "dcache.selectorLabels" -}} +app.kubernetes.io/name: {{ .Chart.Name }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} {{/* Add CA certs and generate host certificate diff --git a/templates/door.yaml b/templates/door.yaml index 91fc272..02927fd 100644 --- a/templates/door.yaml +++ b/templates/door.yaml @@ -14,6 +14,7 @@ spec: template: metadata: labels: + {{- include "dcache.selectorLabels" . | nindent 8 }} app: door spec: containers: diff --git a/templates/pool.yaml b/templates/pool.yaml index 34ec246..f548dfe 100644 --- a/templates/pool.yaml +++ b/templates/pool.yaml @@ -13,6 +13,7 @@ spec: metadata: labels: app: pool-{{ . }} + {{- include "dcache.selectorLabels" $ | nindent 8 }} spec: securityContext: fsGroup: 1000