Skip to content

Commit

Permalink
feat: add ability to define deployment strategy; add ci upgrade tests (
Browse files Browse the repository at this point in the history
…#38)

Signed-off-by: ericgraf <[email protected]>
  • Loading branch information
ericgraf authored Feb 7, 2024
1 parent 5c72473 commit ea975c5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion charts/zot/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions charts/zot/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions charts/zot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,10 @@ extraVolumes: []
# - name: data
# emptyDir: {}

# Deployment strategy type
strategy:
type: RollingUpdate
# rollingUpdate:
# maxUnavailable: 25%

podAnnotations: {}

0 comments on commit ea975c5

Please sign in to comment.