From c8271107a9b26d23c3c8fbc94eabf6ec5dded846 Mon Sep 17 00:00:00 2001 From: Christoph Hamsen Date: Fri, 2 Feb 2024 00:45:04 +0100 Subject: [PATCH] build: fix versioning --- Makefile | 4 ++-- charts/semgr8s/Chart.yaml | 4 ++-- charts/semgr8s/templates/deployment.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c078174..d06e2cb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ webhookName := semgr8s image := $(shell yq e '.deployment.image.repository' charts/semgr8s/values.yaml) version := $(shell yq e '.appVersion' charts/semgr8s/Chart.yaml) -tag := $(image):$(version) +tag := $(image):v$(version) ns := semgr8ns @@ -26,7 +26,7 @@ install: @echo "####################" @echo "## $(@)" @echo "####################" - helm install semgr8s helm --create-namespace --namespace $(ns) + helm install semgr8s charts/semgr8s --create-namespace --namespace $(ns) .PHONY:uninstall uninstall: diff --git a/charts/semgr8s/Chart.yaml b/charts/semgr8s/Chart.yaml index 9c7cbe4..e4cb80b 100644 --- a/charts/semgr8s/Chart.yaml +++ b/charts/semgr8s/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: semgr8s description: Semgrep-based Policy Controller for Kubernetes type: application -version: 0.1.1 -appVersion: "0.1.1" +version: 0.1.0 +appVersion: "0.1.0" keywords: - kubernetes - admission controller diff --git a/charts/semgr8s/templates/deployment.yaml b/charts/semgr8s/templates/deployment.yaml index fada6f0..e8a97f5 100644 --- a/charts/semgr8s/templates/deployment.yaml +++ b/charts/semgr8s/templates/deployment.yaml @@ -29,7 +29,7 @@ spec: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.deployment.securityContext | nindent 12 }} - image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag | default .Chart.AppVersion }}" + image: "{{ .Values.deployment.image.repository }}:{{ .Values.deployment.image.tag | default (print "v" .Chart.AppVersion) }}" imagePullPolicy: {{ .Values.deployment.image.pullPolicy }} ports: - name: http