From 8608f11ce8e0847fcd5dfdc6f13935abd35af131 Mon Sep 17 00:00:00 2001 From: Moritz Wiesinger Date: Wed, 22 Mar 2023 15:42:32 +0100 Subject: [PATCH] ci: fix release pipeline, add more things to release please (#1075) --- .github/workflows/CI.yaml | 4 +- .github/workflows/helm-checks.yaml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/validate-helm-docs.yml | 6 +- Makefile | 23 +++-- README.md | 2 +- .../content/en/docs/snippets/tasks/install.md | 2 +- helm/chart/README.md | 96 +++++++++---------- helm/chart/doc.yaml | 12 +-- klt-cert-manager/Makefile | 5 +- .../config/manager/kustomization.yaml | 13 ++- metrics-operator/Makefile | 5 +- .../config/manager/kustomization.yaml | 13 ++- operator/Makefile | 5 +- operator/config/manager/kustomization.yaml | 13 ++- release-please-config.json | 11 ++- scheduler/Makefile | 5 +- .../manifests/install/kustomization.yaml | 13 ++- 18 files changed, 131 insertions(+), 101 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 6b5d20bdfe..e8c4afc172 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -171,7 +171,7 @@ jobs: if: matrix.config.name != 'functions-runtime' working-directory: ./${{ matrix.config.folder }} env: - TAG: dev-${{ env.DATETIME }} + CHART_APPVERSION: dev-${{ env.DATETIME }} run: make release-manifests - name: Upload release.yaml for tests @@ -288,7 +288,7 @@ jobs: if: matrix.config.name != 'functions-runtime' working-directory: ./${{ matrix.config.folder }} env: - TAG: dev-${{ env.DATETIME }} + CHART_APPVERSION: dev-${{ env.DATETIME }} run: make release-manifests - name: Upload release.yaml diff --git a/.github/workflows/helm-checks.yaml b/.github/workflows/helm-checks.yaml index 0b18f5e630..d90983caa2 100644 --- a/.github/workflows/helm-checks.yaml +++ b/.github/workflows/helm-checks.yaml @@ -131,7 +131,7 @@ jobs: - name: Generate helm charts run: | - make helm-package RELEASE_REGISTRY=${{ env.RELEASE_REGISTRY }} TAG=dev-${{ env.DATETIME }} + make helm-package RELEASE_REGISTRY=${{ env.RELEASE_REGISTRY }} CHART_APPVERSION=dev-${{ env.DATETIME }} for file in $(find ./helm/chart/templates -type f -name "*.yaml"); do sed -i 's/{{ include "chart.fullname" . }}-//g' "$file" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92b2c81539..6e9b808c64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -163,7 +163,7 @@ jobs: - name: Create manifests env: RELEASE_REGISTRY: ghcr.keptn.sh/keptn - TAG: ${{ needs.release-please.outputs.tag_name }} + CHART_APPVERSION: ${{ needs.release-please.outputs.tag_name }} run: | cd scheduler make release-manifests diff --git a/.github/workflows/validate-helm-docs.yml b/.github/workflows/validate-helm-docs.yml index 0d50a8e871..532058ccaf 100644 --- a/.github/workflows/validate-helm-docs.yml +++ b/.github/workflows/validate-helm-docs.yml @@ -8,8 +8,6 @@ on: defaults: run: shell: bash -env: - CHART_APPVERSION: "0.6.0" # x-release-please-version jobs: check-helm-docs: name: Check helm documentation values @@ -24,7 +22,9 @@ jobs: node-version: 16 - name: Generate helm charts - run: make helm-package TAG="${{ env.CHART_APPVERSION }}" + env: + RELEASE_REGISTRY: ghcr.keptn.sh/keptn + run: make helm-package - name: Install readme generator run: | diff --git a/Makefile b/Makefile index 467f7968b3..c215b4495c 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CERT_MANAGER_VERSION ?= v1.11.0 KUSTOMIZE_VERSION?=v4.5.7 # renovate: datasource=github-tags depName=helm/helm HELM_VERSION ?= v3.11.2 -CHART_VERSION = v0.5.0 # x-release-please-version +CHART_APPVERSION ?= v0.7.0 # x-release-please-version # renovate: datasource=docker depName=cytopia/yamllint YAMLLINT_VERSION ?= alpine-1-0.14 @@ -60,10 +60,13 @@ $(KUSTOMIZE): $(LOCALBIN) release-helm-manifests: helmify echo "building helm overlay" kustomize build ./helm/overlay > helmchart.yaml + envsubst < helmchart.yaml > tmp.yaml; mv tmp.yaml helmchart.yaml cat helmchart.yaml | $(HELMIFY) -probes=true -image-pull-secrets=true -vv helm/chart .PHONY: helm-package -helm-package: build-release-manifests release-helm-manifests +helm-package: + $(MAKE) build-release-manifests CHART_APPVERSION=$(CHART_APPVERSION) RELEASE_REGISTRY=$(RELEASE_REGISTRY) + $(MAKE) release-helm-manifests CHART_APPVERSION=$(CHART_APPVERSION) RELEASE_REGISTRY=$(RELEASE_REGISTRY) .PHONY: build-release-manifests @@ -72,16 +75,16 @@ build-release-manifests: $(MAKE) -C klt-cert-manager generate $(MAKE) -C metrics-operator generate - $(MAKE) -C operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) - $(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) - $(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) - $(MAKE) -C metrics-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) + $(MAKE) -C operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) + $(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) + $(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) + $(MAKE) -C metrics-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION) .PHONY: build-deploy-operator build-deploy-operator: $(MAKE) -C operator release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) $(MAKE) -C operator push-local RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) - $(MAKE) -C operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) + $(MAKE) -C operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) CHART_APPVERSION=$(TAG) ARCH=$(ARCH) kubectl apply -f operator/config/rendered/release.yaml @@ -89,7 +92,7 @@ build-deploy-operator: build-deploy-metrics-operator: $(MAKE) -C metrics-operator release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) $(MAKE) -C metrics-operator push-local RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) - $(MAKE) -C metrics-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) + $(MAKE) -C metrics-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) CHART_APPVERSION=$(TAG) ARCH=$(ARCH) kubectl apply -f metrics-operator/config/rendered/release.yaml @@ -97,7 +100,7 @@ build-deploy-metrics-operator: build-deploy-scheduler: $(MAKE) -C scheduler release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) $(MAKE) -C scheduler push-local RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) - $(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) + $(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) CHART_APPVERSION=$(TAG) ARCH=$(ARCH) kubectl create namespace keptn-lifecycle-toolkit-system --dry-run=client -o yaml | kubectl apply -f - kubectl apply -f scheduler/config/rendered/release.yaml @@ -105,7 +108,7 @@ build-deploy-scheduler: build-deploy-certmanager: $(MAKE) -C klt-cert-manager release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) $(MAKE) -C klt-cert-manager push-local RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) - $(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) + $(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) CHART_APPVERSION=$(TAG) ARCH=$(ARCH) kubectl create namespace keptn-lifecycle-toolkit-system --dry-run=client -o yaml | kubectl apply -f - kubectl apply -f klt-cert-manager/config/rendered/release.yaml diff --git a/README.md b/README.md index e96271255b..99fd6c95ef 100644 --- a/README.md +++ b/README.md @@ -493,7 +493,7 @@ Instead, if you want to build and deploy the operator into your cluster directly ```bash RELEASE_REGISTRY= # (optional)ARCH= -# (optional)TAG= +# (optional)CHART_APPVERSION= # Build and deploy the dev images to the current kubernetes cluster make build-deploy-dev-environment diff --git a/docs/content/en/docs/snippets/tasks/install.md b/docs/content/en/docs/snippets/tasks/install.md index 159f8e5652..fdc64357c8 100644 --- a/docs/content/en/docs/snippets/tasks/install.md +++ b/docs/content/en/docs/snippets/tasks/install.md @@ -43,7 +43,7 @@ with a command like the following: ```shell -kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.6.0/manifest.yaml +kubectl apply -f https://github.com/keptn/lifecycle-toolkit/releases/download/v0.7.0/manifest.yaml kubectl wait --for=condition=Available deployment/lifecycle-operator -n keptn-lifecycle-toolkit-system --timeout=120s ``` diff --git a/helm/chart/README.md b/helm/chart/README.md index 20c1fd56ca..f459266109 100644 --- a/helm/chart/README.md +++ b/helm/chart/README.md @@ -13,7 +13,7 @@ checks | `scheduler.scheduler.containerSecurityContext` | Sets security context | | | `scheduler.scheduler.env.otelCollectorUrl` | sets url for open telemetry collector | `otel-collector:4317` | | `scheduler.scheduler.image.repository` | set image repository for scheduler | `ghcr.keptn.sh/keptn/scheduler` | -| `scheduler.scheduler.image.tag` | set image tag for scheduler | `v0.7.0` | +| `scheduler.scheduler.image.tag` | set image tag for scheduler | `v0.7.0` | | `scheduler.scheduler.imagePullPolicy` | set image pull policy for scheduler | `Always` | | `scheduler.scheduler.livenessProbe` | customizable liveness probe for the scheduler | | | `scheduler.scheduler.readinessProbe` | customizable readiness probe for the scheduler | | @@ -42,15 +42,15 @@ checks ### Keptn Certificate Operator controller -| Name | Description | Value | -| ------------------------------------------------------ | ------------------------------------------------ | ------------------------------------------ | -| `certificateOperator.manager.containerSecurityContext` | Sets security context for the cert manager | | -| `certificateOperator.manager.image.repository` | specify repo for manager image | `ghcr.keptn.sh/keptn/certificate-operator` | -| `certificateOperator.manager.image.tag` | select tag for manager container | `v0.7.0` | -| `certificateOperator.manager.imagePullPolicy` | select image pull policy for manager container | `Always` | -| `certificateOperator.manager.livenessProbe` | custom RBAC proxy liveness probe | | -| `certificateOperator.manager.readinessProbe` | custom manager readiness probe | | -| `certificateOperator.manager.resources` | custom limits and requests for manager container | | +| Name | Description | Value | +| ------------------------------------------------------ | ----------------------------------------------------------------- | ------------------------------------------ | +| `certificateOperator.manager.containerSecurityContext` | Sets security context for the cert manager | | +| `certificateOperator.manager.image.repository` | specify repo for manager image | `ghcr.keptn.sh/keptn/certificate-operator` | +| `certificateOperator.manager.image.tag` | select tag for manager container | `v0.7.0` | +| `certificateOperator.manager.imagePullPolicy` | select image pull policy for manager container | `Always` | +| `certificateOperator.manager.livenessProbe` | custom RBAC proxy liveness probe | | +| `certificateOperator.manager.readinessProbe` | custom manager readiness probe | | +| `certificateOperator.manager.resources` | custom limits and requests for manager container | | ### Keptn Lifecycle Operator common @@ -69,32 +69,32 @@ checks ### Keptn Lifecycle Operator controller -| Name | Description | Value | -| ----------------------------------------------------------------------------- | ------------------------------------------------------- | ---------------------------------------------- | -| `lifecycleOperator.manager.containerSecurityContext` | Sets security context privileges | | -| `lifecycleOperator.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` | -| `lifecycleOperator.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` | -| `lifecycleOperator.manager.containerSecurityContext.privileged` | | `false` | -| `lifecycleOperator.manager.containerSecurityContext.runAsGroup` | | `65532` | -| `lifecycleOperator.manager.containerSecurityContext.runAsNonRoot` | | `true` | -| `lifecycleOperator.manager.containerSecurityContext.runAsUser` | | `65532` | -| `lifecycleOperator.manager.containerSecurityContext.seccompProfile.type` | | `RuntimeDefault` | -| `lifecycleOperator.manager.env.keptnAppControllerLogLevel` | sets the log level of Keptn App Controller | `0` | -| `lifecycleOperator.manager.env.keptnAppVersionControllerLogLevel` | sets the log level of Keptn AppVersion Controller | `0` | -| `lifecycleOperator.manager.env.keptnEvaluationControllerLogLevel` | sets the log level of Keptn Evaluation Controller | `0` | -| `lifecycleOperator.manager.env.keptnTaskControllerLogLevel` | sets the log level of Keptn Task Controller | `0` | -| `lifecycleOperator.manager.env.keptnTaskDefinitionControllerLogLevel` | sets the log level of Keptn TaskDefinition Controller | `0` | -| `lifecycleOperator.manager.env.keptnWorkloadControllerLogLevel` | sets the log level of Keptn Workload Controller | `0` | -| `lifecycleOperator.manager.env.keptnWorkloadInstanceControllerLogLevel` | sets the log level of Keptn WorkloadInstance Controller | `0` | -| `lifecycleOperator.manager.env.optionsControllerLogLevel` | sets the log level of Keptn Options Controller | `0` | -| `lifecycleOperator.manager.env.otelCollectorUrl` | Sets the URL for the open telemetry collector | `otel-collector:4317` | -| `lifecycleOperator.manager.env.functionRunnerImage` | specify image for task runtime | `ghcr.keptn.sh/keptn/functions-runtime:v0.7.0` | -| `lifecycleOperator.manager.image.repository` | specify registry for manager image | `ghcr.keptn.sh/keptn/lifecycle-operator` | -| `lifecycleOperator.manager.image.tag` | select tag for manager image | `v0.7.0` | -| `lifecycleOperator.manager.imagePullPolicy` | specify pull policy for manager image | `Always` | -| `lifecycleOperator.manager.livenessProbe` | custom livenessprobe for manager container | | -| `lifecycleOperator.manager.readinessProbe` | custom readinessprobe for manager container | | -| `lifecycleOperator.manager.resources` | specify limits and requests for manager container | | +| Name | Description | Value | +| ----------------------------------------------------------------------------- | --------------------------------------------------------------- | ---------------------------------------------- | +| `lifecycleOperator.manager.containerSecurityContext` | Sets security context privileges | | +| `lifecycleOperator.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` | +| `lifecycleOperator.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` | +| `lifecycleOperator.manager.containerSecurityContext.privileged` | | `false` | +| `lifecycleOperator.manager.containerSecurityContext.runAsGroup` | | `65532` | +| `lifecycleOperator.manager.containerSecurityContext.runAsNonRoot` | | `true` | +| `lifecycleOperator.manager.containerSecurityContext.runAsUser` | | `65532` | +| `lifecycleOperator.manager.containerSecurityContext.seccompProfile.type` | | `RuntimeDefault` | +| `lifecycleOperator.manager.env.keptnAppControllerLogLevel` | sets the log level of Keptn App Controller | `0` | +| `lifecycleOperator.manager.env.keptnAppVersionControllerLogLevel` | sets the log level of Keptn AppVersion Controller | `0` | +| `lifecycleOperator.manager.env.keptnEvaluationControllerLogLevel` | sets the log level of Keptn Evaluation Controller | `0` | +| `lifecycleOperator.manager.env.keptnTaskControllerLogLevel` | sets the log level of Keptn Task Controller | `0` | +| `lifecycleOperator.manager.env.keptnTaskDefinitionControllerLogLevel` | sets the log level of Keptn TaskDefinition Controller | `0` | +| `lifecycleOperator.manager.env.keptnWorkloadControllerLogLevel` | sets the log level of Keptn Workload Controller | `0` | +| `lifecycleOperator.manager.env.keptnWorkloadInstanceControllerLogLevel` | sets the log level of Keptn WorkloadInstance Controller | `0` | +| `lifecycleOperator.manager.env.optionsControllerLogLevel` | sets the log level of Keptn Options Controller | `0` | +| `lifecycleOperator.manager.env.otelCollectorUrl` | Sets the URL for the open telemetry collector | `otel-collector:4317` | +| `lifecycleOperator.manager.env.functionRunnerImage` | specify image for task runtime | `ghcr.keptn.sh/keptn/functions-runtime:v0.7.0` | +| `lifecycleOperator.manager.image.repository` | specify registry for manager image | `ghcr.keptn.sh/keptn/lifecycle-operator` | +| `lifecycleOperator.manager.image.tag` | select tag for manager image | `v0.7.0` | +| `lifecycleOperator.manager.imagePullPolicy` | specify pull policy for manager image | `Always` | +| `lifecycleOperator.manager.livenessProbe` | custom livenessprobe for manager container | | +| `lifecycleOperator.manager.readinessProbe` | custom readinessprobe for manager container | | +| `lifecycleOperator.manager.resources` | specify limits and requests for manager container | | ### Keptn Metrics Operator common @@ -132,18 +132,18 @@ checks ### Keptn Metrics Operator controller -| Name | Description | Value | -| --------------------------------------------------------------------------- | ------------------------------------------------- | -------------------------------------- | -| `metricsOperator.manager.containerSecurityContext` | Sets security context privileges | | -| `metricsOperator.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` | -| `metricsOperator.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` | -| `metricsOperator.manager.image.repository` | specify registry for manager image | `ghcr.keptn.sh/keptn/metrics-operator` | -| `metricsOperator.manager.image.tag` | select tag for manager image | `v0.7.0` | -| `metricsOperator.manager.env.exposeKeptnMetrics` | enable metrics exporter | `true` | -| `metricsOperator.manager.env.metricsControllerLogLevel` | sets the log level of Metrics Controller | `0` | -| `metricsOperator.manager.livenessProbe` | custom livenessprobe for manager container | | -| `metricsOperator.manager.readinessProbe` | custom readinessprobe for manager container | | -| `metricsOperator.manager.resources` | specify limits and requests for manager container | | +| Name | Description | Value | +| --------------------------------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------- | +| `metricsOperator.manager.containerSecurityContext` | Sets security context privileges | | +| `metricsOperator.manager.containerSecurityContext.allowPrivilegeEscalation` | | `false` | +| `metricsOperator.manager.containerSecurityContext.capabilities.drop` | | `["ALL"]` | +| `metricsOperator.manager.image.repository` | specify registry for manager image | `ghcr.keptn.sh/keptn/metrics-operator` | +| `metricsOperator.manager.image.tag` | select tag for manager image | `v0.7.0` | +| `metricsOperator.manager.env.exposeKeptnMetrics` | enable metrics exporter | `true` | +| `metricsOperator.manager.env.metricsControllerLogLevel` | sets the log level of Metrics Controller | `0` | +| `metricsOperator.manager.livenessProbe` | custom livenessprobe for manager container | | +| `metricsOperator.manager.readinessProbe` | custom readinessprobe for manager container | | +| `metricsOperator.manager.resources` | specify limits and requests for manager container | | ### Global diff --git a/helm/chart/doc.yaml b/helm/chart/doc.yaml index 4445d55d0c..21ffc56149 100644 --- a/helm/chart/doc.yaml +++ b/helm/chart/doc.yaml @@ -11,7 +11,7 @@ ## @param scheduler.scheduler.env.otelCollectorUrl sets url for open telemetry collector ## @param scheduler.scheduler.image.repository set image repository for scheduler -## @param scheduler.scheduler.image.tag set image tag for scheduler +## @param scheduler.scheduler.image.tag set image tag for scheduler ## @param scheduler.scheduler.imagePullPolicy set image pull policy for scheduler ## @extra scheduler.scheduler.livenessProbe customizable liveness probe for the scheduler @@ -65,7 +65,7 @@ ## @skip certificateOperator.manager.containerSecurityContext.seccompProfile.type ## @param certificateOperator.manager.image.repository specify repo for manager image -## @param certificateOperator.manager.image.tag select tag for manager container +## @param certificateOperator.manager.image.tag select tag for manager container ## @param certificateOperator.manager.imagePullPolicy select image pull policy for manager container ## @extra certificateOperator.manager.livenessProbe custom RBAC proxy liveness probe @@ -127,11 +127,11 @@ ## @param lifecycleOperator.manager.env.optionsControllerLogLevel sets the log level of Keptn Options Controller ## @param lifecycleOperator.manager.env.otelCollectorUrl Sets the URL for the open telemetry collector -## @param lifecycleOperator.manager.env.functionRunnerImage specify image for task runtime +## @param lifecycleOperator.manager.env.functionRunnerImage specify image for task runtime ## @param lifecycleOperator.manager.image.repository specify registry for manager image -## @param lifecycleOperator.manager.image.tag select tag for manager image -## @param lifecycleOperator.manager.imagePullPolicy specify pull policy for manager image +## @param lifecycleOperator.manager.image.tag select tag for manager image +## @param lifecycleOperator.manager.imagePullPolicy specify pull policy for manager image ## @extra lifecycleOperator.manager.livenessProbe custom livenessprobe for manager container ## @skip lifecycleOperator.manager.livenessProbe.httpGet.path @@ -195,7 +195,7 @@ ## @param metricsOperator.manager.image.repository specify registry for manager image -## @param metricsOperator.manager.image.tag select tag for manager image +## @param metricsOperator.manager.image.tag select tag for manager image ## @param metricsOperator.manager.env.exposeKeptnMetrics enable metrics exporter ## @param metricsOperator.manager.env.metricsControllerLogLevel sets the log level of Metrics Controller diff --git a/klt-cert-manager/Makefile b/klt-cert-manager/Makefile index 6e1b455d51..50f9ea8c7a 100644 --- a/klt-cert-manager/Makefile +++ b/klt-cert-manager/Makefile @@ -6,8 +6,9 @@ RELEASE_REGISTRY?=ghcr.io/keptn RELEASE_TIME=$(shell date +%Y%m%d%s) BUILD_TIME=$(shell date -u "+%F_%T") RELEASE_VERSION?=$(RELEASE_TIME)-v0.24.3#$(shell git describe --tags --match "v*") -TAG?=latest +TAG?="v0.7.0" # x-release-please-version RELEASE_IMAGE:=certificate-operator:$(TAG) +CHART_APPVERSION?="" ARCHS = amd64 arm64 COMMONENVVAR=GOOS=$(shell uname -s | tr A-Z a-z) @@ -185,5 +186,5 @@ push-local: .PHONY: release-manifests release-manifests: - cd config/manager && kustomize edit set image controller=$(RELEASE_REGISTRY)/$(RELEASE_IMAGE) kustomize build config/default > config/rendered/release.yaml + envsubst < config/rendered/release.yaml > tmp.yaml; mv tmp.yaml config/rendered/release.yaml diff --git a/klt-cert-manager/config/manager/kustomization.yaml b/klt-cert-manager/config/manager/kustomization.yaml index 74bb0e1730..8667c921b3 100644 --- a/klt-cert-manager/config/manager/kustomization.yaml +++ b/klt-cert-manager/config/manager/kustomization.yaml @@ -2,7 +2,12 @@ resources: - manager.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -images: -- name: controller - newName: ghcr.keptn.sh/keptn/certificate-operator - newTag: v0.7.0 +patches: + - patch: | + - op: replace + path: '/spec/template/spec/containers/0/image' + value: '${RELEASE_REGISTRY}/certificate-operator:${CHART_APPVERSION}' + target: + kind: Deployment + name: certificate-operator + namespace: system diff --git a/metrics-operator/Makefile b/metrics-operator/Makefile index ceff40078a..f00c155898 100644 --- a/metrics-operator/Makefile +++ b/metrics-operator/Makefile @@ -7,8 +7,9 @@ RELEASE_REGISTRY?=ghcr.io/keptn RELEASE_TIME=$(shell date +%Y%m%d%s) BUILD_TIME=$(shell date -u "+%F_%T") RELEASE_VERSION?=$(RELEASE_TIME)-v0.24.3#$(shell git describe --tags --match "v*") -TAG?=latest +TAG?="v0.7.0" # x-release-please-version RELEASE_IMAGE:=metrics-operator:$(TAG) +CHART_APPVERSION?="" ARCHS = amd64 arm64 COMMONENVVAR=GOOS=$(shell uname -s | tr A-Z a-z) @@ -110,9 +111,9 @@ uninstall: manifests ## Uninstall CRDs from the K8s cluster specified in ~/.kube .PHONY: release-manifests release-manifests: manifests - cd config/manager && kustomize edit set image controller=$(RELEASE_REGISTRY)/$(RELEASE_IMAGE) echo "building default overlay" kustomize build config/default > config/rendered/release.yaml + envsubst < config/rendered/release.yaml > tmp.yaml; mv tmp.yaml config/rendered/release.yaml .PHONY: deploy deploy: manifests ## Deploy controller to the K8s cluster specified in ~/.kube/config. diff --git a/metrics-operator/config/manager/kustomization.yaml b/metrics-operator/config/manager/kustomization.yaml index a4b14a7353..5e2685dff0 100644 --- a/metrics-operator/config/manager/kustomization.yaml +++ b/metrics-operator/config/manager/kustomization.yaml @@ -9,7 +9,12 @@ configMapGenerator: name: metrics-manager-config apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -images: -- name: controller - newName: ghcr.keptn.sh/keptn/metrics-operator - newTag: v0.7.0 +patches: + - patch: | + - op: replace + path: '/spec/template/spec/containers/0/image' + value: '${RELEASE_REGISTRY}/metrics-operator:${CHART_APPVERSION}' + target: + kind: Deployment + name: metrics-operator + namespace: system diff --git a/operator/Makefile b/operator/Makefile index 32feeac99d..3951c12ff3 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -7,8 +7,9 @@ RELEASE_REGISTRY?=ghcr.io/keptn RELEASE_TIME=$(shell date +%Y%m%d%s) BUILD_TIME=$(shell date -u "+%F_%T") RELEASE_VERSION?=$(RELEASE_TIME)-v0.24.3#$(shell git describe --tags --match "v*") -TAG?=latest +TAG?="v0.7.0" # x-release-please-version RELEASE_IMAGE:=lifecycle-operator:$(TAG) +CHART_APPVERSION?="" ARCHS = amd64 arm64 COMMONENVVAR=GOOS=$(shell uname -s | tr A-Z a-z) @@ -149,9 +150,9 @@ uninstall: manifests ## Uninstall CRDs from the K8s cluster specified in ~/.kube .PHONY: release-manifests release-manifests: manifests - cd config/manager && kustomize edit set image controller=$(RELEASE_REGISTRY)/$(RELEASE_IMAGE) echo "building default overlay" kustomize build config/default > config/rendered/release.yaml + envsubst < config/rendered/release.yaml > tmp.yaml; mv tmp.yaml config/rendered/release.yaml .PHONY: deploy deploy: manifests ## Deploy controller to the K8s cluster specified in ~/.kube/config. diff --git a/operator/config/manager/kustomization.yaml b/operator/config/manager/kustomization.yaml index a2c0e65175..30c41d545a 100644 --- a/operator/config/manager/kustomization.yaml +++ b/operator/config/manager/kustomization.yaml @@ -9,7 +9,12 @@ configMapGenerator: name: lifecycle-manager-config apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -images: -- name: controller - newName: ghcr.keptn.sh/keptn/lifecycle-operator - newTag: v0.7.0 +patches: +- patch: | + - op: replace + path: '/spec/template/spec/containers/0/image' + value: '${RELEASE_REGISTRY}/lifecycle-operator:${CHART_APPVERSION}' + target: + kind: Deployment + name: lifecycle-operator + namespace: system diff --git a/release-please-config.json b/release-please-config.json index ccc9e4705f..e999c1643e 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -11,12 +11,15 @@ "extra-files": [ "README.md", "operator/config/manager/manager.yaml", - "examples/support/argo/Makefile", - "examples/support/observability/Makefile", "helm/chart/Chart.yaml", - ".github/workflows/validate-helm-docs.yml", "Makefile", - "docs/content/en/docs/snippets/tasks/install.md" + "operator/Makefile", + "scheduler/Makefile", + "klt-cert-manager/Makefile", + "metrics-operator/Makefile", + "docs/content/en/docs/snippets/tasks/install.md", + "helm/chart/values.yaml", + "helm/chart/README.md" ], "changelog-sections": [ { diff --git a/scheduler/Makefile b/scheduler/Makefile index 753a2b0f14..7e0feb7410 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -15,7 +15,8 @@ ARCHS = amd64 arm64 COMMONENVVAR=GOOS=$(shell uname -s | tr A-Z a-z) BUILDENVVAR=CGO_ENABLED=0 -TAG?=latest +TAG?="v0.7.0" # x-release-please-version +CHART_APPVERSION?="" LOCAL_REGISTRY=localhost:5000/scheduler-plugins LOCAL_IMAGE=kube-scheduler:latest @@ -100,8 +101,8 @@ $(KUSTOMIZE): $(LOCALBIN) .PHONY: release-manifests release-manifests: - cd manifests/install && kustomize edit set image scheduler=$(RELEASE_REGISTRY)/$(RELEASE_IMAGE) kustomize build manifests/install > config/rendered/release.yaml + envsubst < config/rendered/release.yaml > tmp.yaml; mv tmp.yaml config/rendered/release.yaml envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. $(ENVTEST): $(LOCALBIN) diff --git a/scheduler/manifests/install/kustomization.yaml b/scheduler/manifests/install/kustomization.yaml index 87add61d91..10bc0b13b7 100644 --- a/scheduler/manifests/install/kustomization.yaml +++ b/scheduler/manifests/install/kustomization.yaml @@ -11,7 +11,12 @@ configMapGenerator: name: scheduler-config apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -images: -- name: scheduler - newName: ghcr.keptn.sh/keptn/scheduler - newTag: v0.7.0 +patches: + - patch: | + - op: replace + path: '/spec/template/spec/containers/0/image' + value: '${RELEASE_REGISTRY}/scheduler:${CHART_APPVERSION}' + target: + kind: Deployment + name: scheduler + namespace: keptn-lifecycle-toolkit-system