diff --git a/packages/system/cozystack-controller/Makefile b/packages/system/cozystack-controller/Makefile index 815185ccb..22bc1fefa 100644 --- a/packages/system/cozystack-controller/Makefile +++ b/packages/system/cozystack-controller/Makefile @@ -4,7 +4,7 @@ NAMESPACE=cozy-system include ../../../scripts/common-envs.mk include ../../../scripts/package.mk -image: image-cozystack-controller +image: image-cozystack-controller update-version image-cozystack-controller: docker buildx build -f images/cozystack-controller/Dockerfile ../../.. \ @@ -18,3 +18,7 @@ image-cozystack-controller: IMAGE="$(REGISTRY)/cozystack-controller:$(call settag,$(TAG))@$$(yq e '."containerimage.digest"' images/cozystack-controller.json -o json -r)" \ yq -i '.cozystackController.image = strenv(IMAGE)' values.yaml rm -f images/cozystack-controller.json + +update-version: + TAG="$(call settag,$(TAG))" \ + yq -i '.cozystackController.cozystackVersion = strenv(TAG)' values.yaml diff --git a/packages/system/cozystack-controller/templates/deployment.yaml b/packages/system/cozystack-controller/templates/deployment.yaml index 1d0bd956d..33b309dfb 100644 --- a/packages/system/cozystack-controller/templates/deployment.yaml +++ b/packages/system/cozystack-controller/templates/deployment.yaml @@ -20,6 +20,7 @@ spec: - name: cozystack-controller image: "{{ .Values.cozystackController.image }}" args: + - --cozystack-version={{ .Values.cozystackController.cozystackVersion }} {{- if .Values.cozystackController.debug }} - --zap-log-level=debug {{- else }} diff --git a/packages/system/cozystack-controller/values.yaml b/packages/system/cozystack-controller/values.yaml index e29dc6c26..10528e034 100644 --- a/packages/system/cozystack-controller/values.yaml +++ b/packages/system/cozystack-controller/values.yaml @@ -2,3 +2,4 @@ cozystackController: image: ghcr.io/aenix-io/cozystack/cozystack-controller:latest@sha256:0638f77f16b778794bd8514a3c5a3c39408a078ad21a2ccc25c5fd8a1f66185f debug: false disableTelemetry: false + cozystackVersion: "latest"