aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2019-07-30 06:33:13 +0000
committerLianhao Lu <lianhao.lu@intel.com>2019-07-30 06:35:42 +0000
commit2ccd996de67dd3bd6e99366f0a28685beda8fed1 (patch)
tree1dd441ea72780b84d1db77e08a489798e2921009 /vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml
parente3c21ddc5076521fb35aa757a3507ef38ff1d0b5 (diff)
DAaaS: enhance collectd to be more configurable
Enhance the collectd chart in DAaaS to be more configurable, so that it can be launched with k8s CMK environment. Issue-ID: ONAPARC-393 Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Change-Id: I28698688a9977f60e89c54f32c1de73c17cb6751
Diffstat (limited to 'vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml')
-rw-r--r--vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml65
1 files changed, 33 insertions, 32 deletions
diff --git a/vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml b/vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml
index 29fdded9..bc686381 100644
--- a/vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml
+++ b/vnfs/DAaaS/deploy/collection/charts/collectd/templates/daemonset.yaml
@@ -36,48 +36,49 @@ spec:
release: {{ .Release.Name }}
spec:
hostNetwork: true
+ {{- if .Values.serviceAccountName }}
+ serviceAccountName: {{ .Values.serviceAccountName }}
+ {{- end }}
+{{- if .Values.tolerations }}
+ tolerations:
+{{ toYaml .Values.tolerations | trim | indent 8 }}
+{{- end }}
+{{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | trim | indent 8 }}
+{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
+ allowPrivilegeEscalation: true
privileged: true
+{{- if .Values.env }}
+ env:
+{{ toYaml .Values.env | trim | indent 10 }}
+{{- end }}
+{{- if .Values.command }}
+ command:
+{{ toYaml .Values.command | trim | indent 10 }}
+{{- end }}
+{{- if .Values.args }}
+ args:
+{{ toYaml .Values.args | trim | indent 10 }}
+{{- end }}
volumeMounts:
- name: {{ template "fullname" . }}-config
- mountPath: /opt/collectd/etc
- - name: proc
- mountPath: /mnt/proc
- readOnly: true
- - name: root
- mountPath: /hostfs
- readOnly: true
- - name: etc
- mountPath: /mnt/etc
- readOnly: true
- - name: run
- mountPath: /var/run/docker.sock
+ mountPath: {{ .Values.configMountPath }}
+{{- if .Values.volumeMounts }}
+{{ toYaml .Values.volumeMounts | trim | indent 10 }}
+{{- end }}
resources:
-{{ toYaml .Values.resources | indent 12 }}
- {{- if .Values.nodeSelector }}
- nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
- {{- end }}
+{{- toYaml .Values.resources | trim | indent 12}}
volumes:
- name: {{ template "fullname" . }}-config
configMap:
name: {{ template "fullname" . }}-config
- items:
- - key: node-collectd.conf
- path: collectd.conf
- - name: proc
- hostPath:
- path: /proc
- - name: root
- hostPath:
- path: /
- - name: etc
- hostPath:
- path: /etc
- - name: run
- hostPath:
- path: /var/run/docker.sock
+ defaultMode: 0744
+{{- if .Values.volumeMounts }}
+{{ toYaml .Values.volumes | indent 6 }}
+{{- end }}