From e0403ad52adb3cb1ce98f2109cded497d2e406d2 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Wed, 27 Aug 2025 09:13:49 +0300 Subject: [PATCH 01/12] chore: add mc annotations --- helm/Chart.lock | 6 ++++++ helm/Chart.yaml | 5 +++++ helm/templates/_helpers.tpl | 13 ++----------- helm/templates/deployment.yaml | 2 +- helm/templates/service.yaml | 1 - helm/values.yaml | 8 ++++++-- 6 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 helm/Chart.lock 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..a1b69f2 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,7 +6,6 @@ global: imagePullPolicy: IfNotPresent tracing: {} metrics: {} - environment: development providers: source: NFS destination: S3 @@ -42,7 +41,12 @@ cloudProvider: flavor: imagePullSecretName: imagePullPolicy: -environment: +mcLabelsAndAnnotations: + component: backend + partOf: ingestion + owner: 3d + gisDomain: 3d + prometheus.enabled: true image: repository: store-trigger From 329c20f718861f6ffc4c1e5f9856aac213f5c6c3 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Wed, 27 Aug 2025 09:31:50 +0300 Subject: [PATCH 02/12] chore: add mc annotations --- helm/values.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index a1b69f2..06c7933 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -6,6 +6,7 @@ global: imagePullPolicy: IfNotPresent tracing: {} metrics: {} + providers: source: NFS destination: S3 @@ -42,11 +43,11 @@ cloudProvider: imagePullSecretName: imagePullPolicy: mcLabelsAndAnnotations: - component: backend - partOf: ingestion - owner: 3d - gisDomain: 3d - prometheus.enabled: true + component: backend + partOf: ingestion + owner: 3d + gisDomain: 3d + prometheus.enabled: true image: repository: store-trigger From 15959aa1a55d25380dcbe5859f764e1c0c304d89 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Wed, 27 Aug 2025 09:34:11 +0300 Subject: [PATCH 03/12] chore: add mc annotations --- helm/values.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/helm/values.yaml b/helm/values.yaml index 06c7933..d1f5a4b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -7,6 +7,13 @@ global: tracing: {} metrics: {} + mcLabelsAndAnnotations: + component: backend + partOf: ingestion + owner: 3d + gisDomain: 3d + prometheus.enabled: true + providers: source: NFS destination: S3 From 44d23651f36fbdd58eac71d537c418e35e097a1a Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Wed, 27 Aug 2025 09:49:17 +0300 Subject: [PATCH 04/12] chore: add mc annotations --- helm/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm/values.yaml b/helm/values.yaml index d1f5a4b..2381e48 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -48,7 +48,9 @@ cloudProvider: dockerRegistryUrl: flavor: imagePullSecretName: + imagePullPolicy: + mcLabelsAndAnnotations: component: backend partOf: ingestion From b04c2fdbc9cb1271bf5ee2754c55cbc99a1fa542 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Wed, 27 Aug 2025 12:42:25 +0300 Subject: [PATCH 05/12] chore: fix cr comments --- helm/values.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/helm/values.yaml b/helm/values.yaml index 2381e48..a260449 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -7,13 +7,6 @@ global: tracing: {} metrics: {} - mcLabelsAndAnnotations: - component: backend - partOf: ingestion - owner: 3d - gisDomain: 3d - prometheus.enabled: true - providers: source: NFS destination: S3 @@ -56,7 +49,8 @@ mcLabelsAndAnnotations: partOf: ingestion owner: 3d gisDomain: 3d - prometheus.enabled: true + prometheus: + enabled: true image: repository: store-trigger From 62a322639cc302471c974307876c90b0dd713e00 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Sun, 31 Aug 2025 15:31:22 +0300 Subject: [PATCH 06/12] chore: downgrade pull request workflow --- .github/workflows/pull_request.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 5b80e12..40a5ef9 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -4,7 +4,7 @@ on: [pull_request] jobs: pull_request: - uses: MapColonies/shared-workflows/.github/workflows/pull_request.yaml@v5 + uses: MapColonies/shared-workflows/.github/workflows/pull_request.yaml@v4 secrets: inherit with: openApiFilePath: './bundledApi.yaml' From d92d130a04d93d253f76cd364a41601c9e66378f Mon Sep 17 00:00:00 2001 From: netanelC Date: Sun, 31 Aug 2025 16:03:06 +0300 Subject: [PATCH 07/12] ci: wip --- .github/workflows/pull_request.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 40a5ef9..6980f96 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -4,7 +4,8 @@ on: [pull_request] jobs: pull_request: - uses: MapColonies/shared-workflows/.github/workflows/pull_request.yaml@v4 + uses: MapColonies/shared-workflows/.github/workflows/pull_request.yaml@v5 secrets: inherit with: openApiFilePath: './bundledApi.yaml' + chartDirs: 'helm' From 909bc2bac335758abf8a2b7aee8ac31f961c1c58 Mon Sep 17 00:00:00 2001 From: netanelC Date: Sun, 31 Aug 2025 16:11:57 +0300 Subject: [PATCH 08/12] chore: wip From 3a5e14e6dfbe21717937ec9ce8b54930225a967d Mon Sep 17 00:00:00 2001 From: netanelC Date: Sun, 31 Aug 2025 16:14:59 +0300 Subject: [PATCH 09/12] chore: wip From 366916d48a7b3a11230c624345013e1354e815c6 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Sun, 31 Aug 2025 16:55:00 +0300 Subject: [PATCH 10/12] chore: fix helm lint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4587e4d..7943da7 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "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": "eslint . && helm dependency update ./helm && helm lint ./helm", "lint:fix": "eslint --fix . && helm lint ./helm", "test": "npm run test:unit && npm run test:integration", "prebuild": "npm run clean", From ef5c762e5f6ccf45c2453bd2a554c0065eeb2b72 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Sun, 31 Aug 2025 16:55:10 +0300 Subject: [PATCH 11/12] chore: fix helm lint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7943da7..e852938 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "prelint": "npm run format", "lint:openapi": "npx @redocly/cli lint --format=github-actions ./bundledApi.yaml", "lint": "eslint . && helm dependency update ./helm && helm lint ./helm", - "lint:fix": "eslint --fix . && helm lint ./helm", + "lint:fix": "eslint --fix . && helm dependency update ./helm && helm lint ./helm", "test": "npm run test:unit && npm run test:integration", "prebuild": "npm run clean", "build": "tsc --project tsconfig.build.json && npm run assets:copy", From ed5fec6a676e78ee322684754022058e5997f4b0 Mon Sep 17 00:00:00 2001 From: Asaf Masa Date: Mon, 1 Sep 2025 10:41:59 +0300 Subject: [PATCH 12/12] ci: fix workflow tests --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e852938..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 dependency update ./helm && helm lint ./helm", - "lint:fix": "eslint --fix . && helm dependency update ./helm && 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",