jcasc-config.yaml 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
{{- $root := . }}
{{- if and (.Values.master.JCasC.enabled) (.Values.master.sidecars.configAutoReload.enabled) }}
{{- range $key, $val := .Values.master.JCasC.configScripts }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "jenkins.fullname" $root }}-jenkins-config-{{ $key }}
  namespace: {{ template "jenkins.namespace" $root }}
  labels:
    "app.kubernetes.io/name": {{ template "jenkins.name" $root}}
    "helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version }}
    "app.kubernetes.io/managed-by": "{{ $.Release.Service }}"
    "app.kubernetes.io/instance": "{{ $.Release.Name }}"
    "app.kubernetes.io/component": "{{ $.Values.master.componentName }}"
    {{ template "jenkins.fullname" $root }}-jenkins-config: "true"
data:
  {{ $key }}.yaml: |-
{{ tpl $val $| indent 4 }}
{{- end }}
{{- if .Values.master.JCasC.defaultConfig }}
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{ template "jenkins.fullname" $root }}-jenkins-jcasc-config
  namespace: {{ template "jenkins.namespace" $root }}
  labels:
    "app.kubernetes.io/name": {{ template "jenkins.name" $root}}
    "helm.sh/chart": {{ $.Chart.Name }}-{{ $.Chart.Version }}
    "app.kubernetes.io/managed-by": "{{ $.Release.Service }}"
    "app.kubernetes.io/instance": "{{ $.Release.Name }}"
    "app.kubernetes.io/component": "{{ $.Values.master.componentName }}"
    {{ template "jenkins.fullname" $root }}-jenkins-config: "true"
data:
  jcasc-default-config.yaml: |-
    {{- include "jenkins.casc.defaults" . |nindent 4 }}
{{- end}}
{{- end }}