_selectorLabels.tpl 659 B

12345678910111213141516
  1. {{/* Labels that are used on selectors */}}
  2. {{/* Call this template:
  3. {{ include "ix.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "podName" $podName) }}
  4. podName is the "shortName" of the pod. The one you define in the .Values.workload
  5. */}}
  6. {{- define "ix.v1.common.lib.metadata.selectorLabels" -}}
  7. {{- $rootCtx := .rootCtx -}}
  8. {{- $objectType := .objectType -}}
  9. {{- $objectName := .objectName }}
  10. {{- if $objectType }}
  11. {{ printf "%s.name" $objectType }}: {{ $objectName }}
  12. {{- end }}
  13. app.kubernetes.io/name: {{ include "ix.v1.common.lib.chart.names.name" $rootCtx }}
  14. app.kubernetes.io/instance: {{ $rootCtx.Release.Name }}
  15. {{- end -}}