Files
charts/bitnami/jenkins/templates/ingress.yaml
Juan Ariza Toledano cf87f81024 [bitnami/jenkins] Move Jenkins to non-root (#2014)
* [bitnami/jenkins] Move Jenkins to non-root

Signed-off-by: juan131 <juan@bitnami.com>
Signed-off-by: Bitnami Containers <containers@bitnami.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
2020-03-06 19:59:21 +01:00

46 lines
1.3 KiB
YAML

{{- if .Values.ingress.enabled }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ template "jenkins.fullname" . }}
labels: {{- include "jenkins.labels" . | nindent 4 }}
annotations:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "jenkins.tplValue" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
backend:
serviceName: {{ template "jenkins.fullname" . }}
servicePort: http
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ template "jenkins.fullname" $ }}
servicePort: http
{{- end }}
{{- if or .Values.ingress.tls .Values.ingress.extraTls }}
tls:
{{- if .Values.ingress.tls }}
- hosts:
- {{ .Values.ingress.hostname }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- toYaml .Values.ingress.extraTls | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}