Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to define deployment strategy #38

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: {}
Loading