diff options
author | Borislav Glozman <Borislav.Glozman@amdocs.com> | 2019-12-11 14:26:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-11 14:26:24 +0000 |
commit | 73a2c25f2a9ea88e6bbce1175104ca46dd9a21d3 (patch) | |
tree | d5c522966d8a458bd7661c466b3f0fab63276d18 /kubernetes/appc/charts | |
parent | 05942430664ddd4a35f830c5e7488ecd4122c83d (diff) | |
parent | 5f46e6edb8331594eeb4ef88eaca3654232fb8dd (diff) |
Merge "[APPC] Use global storage templates for PVC"
Diffstat (limited to 'kubernetes/appc/charts')
-rw-r--r-- | kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml | 8 | ||||
-rw-r--r-- | kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml b/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml index 6fef70ceb5..91ebe78daf 100644 --- a/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml @@ -15,11 +15,12 @@ */}} {{- $global := . }} {{- if and $global.Values.persistence.enabled (not $global.Values.persistence.existingClaim) -}} +{{- if eq "True" (include "common.needPV" .) -}} {{- range $i, $t := until (int $global.Values.replicaCount)}} kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" $global }}-playbook{{$i}} + name: {{ include "common.fullname" $global }}-playbook-{{$i}} namespace: {{ include "common.namespace" $global }} labels: app: {{ include "common.fullname" $global }} @@ -32,10 +33,13 @@ spec: storage: {{ $global.Values.persistence.size}} accessModes: - {{ $global.Values.persistence.accessMode }} - storageClassName: "{{ include "common.fullname" $global }}-playbook" + storageClassName: "{{ include "common.fullname" $global }}-data" persistentVolumeReclaimPolicy: {{ $global.Values.persistence.volumeReclaimPolicy }} hostPath: path: {{ $global.Values.global.persistence.mountPath | default $global.Values.persistence.mountPath }}/{{ $global.Release.Name }}/{{ $global.Values.persistence.mountSubPath }}{{$i}} +{{if ne $i (int $global.Values.replicaCount) }} --- {{- end -}} {{- end -}} +{{- end -}} +{{- end -}} diff --git a/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml b/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml index f7fa15ca89..b9ef80dbb3 100644 --- a/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml @@ -95,9 +95,13 @@ spec: name: {{ include "common.fullname" . }}-playbook labels: name: {{ include "common.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" spec: - accessModes: [ {{ .Values.persistence.accessMode }} ] - storageClassName: {{ include "common.fullname" . }}-playbook + accessModes: + - {{ .Values.persistence.accessMode }} + storageClassName: {{ include "common.storageClass" . }} resources: requests: storage: {{ .Values.persistence.size }} |