From 4c2c66d51867d3ea6833349f085b59587eda792f Mon Sep 17 00:00:00 2001 From: Varditn <38429204+TAvardit@users.noreply.github.com> Date: Wed, 26 Sep 2018 17:24:51 +0200 Subject: [PATCH] Add PVs manifests,Tolerations and updated docker images. (#7919) * Add PVs manifests,Tolerations and updated docker images. Signed-off-by: Vardit Natanson * Update images tag to support alpine 3.8.1 Signed-off-by: Vardit Natanson * lint and test-install fixes Signed-off-by: Vardit Natanson * Update appVersion in Chart.yaml Signed-off-by: Vardit Natanson --- stable/sonatype-nexus/Chart.yaml | 4 ++-- stable/sonatype-nexus/README.md | 2 ++ stable/sonatype-nexus/templates/backup-pv.yaml | 18 ++++++++++++++++++ .../sonatype-nexus/templates/deployment.yaml | 4 ++++ stable/sonatype-nexus/templates/pv.yaml | 18 ++++++++++++++++++ stable/sonatype-nexus/values.yaml | 14 +++++++++++--- 6 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 stable/sonatype-nexus/templates/backup-pv.yaml create mode 100644 stable/sonatype-nexus/templates/pv.yaml diff --git a/stable/sonatype-nexus/Chart.yaml b/stable/sonatype-nexus/Chart.yaml index 1480249466..25f0d2d796 100644 --- a/stable/sonatype-nexus/Chart.yaml +++ b/stable/sonatype-nexus/Chart.yaml @@ -1,6 +1,6 @@ name: sonatype-nexus -version: 1.7.0 -appVersion: 3.12.1-01 +version: 1.8.0 +appVersion: 3.13.0-01 description: Sonatype Nexus is an open source repository manager keywords: - artifacts diff --git a/stable/sonatype-nexus/README.md b/stable/sonatype-nexus/README.md index 360a3e09e7..048f2198d6 100644 --- a/stable/sonatype-nexus/README.md +++ b/stable/sonatype-nexus/README.md @@ -113,6 +113,7 @@ The following table lists the configurable parameters of the Nexus chart and the | `ingress.tls.enabled` | Enable TLS | `false` | | `ingress.tls.secretName` | Name of the secret storing TLS cert, `false` to use the Ingress' default certificate | `nexus-tls` | | `ingress.path` | Path for ingress rules. GCP users should set to `/*` | `/` | +| `tolerations` | tolerations list | `[]` | If `nexusProxy.env.cloudIamAuthEnabled` is set to `true` the following variables need to be configured @@ -125,6 +126,7 @@ If `nexusProxy.env.cloudIamAuthEnabled` is set to `true` the following variables | `nexusProxy.secrets.keystore` | base-64 encoded value of the keystore file needed for the proxy to sign user tokens. Example: cat keystore.jceks | base64 | `nil` | | `nexusProxy.secrets.password` | Password to the Java Keystore file | `nil` | + ```bash $ helm install --name my-release --set persistence.enabled=false stable/sonatype-nexus ``` diff --git a/stable/sonatype-nexus/templates/backup-pv.yaml b/stable/sonatype-nexus/templates/backup-pv.yaml new file mode 100644 index 0000000000..f44cab0fdf --- /dev/null +++ b/stable/sonatype-nexus/templates/backup-pv.yaml @@ -0,0 +1,18 @@ +{{- if .Values.nexusBackup.persistence.pdName -}} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ .Values.nexusBackup.persistence.pdName }} + labels: +{{ include "nexus.labels" . | indent 4 }} +spec: + capacity: + storage: {{ .Values.nexusBackup.persistence.storageSize }} + accessModes: + - ReadWriteOnce + claimRef: + name: {{ template "nexus.fullname" . }}-backup + gcePersistentDisk: + pdName: {{ .Values.nexusBackup.persistence.pdName }} + fsType: {{ .Values.nexusBackup.persistence.fsType }} +{{- end }} diff --git a/stable/sonatype-nexus/templates/deployment.yaml b/stable/sonatype-nexus/templates/deployment.yaml index 57202c5dd8..0434b0b2e8 100644 --- a/stable/sonatype-nexus/templates/deployment.yaml +++ b/stable/sonatype-nexus/templates/deployment.yaml @@ -166,3 +166,7 @@ spec: {{- else }} emptyDir: {} {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/stable/sonatype-nexus/templates/pv.yaml b/stable/sonatype-nexus/templates/pv.yaml new file mode 100644 index 0000000000..6b4d6a03ca --- /dev/null +++ b/stable/sonatype-nexus/templates/pv.yaml @@ -0,0 +1,18 @@ +{{- if .Values.persistence.pdName -}} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ .Values.persistence.pdName }} + labels: +{{ include "nexus.labels" . | indent 4 }} +spec: + capacity: + storage: {{ .Values.persistence.storageSize }} + accessModes: + - ReadWriteOnce + claimRef: + name: {{ template "nexus.fullname" . }}-data + gcePersistentDisk: + pdName: {{ .Values.persistence.pdName }} + fsType: {{ .Values.persistence.fsType }} +{{- end }} diff --git a/stable/sonatype-nexus/values.yaml b/stable/sonatype-nexus/values.yaml index 1109816997..8fb8eccefe 100644 --- a/stable/sonatype-nexus/values.yaml +++ b/stable/sonatype-nexus/values.yaml @@ -2,7 +2,7 @@ replicaCount: 1 nexus: imageName: quay.io/travelaudience/docker-nexus - imageTag: 3.12.1 + imageTag: 3.13.0_alpine_3.8.1 imagePullPolicy: IfNotPresent env: - name: install4jAddVmParams @@ -47,7 +47,7 @@ nexus: nexusProxy: imageName: quay.io/travelaudience/docker-nexus-proxy - imageTag: 2.1.0 + imageTag: 2.3.0 imagePullPolicy: IfNotPresent port: 8080 env: @@ -84,11 +84,14 @@ persistence: # "helm.sh/resource-policy": keep # storageClass: "-" storageSize: 8Gi + # If PersistentDisk already exists you can create a PV for it by including the 2 following keypairs. + # pdName: nexus-data-disk + # fsType: ext4 nexusBackup: enabled: false imageName: quay.io/travelaudience/docker-nexus-backup - imageTag: 1.2.0 + imageTag: 1.3.0 imagePullPolicy: IfNotPresent env: targetBucket: @@ -102,6 +105,9 @@ nexusBackup: # See comment above for information on setting the backup storageClass # storageClass: "-" storageSize: 8Gi + # If PersistentDisk already exists you can create a PV for it by including the 2 following keypairs. + # pdName: nexus-backup-disk + # fsType: ext4 ingress: enabled: false @@ -115,3 +121,5 @@ ingress: tls: enabled: true secretName: nexus-tls + +tolerations: []