diff --git a/charts/sonatype-nexus/Chart.yaml b/charts/sonatype-nexus/Chart.yaml index cf348b1..1369222 100644 --- a/charts/sonatype-nexus/Chart.yaml +++ b/charts/sonatype-nexus/Chart.yaml @@ -3,7 +3,7 @@ name: sonatype-nexus description: Sonatype Nexus is an open source repository manager type: application # This is the chart version -version: 0.2.5 +version: 0.2.6 # This is the version number of the application being deployed appVersion: 3.27.0 keywords: diff --git a/charts/sonatype-nexus/templates/_helpers.tpl b/charts/sonatype-nexus/templates/_helpers.tpl index f5d9f23..001b338 100644 --- a/charts/sonatype-nexus/templates/_helpers.tpl +++ b/charts/sonatype-nexus/templates/_helpers.tpl @@ -60,3 +60,16 @@ Create the name of the service account to use {{- default "default" .Values.serviceAccount.name }} {{- end }} {{- end }} + +{{/* +Return the proper Storage Class +*/}} +{{- define "nexus.storageClass" -}} +{{- if .Values.nexus.storageClass -}} + {{- if (eq "-" .Values.nexus.storageClass) -}} + {{- printf "storageClassName: \"\"" -}} + {{- else }} + {{- printf "storageClassName: %s" .Values.nexus.storageClass -}} + {{- end -}} +{{- end -}} +{{- end }} diff --git a/charts/sonatype-nexus/templates/statefulset.yaml b/charts/sonatype-nexus/templates/statefulset.yaml index 19e2b76..24751ad 100644 --- a/charts/sonatype-nexus/templates/statefulset.yaml +++ b/charts/sonatype-nexus/templates/statefulset.yaml @@ -77,8 +77,7 @@ spec: name: {{ template "sonatype-nexus.fullname" . }}-data spec: accessModes: [ "ReadWriteOnce" ] - # GitHub Action helm/kind-action uses: storageClassName: "standard" - # storageClassName: "" + {{ include "nexus.storageClass" . }} resources: requests: # minimum is 4Gi, but 8Gi recommended during testing diff --git a/charts/sonatype-nexus/values.yaml b/charts/sonatype-nexus/values.yaml index ed564e8..9b42e5f 100644 --- a/charts/sonatype-nexus/values.yaml +++ b/charts/sonatype-nexus/values.yaml @@ -4,13 +4,25 @@ nexus: baseDomain: domain.com + # certEmail is a valid email address used by Let's Encrypt. It does not have to be at the baseDomain. certEmail: certadmin@domain.com - storageSize: 8Gi + # The ports should only be changed if the nexus image uses a different port dockerPort: 5000 nexusPort: 8081 + storageSize: 8Gi + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # GitHub Action helm/kind-action uses: storageClassName: "standard" + # storageClass: "standard" + + # https://hub.docker.com/r/sonatype/nexus3/tags image: repository: sonatype/nexus3