summaryrefslogtreecommitdiffstats
path: root/kubernetes/contrib/charts/awx
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-11-29 15:06:44 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2019-12-06 09:55:29 +0100
commit812199acf011cd76f147dfc09b79909d8c144162 (patch)
treed9a94609520b4d5cbb56f2fbd53e2812decb9864 /kubernetes/contrib/charts/awx
parent9b0adea0769b026875ee312d223960c559c700bb (diff)
[Contrib] Use global storage templates for PVC
OOM has now templates in order to create the needed PVC, using: * a PV with a specific class when using a common nfs mount path between nodes (sames as today use) --> is the default behavior today * or a storage class if we want to use dynamic PV. On this case, we use (in order of priority): - persistence.storageClassOverride if set on the chart - global.persistence.storageClass if set globally - persistence.storageClass if set on the chart Change-Id: I278e62821ca98e41f63306e502cca1019ba18756 Issue-ID: OOM-1227 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Diffstat (limited to 'kubernetes/contrib/charts/awx')
-rwxr-xr-xkubernetes/contrib/charts/awx/charts/awx-postgres/templates/pv.yaml5
-rwxr-xr-xkubernetes/contrib/charts/awx/charts/awx-postgres/templates/pvc.yaml13
-rwxr-xr-xkubernetes/contrib/charts/awx/requirements.yaml2
3 files changed, 5 insertions, 15 deletions
diff --git a/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pv.yaml b/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pv.yaml
index a8cf9f6d9d..da68e3400c 100755
--- a/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pv.yaml
+++ b/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pv.yaml
@@ -15,7 +15,7 @@
*/}}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
-{{- if not .Values.persistence.storageClass -}}
+{{- if eq "True" (include "common.needPV" .) -}}
kind: PersistentVolume
apiVersion: v1
metadata:
@@ -33,7 +33,8 @@ spec:
accessModes:
- {{ .Values.persistence.accessMode }}
persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }}
+ storageClassName: "{{ include "common.fullname" . }}-data"
hostPath:
path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
{{- end -}}
-{{- end -}} \ No newline at end of file
+{{- end -}}
diff --git a/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pvc.yaml b/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pvc.yaml
index 52891ffda0..6d51a09232 100755
--- a/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pvc.yaml
+++ b/kubernetes/contrib/charts/awx/charts/awx-postgres/templates/pvc.yaml
@@ -30,21 +30,10 @@ metadata:
{{ .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
-{{- if not .Values.persistence.storageClass }}
- selector:
- matchLabels:
- name: {{ include "common.fullname" . }}
-{{- end }}
accessModes:
- {{ .Values.persistence.accessMode }}
+ storageClassName: {{ include "common.storageClass" . }}
resources:
requests:
storage: {{ .Values.persistence.size }}
-{{- if .Values.persistence.storageClass }}
-{{- if (eq "-" .Values.persistence.storageClass) }}
- storageClassName: ""
-{{- else }}
- storageClassName: "{{ .Values.persistence.storageClass }}"
-{{- end }}
-{{- end }}
{{- end -}}
diff --git a/kubernetes/contrib/charts/awx/requirements.yaml b/kubernetes/contrib/charts/awx/requirements.yaml
index 486fc6585c..ca8971c138 100755
--- a/kubernetes/contrib/charts/awx/requirements.yaml
+++ b/kubernetes/contrib/charts/awx/requirements.yaml
@@ -14,5 +14,5 @@
dependencies:
- name: common
- version: ~4.x-0
+ version: ~5.x-0
repository: '@local' \ No newline at end of file