Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/joomla] Update to the recommended pvc patterns. (#449)
Browse files Browse the repository at this point in the history
* Convert chart joomla to use the recommended pvc patterns

* Update README.md

* Update apache-pvc.yaml

* Update joomla-pvc.yaml

* Update Chart.yaml

* Update _helpers.tpl

* Update requirements.lock

* Update requirements.yaml

* fix notes for 1.5

* Update requirements.lock
  • Loading branch information
AmandaCameron authored and prydonius committed Jan 28, 2017
1 parent a7fc595 commit 9d8ed51
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 17 deletions.
4 changes: 2 additions & 2 deletions stable/joomla/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ The following tables lists the configurable parameters of the Joomla! chart and
| `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 annotation) |
| `persistence.apache.accessMode` | PVC Access Mode for Apache volume | `ReadWriteOnce` |
| `persistence.apache.size` | PVC Storage Request for Apache volume | `1Gi` |
| `persistence.joomla.storageClass` | PVC Storage Class for Joomla! volume | `generic` |
| `persistence.joomla.storageClass` | PVC Storage Class for Joomla! volume | `nil` (uses alpha storage annotation) |
| `persistence.joomla.accessMode` | PVC Access Mode for Joomla! volume | `ReadWriteOnce` |
| `persistence.joomla.size` | PVC Storage Request for Joomla! volume | `8Gi` |
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
Expand Down
6 changes: 3 additions & 3 deletions stable/joomla/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: mariadb
repository: https://kubernetes-charts.storage.googleapis.com/
version: 0.5.6
digest: sha256:1b3aad03b4383d1a24dfbfef6ba1beb45f7ace2baa399c66f5a4d56d0f7bc717
generated: 2017-01-25T15:39:21.383456388-08:00
version: 0.5.7
digest: sha256:409eefb841b53ef1aa91d0607d87e6c475297df40101180c787260d766657d95
generated: 2017-01-27T16:07:02.693815624-08:00
2 changes: 1 addition & 1 deletion stable/joomla/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: mariadb
version: 0.5.x
version: 0.5.7
repository: https://kubernetes-charts.storage.googleapis.com/
2 changes: 1 addition & 1 deletion stable/joomla/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
2. Get your Joomla! login credentials by running:

echo Username: {{ .Values.joomlaUsername }}
echo Password: $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.joomla-password[*]}"`))
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.joomla-password}" | base64 --decode)
10 changes: 5 additions & 5 deletions stable/joomla/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@
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 -}}
6 changes: 5 additions & 1 deletion stable/joomla/templates/apache-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 5 additions & 1 deletion stable/joomla/templates/joomla-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.joomla.storageClass | quote }}
{{- if .Values.persistence.joomla.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.joomla.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
spec:
accessModes:
- {{ .Values.persistence.joomla.accessMode | quote }}
Expand Down
15 changes: 12 additions & 3 deletions stable/joomla/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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

Expand All @@ -64,11 +67,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
joomla:
storageClass: generic
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
accessMode: ReadWriteOnce
size: 8Gi

Expand Down

0 comments on commit 9d8ed51

Please sign in to comment.