diff --git a/common/unified-chart/templates/_helpers.tpl b/common/unified-chart/templates/_helpers.tpl index 42a2092e..d6bb849f 100644 --- a/common/unified-chart/templates/_helpers.tpl +++ b/common/unified-chart/templates/_helpers.tpl @@ -117,6 +117,15 @@ app.frontegg.com/name: {{ include "name" . }}-worker {{ include "name" . }} {{- end -}} +{{/* +Common labels includes HP selector.labels +*/}} +{{- define "hp.appversion.labels" -}} +{{- include "hp.labels" . }} +app.frontegg.com/appVersion: {{ include "appVersion" . | quote }} +{{ include "hp.selector.labels" . }} +{{- end -}} + {{/* Common labels includes HP selector.labels */}} diff --git a/common/unified-chart/templates/high-priority/hp-deployment.yaml b/common/unified-chart/templates/high-priority/hp-deployment.yaml index c0048557..d456c861 100644 --- a/common/unified-chart/templates/high-priority/hp-deployment.yaml +++ b/common/unified-chart/templates/high-priority/hp-deployment.yaml @@ -7,7 +7,7 @@ kind: Deployment metadata: name: {{ include "hp.name" . }} labels: - {{- include "hp.labels" . | nindent 4 }} + {{- include "hp.appversion.labels" . | nindent 4 }} {{- toYaml .Values.hp.labels | nindent 4 }} spec: revisionHistoryLimit: {{ .Values.revisionHistoryLimit | default 2 }} @@ -22,7 +22,7 @@ spec: template: metadata: labels: - {{- include "hp.labels" . | nindent 8 }} + {{- include "hp.appversion.labels" . | nindent 8 }} annotations: checksum/secret: {{ printf "%s%s" (print $values.externalSecret.text) (print $values.externalSecret.additionalSecrets) | sha256sum }} {{- $valshp := .Values.hp -}} diff --git a/common/unified-chart/templates/high-priority/hp-pd-services.yaml b/common/unified-chart/templates/high-priority/hp-pd-services.yaml index 7abb665a..f276d258 100644 --- a/common/unified-chart/templates/high-priority/hp-pd-services.yaml +++ b/common/unified-chart/templates/high-priority/hp-pd-services.yaml @@ -9,7 +9,7 @@ kind: Service metadata: name: {{ include "hp.name" $top }}-{{ $type }} labels: - {{- include "hp.labels" $top | nindent 4 }} + {{- include "hp.appversion.labels" $top | nindent 4 }} {{- with $values.hp.service.labels }} {{- toYaml . | nindent 4 }} {{- end }} diff --git a/common/unified-chart/templates/high-priority/hp-service.yaml b/common/unified-chart/templates/high-priority/hp-service.yaml index 6a82dbe7..1059b2c1 100644 --- a/common/unified-chart/templates/high-priority/hp-service.yaml +++ b/common/unified-chart/templates/high-priority/hp-service.yaml @@ -7,7 +7,7 @@ kind: Service metadata: name: {{ include "hp.name" . }} labels: - {{- include "hp.labels" . | nindent 4 }} + {{- include "hp.appversion.labels" . | nindent 4 }} {{- with $values.hp.service.labels }} {{- toYaml . | nindent 4 }} {{- end }}