jenkins-master-ingress.yaml 1.24 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
{{- if .Values.master.ingress.enabled }}
apiVersion: {{ .Values.master.ingress.apiVersion }}
kind: Ingress
metadata:
  namespace: {{ template "jenkins.namespace" . }}
  labels:
    "app.kubernetes.io/name": '{{ template "jenkins.name" .}}'
    "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 }}"
{{- if .Values.master.ingress.labels }}
{{ toYaml .Values.master.ingress.labels | indent 4 }}
{{- end }}
{{- if .Values.master.ingress.annotations }}
  annotations:
{{ toYaml .Values.master.ingress.annotations | indent 4 }}
{{- end }}
  name: {{ template "jenkins.fullname" . }}
spec:
  rules:
  - http:
      paths:
      - backend:
          serviceName: {{ template "jenkins.fullname" . }}
          servicePort: {{ .Values.master.servicePort }}
{{- if .Values.master.ingress.path }}
        path: {{ .Values.master.ingress.path }}
{{- end -}}
{{- if .Values.master.ingress.hostName }}
    host: {{ .Values.master.ingress.hostName | quote }}
{{- end }}
{{- if .Values.master.ingress.tls }}
  tls:
{{ toYaml .Values.master.ingress.tls | indent 4 }}
{{- end -}}
{{- end }}