diff --git a/.gitignore b/.gitignore index 1cce063d..e95dc4c9 100644 --- a/.gitignore +++ b/.gitignore @@ -421,3 +421,4 @@ FodyWeavers.xsd # Local value yaml helm/local.yaml +Chart.lock diff --git a/helm/Chart.yaml b/helm/Chart.yaml index 315b72dd..2046e34a 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -4,3 +4,7 @@ description: A Helm chart for gpkg-merger service # refers to MergerService type: application version: 2.0.0 appVersion: 2.0.0 +dependencies: + - name: mclabels + version: 1.0.1 + repository: oci://acrarolibotnonprod.azurecr.io/helm/infra diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index eb189ee0..e577f74f 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -31,11 +31,11 @@ Common labels */}} {{- define "gpkg-merger.labels" -}} helm.sh/chart: {{ include "gpkg-merger.chart" . }} -{{ include "gpkg-merger.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "mclabels.labels" . }} {{- end }} {{/* @@ -51,6 +51,7 @@ Selector labels {{- define "gpkg-merger.selectorLabels" -}} app.kubernetes.io/name: {{ include "gpkg-merger.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{ include "mclabels.selectorLabels" . }} {{- end }} {{/* diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 721ab1d0..955ef63b 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -40,12 +40,9 @@ spec: run: {{ $releaseName }}-{{ $chartName }} {{- include "gpkg-merger.selectorLabels" . | nindent 8 }} annotations: + {{ include "mclabels.annotations" . | nindent 8 }} {{- if .Values.resetOnConfigChange }} checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} - {{- if .Values.env.metrics.enabled }} - prometheus.io/port: {{ .Values.env.metrics.port | quote }} - prometheus.io/scrape: {{ .Values.env.metrics.scrape | quote }} - {{- end }} {{- if .Values.podAnnotations }} {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} diff --git a/helm/values.yaml b/helm/values.yaml index 5023ab06..169bfb9b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -32,6 +32,17 @@ global: path: '/usr/local/share/ca-certificates' key: 'ca.crt' + +mclabels: + #environment: development + component: backend + partOf: ingestion + owner: raster + gisDomain: raster + prometheus: + enabled: true + port: 8080 + enabled: true environment: development replicaCount: 1