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

[stable/drupal] Use storageClassName for drupal. #1989

Merged
merged 2 commits into from
Oct 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/drupal/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: drupal
version: 0.10.0
version: 0.10.1
appVersion: 8.3.7
description: One of the most versatile open source content management systems.
keywords:
Expand Down
6 changes: 3 additions & 3 deletions stable/drupal/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.7.0
digest: sha256:e1af13ac4ac21f67582006f12d2b4eb78a1a2a59b34338fac850f2bec0b08b41
generated: 2017-08-09T22:52:48.218901909-04:00
version: 1.0.5
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did the version here is 1.0.5?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just grabbing the latest version of mariadb which also includes the storageClass update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I see, just forget to update my local code..

digest: sha256:08de643d4a3b2886a76b7f5da8ea7db20b7a69b8de1d04594862adfe4735993c
Copy link
Contributor Author

@gyliu513 gyliu513 Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prydonius thanks for the update, can you please show me how does those sha256 generated/how does the timestamp generated, so that I will not forget update here next time. Thanks

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, so to bump a version you need to update requirements.yaml to the version to bump to. Then you run helm dep update ./path/to/chart and this will fetch the new version, update requirements.lock and populate the sha.

generated: 2017-10-03T10:05:16.672603874+08:00
2 changes: 1 addition & 1 deletion stable/drupal/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
- name: mariadb
version: 0.7.0
version: 1.0.5
repository: https://kubernetes-charts.storage.googleapis.com/
13 changes: 7 additions & 6 deletions stable/drupal/templates/apache-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
{{- 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 }}
resources:
requests:
storage: {{ .Values.persistence.apache.size | quote }}
{{- if .Values.persistence.apache.storageClass }}
{{- if (eq "-" .Values.persistence.apache.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.apache.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
15 changes: 7 additions & 8 deletions stable/drupal/templates/drupal-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ metadata:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if (not .Values.persistence.drupal.hostPath) }}
annotations:
{{- if .Values.persistence.drupal.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.drupal.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
{{- end }}
spec:
{{- if .Values.persistence.drupal.hostPath }}
storageClassName: ""
Expand All @@ -25,4 +17,11 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.drupal.size | quote }}
{{- if and .Values.persistence.drupal.storageClass (not .Values.persistence.drupal.hostPath) -}}
{{- if (eq "-" .Values.persistence.drupal.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.drupal.storageClass }}"
{{- end }}
{{- end }}
{{- end -}}
32 changes: 22 additions & 10 deletions stable/drupal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ mariadb:
##
persistence:
enabled: true
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
## mariadb data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass:
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi

Expand Down Expand Up @@ -86,17 +90,25 @@ ingress:
persistence:
enabled: true
apache:
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
## apache data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass:
# storageClass: "-"
accessMode: ReadWriteOnce
size: 1Gi
drupal:
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
## drupal data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass:
# storageClass: "-"
accessMode: ReadWriteOnce
size: 8Gi

Expand Down Expand Up @@ -155,4 +167,4 @@ readinessProbe:
httpGet:
path: /user/login
port: http
initialDelaySeconds: 30
initialDelaySeconds: 30