From ae60bea36db6af7013699e3c0a76e83ff24692c2 Mon Sep 17 00:00:00 2001 From: Herman Jensen Date: Sat, 21 Dec 2024 12:35:54 +0100 Subject: [PATCH] feat: allow configurable deployment strategy (#163) * feat: allow configurable deployment strategy * ci: pin ubuntu version in lint-test.yaml * ci: update python version in lint-test.yaml --- .github/workflows/lint-test.yaml | 3 ++- README.md | 1 + charts/verdaccio/Chart.yaml | 2 +- charts/verdaccio/templates/deployment.yaml | 6 +++++- charts/verdaccio/values.yaml | 2 ++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 662c086..fad6917 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -21,7 +21,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: '3.x' + check-latest: true - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 diff --git a/README.md b/README.md index 205cd1f..c9b8fc9 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,7 @@ and their default values. | `priorityClass.name` | PriorityClassName to be specified in pod spec | `""` | | `replicaCount` | Desired number of pods | `1` | | `replicaCountEnabled` | Enable the replicaCount field | `true` | +| `strategy` | The deployment strategy field | If persistence is enabled, the strategy type is set to `Recreate`, otherwise `RollingUpdate` | | `livenessProbe` | Configuration of liveness probe | `{}` | | `readinessProbe` | Configuration of readiness probe | `{}` | | `resources` | CPU/Memory resource requests/limits | `{}` | diff --git a/charts/verdaccio/Chart.yaml b/charts/verdaccio/Chart.yaml index 2ac1e83..db252af 100644 --- a/charts/verdaccio/Chart.yaml +++ b/charts/verdaccio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: A lightweight private node.js proxy registry name: verdaccio -version: 4.25.1 +version: 4.26.0 appVersion: 6.0.4 home: https://verdaccio.org icon: https://cdn.verdaccio.dev/logos/default.png diff --git a/charts/verdaccio/templates/deployment.yaml b/charts/verdaccio/templates/deployment.yaml index c027a81..45ac832 100644 --- a/charts/verdaccio/templates/deployment.yaml +++ b/charts/verdaccio/templates/deployment.yaml @@ -18,7 +18,11 @@ spec: matchLabels: {{- include "verdaccio.selectorLabels" . | nindent 6 }} strategy: - {{- if .Values.persistence.enabled }} + {{- if .Values.strategy }} + {{- with .Values.strategy }} + {{- toYaml . | nindent 4}} + {{- end }} + {{- else if .Values.persistence.enabled }} type: Recreate rollingUpdate: null {{- else }} diff --git a/charts/verdaccio/values.yaml b/charts/verdaccio/values.yaml index a6d344d..d6cf50b 100644 --- a/charts/verdaccio/values.yaml +++ b/charts/verdaccio/values.yaml @@ -53,6 +53,8 @@ replicaCount: 1 revisionHistoryLimit: 10 +strategy: {} + ## Define Probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#configure-probes livenessProbe: {}