config-init-scripts.yaml 599 B

123456789101112131415161718
  1. {{- if .Values.controller.initScripts -}}
  2. apiVersion: v1
  3. kind: ConfigMap
  4. metadata:
  5. name: {{ template "jenkins.fullname" . }}-init-scripts
  6. namespace: {{ template "jenkins.namespace" . }}
  7. labels:
  8. "app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
  9. "app.kubernetes.io/managed-by": "{{ .Release.Service }}"
  10. "app.kubernetes.io/instance": "{{ .Release.Name }}"
  11. "app.kubernetes.io/component": "{{ .Values.controller.componentName }}"
  12. data:
  13. {{- range $key, $val := .Values.controller.initScripts }}
  14. init{{ $key }}.groovy: |-
  15. {{ tpl $val $ | indent 4 }}
  16. {{- end }}
  17. {{- end }}