Skip to content

Commit e019baf

Browse files
committed
fix
1 parent 88dc1b8 commit e019baf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

charts/keycloakx/templates/ingress.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{{- $ingress := .Values.ingress -}}
22
{{- if $ingress.enabled -}}
33
{{- $apiVersion := "networking.k8s.io/v1" -}}
4+
{{- $fullName := ( include "keycloak.fullname" . ) -}}
45
apiVersion: {{ $apiVersion }}
56
kind: Ingress
67
metadata:
7-
name: {{ include "keycloak.fullname" . }}
8+
name: {{ $fullName }}
89
namespace: {{ .Release.Namespace }}
910
{{- with $ingress.annotations }}
1011
annotations:
@@ -43,17 +44,17 @@ spec:
4344
pathType: {{ .pathType }}
4445
backend:
4546
service:
46-
name: {{ include "keycloak.fullname" $ }}-http
47+
name: {{ default (printf "%s-http" $fullName) (.serviceName) }}
4748
port:
48-
name: {{ $ingress.servicePort }}
49+
name: {{ default ($ingress.servicePort) (.servicePort) }}
4950
{{- end }}
5051
{{- end }}
5152
{{- if $ingress.console.enabled }}
5253
---
5354
apiVersion: {{ $apiVersion }}
5455
kind: Ingress
5556
metadata:
56-
name: {{ include "keycloak.fullname" . }}-console
57+
name: {{ $fullName }}-console
5758
namespace: {{ .Release.Namespace }}
5859
{{- with $ingress.console.annotations }}
5960
annotations:
@@ -106,9 +107,9 @@ spec:
106107
pathType: {{ .pathType }}
107108
backend:
108109
service:
109-
name: {{ include "keycloak.fullname" $ }}-http
110+
name: {{ default (printf "%s-http" $fullName) (.serviceName) }}
110111
port:
111-
name: {{ $ingress.servicePort }}
112+
name: {{ default ($ingress.servicePort) (.servicePort) }}
112113
{{- end }}
113114
{{- end }}
114115
{{- end -}}

0 commit comments

Comments
 (0)