Skip to content

Commit

Permalink
Merge pull request #1344 from SUSE/add-default-annotation
Browse files Browse the repository at this point in the history
Use scf-values config storage class name if available
  • Loading branch information
nwmac authored Oct 31, 2017
2 parents 2ff853b + f81a667 commit 5bebc96
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions deploy/kubernetes/console/templates/pre-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
annotations:
{{- if .Values.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.storageClass | quote }}
{{- else if .Values.kube.storage_class.persistent }}
volume.beta.kubernetes.io/storage-class: {{ .Values.kube.storage_class.persistent | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
Expand All @@ -31,19 +33,20 @@ metadata:
name: console-mariadb
labels:
app: "{{ .Release.Name }}"
annotations:
{{- if .Values.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.storageClass | quote }}
{{- else if .Values.kube.storage_class.persistent }}
volume.beta.kubernetes.io/storage-class: {{ .Values.kube.storage_class.persistent | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
spec:
accessModes:
- {{ .Values.mariadb.persistence.accessMode | quote }}
resources:
requests:
storage: {{ .Values.mariadb.persistence.size | quote }}
{{- if .Values.mariadb.persistence.storageClass }}
{{- if (eq "-" .Values.mariadb.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.mariadb.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}
---
apiVersion: v1
Expand All @@ -55,6 +58,8 @@ metadata:
annotations:
{{- if .Values.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.storageClass | quote }}
{{- else if .Values.kube.storage_class.persistent }}
volume.beta.kubernetes.io/storage-class: {{ .Values.kube.storage_class.persistent | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ mariadb:
enabled: true
accessMode: ReadWriteOnce
size: 1Gi
# storageClass: default
storageClass:
uaa:
protocol: https://
port:
Expand Down

0 comments on commit 5bebc96

Please sign in to comment.