From 91c7c01b26dead79c51a07fb1bdd5e58c0eb5fe2 Mon Sep 17 00:00:00 2001 From: Varditn <38429204+TAvardit@users.noreply.github.com> Date: Tue, 2 Oct 2018 19:18:18 +0200 Subject: [PATCH] add ability to configure deployment strategy (#8073) * add abillity to configure deployment strategy Signed-off-by: Vardit Natanson * bump chart version Signed-off-by: Vardit Natanson * update README Signed-off-by: Vardit Natanson * remove Whitespace Signed-off-by: Vardit Natanson * using pre-define values for namespace Signed-off-by: Vardit Natanson --- stable/sonatype-nexus/Chart.yaml | 2 +- stable/sonatype-nexus/README.md | 1 + stable/sonatype-nexus/templates/backup-pv.yaml | 1 + stable/sonatype-nexus/templates/deployment.yaml | 4 ++++ stable/sonatype-nexus/templates/pv.yaml | 1 + stable/sonatype-nexus/values.yaml | 6 ++++++ 6 files changed, 14 insertions(+), 1 deletion(-) diff --git a/stable/sonatype-nexus/Chart.yaml b/stable/sonatype-nexus/Chart.yaml index d2e3676a17..41d26a1483 100644 --- a/stable/sonatype-nexus/Chart.yaml +++ b/stable/sonatype-nexus/Chart.yaml @@ -1,5 +1,5 @@ name: sonatype-nexus -version: 1.9.0 +version: 1.10.0 appVersion: 3.13.0-01 description: Sonatype Nexus is an open source repository manager keywords: diff --git a/stable/sonatype-nexus/README.md b/stable/sonatype-nexus/README.md index c5e1738b8f..b14543395c 100644 --- a/stable/sonatype-nexus/README.md +++ b/stable/sonatype-nexus/README.md @@ -63,6 +63,7 @@ The following table lists the configurable parameters of the Nexus chart and the | Parameter | Description | Default | | ------------------------------------------ | ---------------------------------- | ----------------------------------------| | `replicaCount` | Number of Nexus service replicas | `1` | +| `deploymentStrategy` | Deployment Strategy | `rollingUpdate` | | `nexus.imageName` | Nexus image | `quay.io/travelaudience/docker-nexus` | | `nexus.imageTag` | Version of Nexus | `3.9.0` | | `nexus.imagePullPolicy` | Nexus image pull policy | `IfNotPresent` | diff --git a/stable/sonatype-nexus/templates/backup-pv.yaml b/stable/sonatype-nexus/templates/backup-pv.yaml index f44cab0fdf..ed6b302998 100644 --- a/stable/sonatype-nexus/templates/backup-pv.yaml +++ b/stable/sonatype-nexus/templates/backup-pv.yaml @@ -12,6 +12,7 @@ spec: - ReadWriteOnce claimRef: name: {{ template "nexus.fullname" . }}-backup + namespace: {{ .Release.Namespace }} gcePersistentDisk: pdName: {{ .Values.nexusBackup.persistence.pdName }} fsType: {{ .Values.nexusBackup.persistence.fsType }} diff --git a/stable/sonatype-nexus/templates/deployment.yaml b/stable/sonatype-nexus/templates/deployment.yaml index 0434b0b2e8..ba65c467c3 100644 --- a/stable/sonatype-nexus/templates/deployment.yaml +++ b/stable/sonatype-nexus/templates/deployment.yaml @@ -6,6 +6,10 @@ metadata: {{ include "nexus.labels" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} + {{- if .Values.deploymentStrategy }} + strategy: +{{ toYaml .Values.deploymentStrategy | indent 4 }} + {{- end }} selector: matchLabels: app: {{ template "nexus.name" . }} diff --git a/stable/sonatype-nexus/templates/pv.yaml b/stable/sonatype-nexus/templates/pv.yaml index 6b4d6a03ca..b9d9af3d7b 100644 --- a/stable/sonatype-nexus/templates/pv.yaml +++ b/stable/sonatype-nexus/templates/pv.yaml @@ -11,6 +11,7 @@ spec: accessModes: - ReadWriteOnce claimRef: + namespace: {{ .Release.Namespace }} name: {{ template "nexus.fullname" . }}-data gcePersistentDisk: pdName: {{ .Values.persistence.pdName }} diff --git a/stable/sonatype-nexus/values.yaml b/stable/sonatype-nexus/values.yaml index 339159c309..27a5353386 100644 --- a/stable/sonatype-nexus/values.yaml +++ b/stable/sonatype-nexus/values.yaml @@ -1,4 +1,10 @@ replicaCount: 1 +# By default deploymentStrategy is set to rollingUpdate with maxSurge of 25% and maxUnavailable of 25% . you can change type to `Recreate` or can uncomment `rollingUpdate` specification and adjust them to your usage. +deploymentStrategy: {} + # rollingUpdate: + # maxSurge: 25% + # maxUnavailable: 25% + # type: RollingUpdate nexus: imageName: quay.io/travelaudience/docker-nexus