From 0fef5027fd8db0ea0fb61a720d6962434427108f Mon Sep 17 00:00:00 2001 From: Herman Jensen Date: Thu, 19 Dec 2024 11:32:38 +0100 Subject: [PATCH 1/3] feat: allow configurable deployment strategy --- README.md | 1 + charts/verdaccio/Chart.yaml | 2 +- charts/verdaccio/templates/deployment.yaml | 6 +++++- charts/verdaccio/values.yaml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) 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: {} From f2387edd81cbeaa0b331dddfb6e1df488c1b1afd Mon Sep 17 00:00:00 2001 From: Herman Jensen Date: Thu, 19 Dec 2024 19:38:01 +0100 Subject: [PATCH 2/3] ci: pin ubuntu version in lint-test.yaml --- .github/workflows/lint-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 662c086..55cf147 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -4,7 +4,7 @@ on: pull_request jobs: lint-test: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v4 From 2020b0563e8a4b98b5e6dfa11811212a6fc46e32 Mon Sep 17 00:00:00 2001 From: Herman Jensen Date: Thu, 19 Dec 2024 20:13:48 +0100 Subject: [PATCH 3/3] ci: update python version in lint-test.yaml --- .github/workflows/lint-test.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 55cf147..fad6917 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -4,7 +4,7 @@ on: pull_request jobs: lint-test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 @@ -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