diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5b4d69e..0a947a8 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -63,7 +63,11 @@ jobs: do echo "Running test $(pwd)/${TEST_DIR}" ct install --target-branch ${{ env.TARGET_BRANCH }} --charts $(pwd)/${TEST_DIR} - done + done + - name: Run an upgrade test + if: steps.list-changed.outputs.changed == 'true' || github.event_name == 'push' + run: | + ct install --upgrade --target-branch ${{ env.TARGET_BRANCH }} - if: github.event_name == 'push' && github.ref_name == 'main' name: Run chart-releaser uses: helm/chart-releaser-action@v1.4.0 diff --git a/charts/zot/Chart.yaml b/charts/zot/Chart.yaml index 7a0b1f6..563e11a 100644 --- a/charts/zot/Chart.yaml +++ b/charts/zot/Chart.yaml @@ -3,4 +3,4 @@ appVersion: v2.0.2-rc1 description: A Helm chart for Kubernetes name: zot type: application -version: 0.1.48 +version: 0.1.49 diff --git a/charts/zot/templates/deployment.yaml b/charts/zot/templates/deployment.yaml index 0d29c5c..8918bc0 100644 --- a/charts/zot/templates/deployment.yaml +++ b/charts/zot/templates/deployment.yaml @@ -6,6 +6,10 @@ metadata: {{- include "zot.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} + {{- with .Values.strategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} selector: matchLabels: {{- include "zot.selectorLabels" . | nindent 6 }} @@ -18,6 +22,9 @@ spec: {{- if and .Values.mountConfig .Values.configFiles }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- end }} + {{- if .Values.forceRoll }} + rollme: {{ randAlphaNum 5 | quote }} + {{- end }} labels: {{- include "zot.selectorLabels" . | nindent 8 }} spec: diff --git a/charts/zot/values.yaml b/charts/zot/values.yaml index 46e0d3b..ae42407 100644 --- a/charts/zot/values.yaml +++ b/charts/zot/values.yaml @@ -172,4 +172,10 @@ extraVolumes: [] # - name: data # emptyDir: {} +# Deployment strategy type +strategy: + type: RollingUpdate +# rollingUpdate: +# maxUnavailable: 25% + podAnnotations: {}