Files
charts/bitnami/keycloak/templates/ingress.yaml
Lorenzo Scebba e18d1dc241 [bitnami/keycloak] Allow overriding namespace via values (#11176)
* Keycloak: allow overriding namespace from values

Signed-off-by: Lorenzo Scebba <lorenzo.scebba@intre.it>
Signed-off-by: Lorenzo Scebba <lorenzo.scebba@outlook.com>

* Keycloak: Use common helper "common.names.namespace"

Signed-off-by: Lorenzo Scebba <lorenzo.scebba@intre.it>
Signed-off-by: Lorenzo Scebba <lorenzo.scebba@outlook.com>

* Keycloak: Fixed some missing namespaces

Signed-off-by: Lorenzo Scebba <lorenzo.scebba@intre.it>
Signed-off-by: Lorenzo Scebba <lorenzo.scebba@outlook.com>

* Keycloak: Fixed tls-secret namespace include

Signed-off-by: Lorenzo Scebba <lorenzo.scebba@intre.it>
Signed-off-by: Lorenzo Scebba <lorenzo.scebba@outlook.com>

* Keycloak: bumped chart version to 9.6.0

Signed-off-by: Lorenzo Scebba <lorenzo.scebba@intre.it>
Signed-off-by: Lorenzo Scebba <lorenzo.scebba@outlook.com>

Co-authored-by: Lorenzo Scebba <lorenzo.scebba@intre.it>
Co-authored-by: Lorenzo Scebba <lorenzo.scebba@outlook.com>
2022-07-20 16:25:46 +02:00

62 lines
3.1 KiB
YAML

{{- if .Values.ingress.enabled }}
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "keycloak.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: keycloak
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
annotations:
{{- if .Values.commonAnnotations }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ (tpl .Values.ingress.hostname .) | quote }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
{{- toYaml .Values.ingress.extraPaths | nindent 10 }}
{{- end }}
- path: {{ .Values.ingress.path }}
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
pathType: {{ .Values.ingress.pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "keycloak.fullname" .) "servicePort" .Values.ingress.servicePort "context" $) | nindent 14 }}
{{- end }}
{{- range .Values.ingress.extraHosts }}
- host: {{ (tpl .name $) }}
http:
paths:
- path: {{ default "/" .path }}
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
pathType: {{ default "ImplementationSpecific" .pathType }}
{{- end }}
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "keycloak.fullname" $) "servicePort" $.Values.ingress.servicePort "context" $) | nindent 14 }}
{{- end }}
{{- if .Values.ingress.extraRules }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraRules "context" $) | nindent 4 }}
{{- end }}
{{- if or (and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned .Values.ingress.secrets )) .Values.ingress.extraTls }}
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.secrets .Values.ingress.selfSigned) }}
- hosts:
- {{ (tpl .Values.ingress.hostname .) | quote }}
secretName: {{ printf "%s-tls" (tpl .Values.ingress.hostname .) }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}