Skip to content

Commit

Permalink
Merge pull request #11 from adamrushuk/add-storageClass-helper
Browse files Browse the repository at this point in the history
Added storageClass helper
  • Loading branch information
adamrushuk authored Sep 11, 2020
2 parents 83c0b4f + 88a40b7 commit f02ea1a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/sonatype-nexus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions charts/sonatype-nexus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 1 addition & 2 deletions charts/sonatype-nexus/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 1 deletion charts/sonatype-nexus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: <storageClass>
## 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
Expand Down

0 comments on commit f02ea1a

Please sign in to comment.