diff --git a/stable/owncloud/Chart.yaml b/stable/owncloud/Chart.yaml index 3301aed011..ca5299f1be 100644 --- a/stable/owncloud/Chart.yaml +++ b/stable/owncloud/Chart.yaml @@ -1,5 +1,5 @@ name: owncloud -version: 3.1.0 +version: 3.2.0 appVersion: 10.0.10 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/stable/owncloud/README.md b/stable/owncloud/README.md index c2053b25fa..27a45fc47e 100644 --- a/stable/owncloud/README.md +++ b/stable/owncloud/README.md @@ -49,6 +49,7 @@ The following table lists the configurable parameters of the ownCloud chart and | Parameter | Description | Default | |-------------------------------------|--------------------------------------------|-------------------------------------------------------- | +| `global.imageRegistry` | Global Docker image registry | `nil` | | `image.registry` | ownCloud image registry | `docker.io` | | `image.repository` | ownCloud Image name | `bitnami/owncloud` | | `image.tag` | ownCloud Image tag | `{VERSION}` | diff --git a/stable/owncloud/requirements.lock b/stable/owncloud/requirements.lock index 5fb8d4b389..6d1d9a9622 100644 --- a/stable/owncloud/requirements.lock +++ b/stable/owncloud/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: mariadb repository: https://kubernetes-charts.storage.googleapis.com/ - version: 5.0.4 + version: 5.2.0 digest: sha256:0593b73b2163fbbbae061de1aa2b8280d43f8a423a91e1c7375c0b6c86784b1c -generated: 2018-09-25T11:49:59.281075519+02:00 +generated: 2018-10-16T08:49:42.965735+02:00 diff --git a/stable/owncloud/templates/_helpers.tpl b/stable/owncloud/templates/_helpers.tpl index 27c8299876..5284115deb 100644 --- a/stable/owncloud/templates/_helpers.tpl +++ b/stable/owncloud/templates/_helpers.tpl @@ -49,4 +49,27 @@ Create chart name and version as used by the chart label. */}} {{- define "owncloud.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{/* +Return the proper Owncloud image name +*/}} +{{- define "owncloud.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} diff --git a/stable/owncloud/templates/deployment.yaml b/stable/owncloud/templates/deployment.yaml index ceb5e74b23..807ac730cc 100644 --- a/stable/owncloud/templates/deployment.yaml +++ b/stable/owncloud/templates/deployment.yaml @@ -29,7 +29,7 @@ spec: {{- end }} containers: - name: {{ template "owncloud.fullname" . }} - image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: {{ template "owncloud.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} env: - name: ALLOW_EMPTY_PASSWORD diff --git a/stable/owncloud/values.yaml b/stable/owncloud/values.yaml index 46ee226dbd..560fd0001e 100644 --- a/stable/owncloud/values.yaml +++ b/stable/owncloud/values.yaml @@ -1,3 +1,9 @@ +## Global Docker image registry +## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value +## +# global: +# imageRegistry: + ## Bitnami ownCloud image version ## ref: https://hub.docker.com/r/bitnami/owncloud/tags/ ## @@ -119,6 +125,8 @@ externalDatabase: ## ## MariaDB chart configuration ## +## https://github.com/helm/charts/blob/master/stable/mariadb/values.yaml +## mariadb: ## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters enabled: true