summaryrefslogtreecommitdiffstats
path: root/kubernetes/aaf/charts/aaf-hello/templates
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2019-12-11 14:25:57 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-11 14:25:57 +0000
commit05942430664ddd4a35f830c5e7488ecd4122c83d (patch)
tree9da5b76f5fdb74a3f47917e3a198fa4596848af7 /kubernetes/aaf/charts/aaf-hello/templates
parent5145c61e87e1d73935d395abfba6b9becb5d3b87 (diff)
parent7a23575fc1402ebe022779fbaaa021f43419be49 (diff)
Merge "[AAF] Use global storage templates for PVC"
Diffstat (limited to 'kubernetes/aaf/charts/aaf-hello/templates')
-rw-r--r--kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml14
-rw-r--r--kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml14
-rw-r--r--kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml4
3 files changed, 13 insertions, 19 deletions
diff --git a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml
index 066bf38f2f..af82689ef2 100644
--- a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml
+++ b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pv.yaml
@@ -1,4 +1,6 @@
+{{- if ne 0 (int .Values.global.aaf.hello.replicas) }}
{{- if and .Values.global.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{- if eq "True" (include "common.needPV" .) -}}
#########
## ============LICENSE_START====================================================
## org.onap.aaf
@@ -37,12 +39,8 @@ spec:
- {{ .Values.persistence.config.accessMode }}
persistentVolumeReclaimPolicy: {{ .Values.persistence.config.volumeReclaimPolicy }}
hostPath:
- path: {{ .Values.persistence.config.mountPath }}
-{{- if .Values.persistence.config.storageClass }}
-{{- if (eq "-" .Values.persistence.config.storageClass) }}
- storageClassName: ""
-{{- else }}
- storageClassName: "{{ .Values.persistence.config.storageClass }}"
-{{- end }}
-{{- end }}
+ path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}
+ storageClassName: "{{ include "common.fullname" . }}-data"
+{{- end -}}
+{{- end -}}
{{- end -}}
diff --git a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml
index 7c45b8bd7f..68828767e3 100644
--- a/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml
+++ b/kubernetes/aaf/charts/aaf-hello/templates/aaf-hello-pvc.yaml
@@ -1,3 +1,4 @@
+{{- if ne 0 (int .Values.global.aaf.hello.replicas) }}
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
#########
## ============LICENSE_START====================================================
@@ -33,20 +34,11 @@ metadata:
{{ toYaml .Values.persistence.annotations | indent 4 }}
{{- end }}
spec:
- selector:
- matchLabels:
- app: {{ include "common.name" . }}-hello
accessModes:
- {{ .Values.persistence.config.accessMode }}
resources:
requests:
storage: {{ .Values.persistence.config.size }}
-{{- if .Values.persistence.config.storageClass }}
-{{- if (eq "-" .Values.persistence.config.storageClass) }}
- storageClassName: ""
-{{- else }}
- storageClassName: "{{ .Values.persistence.config.storageClass }}"
-{{- end }}
-{{- end }}
+ storageClassName: {{ include "common.storageClass" . }}
+{{- end -}}
{{- end -}}
-
diff --git a/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml b/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml
index c5fcf68a58..2135f1ef31 100644
--- a/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml
+++ b/kubernetes/aaf/charts/aaf-hello/templates/deployment.yaml
@@ -34,8 +34,12 @@ spec:
hostPath:
path: /etc/localtime
- name: aaf-hello-vol
+ {{- if and .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Release.Name }}-aaf-hello-pvc
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"
initContainers: