diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 5b80e12..6980f96 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -8,3 +8,4 @@ jobs: secrets: inherit with: openApiFilePath: './bundledApi.yaml' + chartDirs: 'helm' diff --git a/helm/Chart.lock b/helm/Chart.lock new file mode 100644 index 0000000..ce21fd2 --- /dev/null +++ b/helm/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: mc-labels-and-annotations + repository: oci://acrarolibotnonprod.azurecr.io/helm/infra + version: 0.7.0 +digest: sha256:2be5f55b663b3888821a0bc9d1b8f382a5836f40b066b114c9c90f6804295d8e +generated: "2025-08-27T09:12:57.0437616+03:00" diff --git a/helm/Chart.yaml b/helm/Chart.yaml index ee39eb2..a1917fe 100644 --- a/helm/Chart.yaml +++ b/helm/Chart.yaml @@ -4,3 +4,8 @@ description: A Helm chart for store-trigger service type: application version: 2.0.0 appVersion: 2.0.0 +dependencies: + - name: mc-labels-and-annotations + version: 0.7.0 + repository: oci://acrarolibotnonprod.azurecr.io/helm/infra + alias: mcLabelsAndAnnotations diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index 252ff17..1cd40bf 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -36,6 +36,7 @@ helm.sh/chart: {{ include "store-trigger.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +{{ include "mc-labels-and-annotations.labels" . }} {{- end }} {{/* @@ -44,19 +45,9 @@ Selector labels {{- define "store-trigger.selectorLabels" -}} app.kubernetes.io/name: {{ include "store-trigger.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} +{{ include "mc-labels-and-annotations.selectorLabels" . }} {{- end }} -{{/* -Returns the environment from the chart's values if exists or from global, defaults to development -*/}} -{{- define "store-trigger.environment" -}} -{{- if .Values.environment }} - {{- .Values.environment -}} -{{- else -}} - {{- .Values.global.environment | default "development" -}} -{{- end -}} -{{- end -}} - {{/* Returns the cloud provider name from the chart's values if exists or from global, defaults to minikube */}} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml index 3bd16a8..febba0c 100644 --- a/helm/templates/deployment.yaml +++ b/helm/templates/deployment.yaml @@ -18,7 +18,6 @@ metadata: labels: app: {{ $chartName }} component: {{ $chartName }} - environment: {{ include "store-trigger.environment" . }} release: {{ $releaseName }} {{- include "store-trigger.labels" . | nindent 4 }} spec: @@ -38,6 +37,7 @@ spec: run: {{ $fullName }} {{- include "store-trigger.selectorLabels" . | nindent 8 }} annotations: + {{ include "mc-labels-and-annotations.annotations" . | nindent 8 }} {{ include "merged.podAnnotations" . | nindent 8 }} {{- if .Values.resetOnConfigChange }} checksum/configmap: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml index 4ecff7d..1041c59 100644 --- a/helm/templates/service.yaml +++ b/helm/templates/service.yaml @@ -9,7 +9,6 @@ metadata: labels: app: {{ $chartName }} component: {{ $chartName }} - environment: {{ include "store-trigger.environment" . }} release: {{ $releaseName }} {{- include "store-trigger.labels" . | nindent 4 }} spec: diff --git a/helm/values.yaml b/helm/values.yaml index b137f88..a260449 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,7 +6,7 @@ global: imagePullPolicy: IfNotPresent tracing: {} metrics: {} - environment: development + providers: source: NFS destination: S3 @@ -41,8 +41,16 @@ cloudProvider: dockerRegistryUrl: flavor: imagePullSecretName: + imagePullPolicy: -environment: + +mcLabelsAndAnnotations: + component: backend + partOf: ingestion + owner: 3d + gisDomain: 3d + prometheus: + enabled: true image: repository: store-trigger diff --git a/package.json b/package.json index 4587e4d..b708ee2 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,8 @@ "prelint:fix": "npm run format:fix", "prelint": "npm run format", "lint:openapi": "npx @redocly/cli lint --format=github-actions ./bundledApi.yaml", - "lint": "eslint . && helm lint ./helm", - "lint:fix": "eslint --fix . && helm lint ./helm", + "lint": "eslint .", + "lint:fix": "eslint --fix .", "test": "npm run test:unit && npm run test:integration", "prebuild": "npm run clean", "build": "tsc --project tsconfig.build.json && npm run assets:copy",