Configurable nextcloud lifecycle hooks and extra environment (#19020)

* [stable/nextcloud] add configurable lifecycle hooks

Signed-off-by: Frederik Wagner <Frederik.Wagner@smartify-it.de>

* [stable/nextcloud] add configurable extra environment

Signed-off-by: Frederik Wagner <Frederik.Wagner@smartify-it.de>

* [stable/nextcloud] update chart version

Signed-off-by: Frederik Wagner <Frederik.Wagner@smartify-it.de>
This commit is contained in:
Frederik Wagner
2019-11-20 08:43:19 -08:00
committed by Kubernetes Prow Robot
parent 9c51832aed
commit 2bade6ea92
4 changed files with 40 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: nextcloud
version: 1.8.0
version: 1.8.1
appVersion: 17.0.0
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
+4 -1
View File
@@ -54,7 +54,7 @@ The following table lists the configurable parameters of the nextcloud chart and
| `ingress.enabled` | Enable use of ingress controllers | `false` |
| `ingress.servicePort` | Ingress' backend servicePort | `http` |
| `ingress.annotations` | An array of service annotations | `nil` |
| `ingress.labels` | An array of service labels | `nil` |
| `ingress.labels` | An array of service labels | `nil` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `nextcloud.host` | nextcloud host to create application URLs | `nextcloud.kube.home` |
| `nextcloud.username` | User of the application | `admin` |
@@ -80,6 +80,9 @@ The following table lists the configurable parameters of the nextcloud chart and
| `nextcloud.defaultConfigs.\.apps\.config\.php` | Default configuration for apps | `true` |
| `nextcloud.defaultConfigs.\.autoconfig\.php` | Default auto-configuration for databases | `true` |
| `nextcloud.defaultConfigs.\.smtp\.config\.php` | Default configuration for smtp | `true` |
| `nextcloud.extraEnv` | specify additional environment variables | `{}` |
| `lifecycle.postStartCommand` | Specify deployment lifecycle hook postStartCommand | `nil` |
| `lifecycle.preStopCommand` | Specify deployment lifecycle hook preStopCommand | `nil` |
| `internalDatabase.enabled` | Whether to use internal sqlite database | `true` |
| `internalDatabase.database` | Name of the existing database | `nextcloud` |
| `externalDatabase.enabled` | Whether to use external database | `false` |
@@ -34,6 +34,21 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.lifecycle }}
lifecycle:
{{- if .Values.lifecycle.postStartCommand }}
postStart:
exec:
command:
{{- toYaml .Values.lifecycle.postStartCommand | nindent 16 -}}
{{- end }}
{{- if .Values.lifecycle.preStopCommand }}
preStop:
exec:
command:
{{- toYaml .Values.lifecycle.preStopCommand | nindent 16 -}}
{{- end }}
{{- end }}
env:
{{- if .Values.internalDatabase.enabled }}
- name: SQLITE_DATABASE
@@ -138,6 +153,9 @@ spec:
- name: REDIS_HOST_PORT
value: {{ .Values.redis.redisPort | quote }}
{{- end }}
{{- if .Values.nextcloud.extraEnv }}
{{ toYaml .Values.nextcloud.extraEnv | indent 8 }}
{{- end }}
ports:
- name: http
containerPort: 80
+17
View File
@@ -58,6 +58,13 @@ ingress:
# - nextcloud.kube.home
labels: {}
# Allow configuration of lifecycle hooks
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/
lifecycle: {}
# postStartCommand: []
# preStopCommand: []
nextcloud:
host: nextcloud.kube.home
username: admin
@@ -121,6 +128,16 @@ nextcloud:
# )
# );
##
## Extra environment variables
extraEnv:
# - name: SOME_SECRET_ENV
# valueFrom:
# secretKeyRef:
# name: nextcloud
# key: secret_key
internalDatabase:
enabled: true
name: nextcloud