{{- if .Values.jenkins.deploy -}}
apiVersion: v2.edp.epam.com/v1
kind: Jenkins
metadata:
  name: jenkins
spec:
  edpSpec:
    dnsWildcard: {{ .Values.global.dnsWildCard }}
  {{- if .Values.jenkins.basePath }}
  basePath: "{{ .Values.jenkins.basePath }}"
  {{- end }}
  sharedLibraries:
    {{- range .Values.jenkins.sharedLibraries}}
    - name: {{ toYaml .name}}
      url: {{ toYaml .url}}
      tag: {{ toYaml .tag}}
      {{- if .secret}}
      secret: {{ toYaml .secret}}
      type: {{ toYaml .type}}
      {{- end}}
    {{- end}}
  keycloakSpec:
    enabled: true
    realm: "{{ .Values.global.edpName }}-main"
{{end}}
