[stable/phabricator] Update to the recommended pvc patterns. (#459)

* Convert chart phabricator to use the recommended pvc patterns

* truncate to 63 and trim trailing dashes

* remove annotations and fix trunc in pvc

* document alpha storage class fallback

* update mariadb dep

* truncate to 63 and trim trailing dashes

* bump version

* fix NOTES when no mariadb password
This commit is contained in:
Amanda Cameron
2017-01-30 16:50:35 -08:00
committed by Adnan Abdulhussein
parent 323f7f2ab6
commit fbf4d8df74
8 changed files with 39 additions and 20 deletions
+2 -2
View File
@@ -64,10 +64,10 @@ The following tables lists the configurable parameters of the Phabricator chart
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `persistence.enabled` | Enable persistence using PVC | `true` |
| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `generic` |
| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `nil` (uses alpha storage class annotation) |
| `persistence.apache.accessMode` | PVC Access Mode for Apache volume | `ReadWriteOnce` |
| `persistence.apache.size` | PVC Storage Request for Apache volume | `1Gi` |
| `persistence.phabricator.storageClass` | PVC Storage Class for Phabricator volume | `generic` |
| `persistence.phabricator.storageClass` | PVC Storage Class for Phabricator volume | `nil` (uses alpha storage class annotation) |
| `persistence.phabricator.accessMode` | PVC Access Mode for Phabricator volume | `ReadWriteOnce` |
| `persistence.phabricator.size` | PVC Storage Request for Phabricator volume | `8Gi` |
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
+3 -3
View File
@@ -1,6 +1,6 @@
dependencies:
- name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.5.4
digest: sha256:7388428c9d365911ec0431462cd31a7feb89dd9b8488e387448f598017dea49d
generated: 2016-12-08T15:17:52.50703327+05:30
version: 0.5.7
digest: sha256:409eefb841b53ef1aa91d0607d87e6c475297df40101180c787260d766657d95
generated: 2017-01-27T18:15:33.428097822-08:00
+1 -1
View File
@@ -1,4 +1,4 @@
dependencies:
- name: mariadb
version: 0.5.6
version: 0.5.7
repository: https://kubernetes-charts.storage.googleapis.com/
+6 -4
View File
@@ -19,14 +19,16 @@ host. To configure Phabricator with the URL of your service:
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }}'
export APP_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
export APP_PASSWORD=$(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.phabricator-password[*]}"`))
export APP_DATABASE_PASSWORD=$(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password[*]}"`))
export APP_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.phabricator-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)
{{- end }}
{{- end }}
2. Complete your Phabricator deployment by running:
helm upgrade {{ .Release.Name }} \
--set phabricatorHost=$APP_HOST,phabricatorPassword=$APP_PASSWORD,mariadb.mariadbRootPassword=$APP_DATABASE_PASSWORD stable/phabricator
--set phabricatorHost=$APP_HOST,phabricatorPassword=$APP_PASSWORD{{ if .Values.mariadb.mariadbRootPassword }},mariadb.mariadbRootPassword=$APP_DATABASE_PASSWORD{{ end }} stable/phabricator
{{- else -}}
1. Get the Phabricator URL by running:
@@ -44,5 +46,5 @@ host. To configure Phabricator with the URL of your service:
2. Get your Phabricator login credentials by running:
echo Username: {{ .Values.phabricatorUsername }}
echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.phabricator-password[*]}"`))
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.phabricator-password}" | base64 --decode)
{{- end }}
+5 -5
View File
@@ -3,24 +3,24 @@
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "mariadb.fullname" -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 24 -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
+5 -1
View File
@@ -9,7 +9,11 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }}
{{- if .Values.persistence.apache.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.apache.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.apache.accessMode | quote }}
@@ -9,7 +9,11 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.phabricator.storageClass | quote }}
{{- if .Values.persistence.phabricator.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.phabricator.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.phabricator.accessMode | quote }}
+12 -3
View File
@@ -68,7 +68,10 @@ mariadb:
##
persistence:
enabled: true
storageClass: generic
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
accessMode: ReadWriteOnce
size: 8Gi
@@ -83,11 +86,17 @@ serviceType: LoadBalancer
persistence:
enabled: true
apache:
storageClass: generic
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
accessMode: ReadWriteOnce
size: 1Gi
phabricator:
storageClass: generic
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
accessMode: ReadWriteOnce
size: 8Gi