diff --git a/stable/owncloud/Chart.yaml b/stable/owncloud/Chart.yaml index 684d89ac3888..1bfe986fff2c 100644 --- a/stable/owncloud/Chart.yaml +++ b/stable/owncloud/Chart.yaml @@ -1,5 +1,5 @@ name: owncloud -version: 0.4.16 +version: 0.5.0 appVersion: 10.0.3 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/templates/NOTES.txt b/stable/owncloud/templates/NOTES.txt index 7b588e51f908..22de65926127 100644 --- a/stable/owncloud/templates/NOTES.txt +++ b/stable/owncloud/templates/NOTES.txt @@ -1,4 +1,4 @@ -{{- if empty (include "host" .) -}} +{{- if empty (include "owncloud.host" .) -}} ############################################################################### ### ERROR: You did not provide an external host in your 'helm install' call ### ############################################################################### @@ -10,18 +10,18 @@ host. To configure ownCloud with the URL of your service: {{- if contains "NodePort" .Values.serviceType }} - export APP_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}") + export APP_PORT=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "owncloud.fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}") export APP_HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") {{- else if contains "LoadBalancer" .Values.serviceType }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }}' + Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "owncloud.fullname" . }}' - export APP_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") - export APP_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.owncloud-password}" | base64 --decode) + export APP_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "owncloud.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") + export APP_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "owncloud.fullname" . }} -o jsonpath="{.data.owncloud-password}" | base64 --decode) {{- if .Values.mariadb.mariadbRootPassword }} - export APP_DATABASE_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) + export APP_DATABASE_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "owncloud.mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) {{- end }} {{- end }} @@ -35,16 +35,16 @@ host. To configure ownCloud with the URL of your service: {{- if eq .Values.serviceType "ClusterIP" }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "fullname" . }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "owncloud.fullname" . }}" -o jsonpath="{.items[0].metadata.name}") echo http://127.0.0.1:8080/ kubectl port-forward $POD_NAME 8080:80 {{- else }} - echo http://{{ include "host" . }}{{ if .Values.owncloudPort }}:{{ .Values.owncloudPort }}{{ end }}/ + echo http://{{ include "owncloud.host" . }}{{ if .Values.owncloudPort }}:{{ .Values.owncloudPort }}{{ end }}/ {{- end }} 2. Get your ownCloud login credentials by running: echo User: {{ .Values.owncloudUsername }} - echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.owncloud-password}" | base64 --decode) + echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "owncloud.fullname" . }} -o jsonpath="{.data.owncloud-password}" | base64 --decode) {{- end }} diff --git a/stable/owncloud/templates/_helpers.tpl b/stable/owncloud/templates/_helpers.tpl index 24639065311a..46e137398e1f 100644 --- a/stable/owncloud/templates/_helpers.tpl +++ b/stable/owncloud/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "name" -}} +{{- define "owncloud.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -10,7 +10,7 @@ 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). */}} -{{- define "fullname" -}} +{{- define "owncloud.fullname" -}} {{- $name := default .Chart.Name .Values.nameOverride -}} {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -19,7 +19,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this 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). */}} -{{- define "mariadb.fullname" -}} +{{- define "owncloud.mariadb.fullname" -}} {{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -27,7 +27,7 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this Get the user defined LoadBalancerIP for this release. Note, returns 127.0.0.1 if using ClusterIP. */}} -{{- define "serviceIP" -}} +{{- define "owncloud.serviceIP" -}} {{- if eq .Values.serviceType "ClusterIP" -}} 127.0.0.1 {{- else -}} @@ -39,7 +39,7 @@ Note, returns 127.0.0.1 if using ClusterIP. Gets the host to be used for this application. If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty. */}} -{{- define "host" -}} +{{- define "owncloud.host" -}} {{- $host := index .Values (printf "%sHost" .Chart.Name) | default "" -}} -{{- default (include "serviceIP" .) $host -}} +{{- default (include "owncloud.serviceIP" .) $host -}} {{- end -}} diff --git a/stable/owncloud/templates/apache-pvc.yaml b/stable/owncloud/templates/apache-pvc.yaml index 8aa5ef54cd00..5be92cafb846 100644 --- a/stable/owncloud/templates/apache-pvc.yaml +++ b/stable/owncloud/templates/apache-pvc.yaml @@ -2,7 +2,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ template "fullname" . }}-apache + name: {{ template "owncloud.fullname" . }}-apache spec: accessModes: - {{ .Values.persistence.apache.accessMode | quote }} diff --git a/stable/owncloud/templates/deployment.yaml b/stable/owncloud/templates/deployment.yaml index 26c39915cb7d..358544e6920c 100644 --- a/stable/owncloud/templates/deployment.yaml +++ b/stable/owncloud/templates/deployment.yaml @@ -1,10 +1,10 @@ -{{- if include "host" . -}} +{{- if include "owncloud.host" . -}} apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: {{ template "fullname" . }} + name: {{ template "owncloud.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "owncloud.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -13,30 +13,30 @@ spec: template: metadata: labels: - app: {{ template "fullname" . }} + app: {{ template "owncloud.fullname" . }} spec: containers: - - name: {{ template "fullname" . }} + - name: {{ template "owncloud.fullname" . }} image: "{{ .Values.image }}" imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }} env: - name: MARIADB_HOST - value: {{ template "mariadb.fullname" . }} + value: {{ template "owncloud.mariadb.fullname" . }} - name: MARIADB_PORT_NUMBER value: "3306" - name: MARIADB_PASSWORD valueFrom: secretKeyRef: - name: {{ template "mariadb.fullname" . }} + name: {{ template "owncloud.mariadb.fullname" . }} key: mariadb-root-password - name: OWNCLOUD_HOST - value: {{ include "host" . | quote }} + value: {{ include "owncloud.host" . | quote }} - name: OWNCLOUD_USERNAME value: {{ default "" .Values.owncloudUsername | quote }} - name: OWNCLOUD_PASSWORD valueFrom: secretKeyRef: - name: {{ template "fullname" . }} + name: {{ template "owncloud.fullname" . }} key: owncloud-password - name: OWNCLOUD_EMAIL value: {{ default "" .Values.owncloudEmail | quote }} @@ -49,7 +49,7 @@ spec: port: http httpHeaders: - name: Host - value: {{ include "host" . | quote }} + value: {{ include "owncloud.host" . | quote }} initialDelaySeconds: 120 timeoutSeconds: 5 failureThreshold: 6 @@ -59,7 +59,7 @@ spec: port: http httpHeaders: - name: Host - value: {{ include "host" . | quote }} + value: {{ include "owncloud.host" . | quote }} initialDelaySeconds: 30 timeoutSeconds: 3 periodSeconds: 5 @@ -74,14 +74,14 @@ spec: - name: owncloud-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ template "fullname" . }}-owncloud + claimName: {{ template "owncloud.fullname" . }}-owncloud {{- else }} emptyDir: {} {{- end }} - name: apache-data {{- if .Values.persistence.enabled }} persistentVolumeClaim: - claimName: {{ template "fullname" . }}-apache + claimName: {{ template "owncloud.fullname" . }}-apache {{- else }} emptyDir: {} {{- end }} diff --git a/stable/owncloud/templates/owncloud-pvc.yaml b/stable/owncloud/templates/owncloud-pvc.yaml index 3a8fd9f81cb4..2f3c56bf92c6 100644 --- a/stable/owncloud/templates/owncloud-pvc.yaml +++ b/stable/owncloud/templates/owncloud-pvc.yaml @@ -2,7 +2,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: {{ template "fullname" . }}-owncloud + name: {{ template "owncloud.fullname" . }}-owncloud spec: accessModes: - {{ .Values.persistence.owncloud.accessMode | quote }} diff --git a/stable/owncloud/templates/secrets.yaml b/stable/owncloud/templates/secrets.yaml index 46f9d59941dd..de57a0de6481 100644 --- a/stable/owncloud/templates/secrets.yaml +++ b/stable/owncloud/templates/secrets.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Secret metadata: - name: {{ template "fullname" . }} + name: {{ template "owncloud.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "owncloud.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/owncloud/templates/svc.yaml b/stable/owncloud/templates/svc.yaml index 80dc1ebde3d4..cd3273b4d1ae 100644 --- a/stable/owncloud/templates/svc.yaml +++ b/stable/owncloud/templates/svc.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "fullname" . }} + name: {{ template "owncloud.fullname" . }} labels: - app: {{ template "fullname" . }} + app: {{ template "owncloud.fullname" . }} chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -17,4 +17,4 @@ spec: port: 80 targetPort: http selector: - app: {{ template "fullname" . }} + app: {{ template "owncloud.fullname" . }}