Skip to content

Commit

Permalink
insert suggestions from reviews in helm#5180
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Ingenhaag <christian.ingenhaag@googlemail.com>
  • Loading branch information
chrisingenhaag committed Jan 27, 2019
1 parent f4bb1a9 commit 3fb125f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 10 deletions.
11 changes: 10 additions & 1 deletion stable/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@ Expand the name of the chart.
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "nextcloud.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
Expand Down Expand Up @@ -49,4 +58,4 @@ Create chart name and version as used by the chart label.
*/}}
{{- define "nextcloud.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
16 changes: 14 additions & 2 deletions stable/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ spec:
{{- end}}
{{- end }}
containers:
- name: {{ template "nextcloud.fullname" . }}
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- if .Values.internalDatabase.enabled }}
- name: SQLITE_DATABASE
Expand Down Expand Up @@ -121,6 +121,18 @@ spec:
- name: nextcloud-data
mountPath: /var/www/html/themes
subPath: themes
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
- name: nextcloud-data
{{- if .Values.persistence.enabled }}
Expand Down
27 changes: 20 additions & 7 deletions stable/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ image:
# pullSecrets:
# - myRegistrKeySecretName

nameOverride: ""
fullnameOverride: ""

# Number of replicas to be deployed
replicaCount: 1

Expand Down Expand Up @@ -120,7 +123,7 @@ service:
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
##
persistence:
enabled: true
enabled: false
## nextcloud data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
Expand All @@ -138,10 +141,20 @@ persistence:
accessMode: ReadWriteOnce
size: 8Gi

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}
# requests:
# memory: 512Mi
# cpu: 300m
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

nodeSelector: {}

tolerations: []

affinity: {}

0 comments on commit 3fb125f

Please sign in to comment.