summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Glozman <Borislav.Glozman@amdocs.com>2019-07-10 10:26:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-10 10:26:01 +0000
commit1b9848822827bcf68f5573ab2b664b8c73ef0f7b (patch)
treec242e656f33a0eef0a252129297f5968d5b9416d
parent234e9e1ac46930b16cdc10fa07464031eec6e855 (diff)
parent72759850929ea6b3f1ebc6d4e584f450f70b2471 (diff)
Merge "change ansible directory ownership"
-rw-r--r--kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml4
-rw-r--r--kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml17
-rw-r--r--kubernetes/appc/charts/appc-ansible-server/values.yaml4
3 files changed, 16 insertions, 9 deletions
diff --git a/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml b/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml
index 25257eaeaf..6fef70ceb5 100644
--- a/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml
+++ b/kubernetes/appc/charts/appc-ansible-server/templates/pv.yaml
@@ -19,7 +19,7 @@
kind: PersistentVolume
apiVersion: v1
metadata:
- name: {{ include "common.fullname" $global }}-data{{$i}}
+ name: {{ include "common.fullname" $global }}-playbook{{$i}}
namespace: {{ include "common.namespace" $global }}
labels:
app: {{ include "common.fullname" $global }}
@@ -32,7 +32,7 @@ spec:
storage: {{ $global.Values.persistence.size}}
accessModes:
- {{ $global.Values.persistence.accessMode }}
- storageClassName: "{{ include "common.fullname" $global }}-data"
+ storageClassName: "{{ include "common.fullname" $global }}-playbook"
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}}
diff --git a/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml b/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
index 1df20c291d..f7fa15ca89 100644
--- a/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
+++ b/kubernetes/appc/charts/appc-ansible-server/templates/statefulset.yaml
@@ -30,6 +30,13 @@ spec:
app: {{ include "common.name" . }}
release: {{ .Release.Name }}
spec:
+ initContainers:
+ - name: {{ include "common.name" . }}-chown
+ image: "busybox"
+ command: ["sh", "-c", "chown -R {{ .Values.config.ansibleUid }}:{{ .Values.config.ansibleGid}} {{ .Values.persistence.playbookPath }}"]
+ volumeMounts:
+ - mountPath: {{ .Values.persistence.playbookPath }}
+ name: {{ include "common.fullname" . }}-playbook
containers:
- name: {{ include "common.name" . }}
command: ["/bin/bash"]
@@ -60,7 +67,7 @@ spec:
name: config
subPath: RestServer_config
- mountPath: {{ .Values.persistence.playbookPath }}
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-playbook
resources:
{{ include "common.resources" . | indent 12 }}
{{- if .Values.nodeSelector }}
@@ -80,20 +87,18 @@ spec:
name: {{ include "common.fullname" . }}
defaultMode: 0644
{{ if not .Values.persistence.enabled }}
- - name: {{ include "common.fullname" . }}-data
+ - name: {{ include "common.fullname" . }}-playbook
emptyDir: {}
{{ else }}
volumeClaimTemplates:
- metadata:
- name: {{ include "common.fullname" . }}-data
+ name: {{ include "common.fullname" . }}-playbook
labels:
name: {{ include "common.fullname" . }}
spec:
accessModes: [ {{ .Values.persistence.accessMode }} ]
- storageClassName: {{ include "common.fullname" . }}-data
+ storageClassName: {{ include "common.fullname" . }}-playbook
resources:
requests:
storage: {{ .Values.persistence.size }}
{{ end }}
- imagePullSecrets:
- - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/appc/charts/appc-ansible-server/values.yaml b/kubernetes/appc/charts/appc-ansible-server/values.yaml
index 59cf29f70c..f2dd150160 100644
--- a/kubernetes/appc/charts/appc-ansible-server/values.yaml
+++ b/kubernetes/appc/charts/appc-ansible-server/values.yaml
@@ -37,6 +37,8 @@ debugEnabled: false
# application configuration
config:
+ ansibleUid: 100
+ ansibleGid: 101
appcChartName: appc
mysqlServiceName: appc-dbhost
configDir: /opt/onap/ccsdk
@@ -89,7 +91,7 @@ persistence:
size: 1Gi
mountPath: /dockerdata-nfs
mountSubPath: appc/ansible
- playbookPath: /var/local
+ playbookPath: /home/ansible
ingress:
enabled: false