Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Allow overriding the backend name and port in keycloakx chart #808

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions charts/keycloakx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ The following table lists the configurable parameters of the Keycloak-X chart an
| `ingress.rules[0].paths` | Paths for the Ingress rule | see below |
| `ingress.rules[0].paths[0].path` | Path for the Ingress rule | `/` |
| `ingress.rules[0].paths[0].pathType` | Path Type for the Ingress rule | `Prefix` |
| `ingress.rules[0].paths[0].backendOverride` | Overrides for the backend section of the path. | null |
| `ingress.rules[0].paths[0].backendOverride.name` | Name of the backend service for this path | null |
| `ingress.rules[0].paths[0].backendOverride.port` | Port of the backend service for this path | null |
| `ingress.servicePort` | The Service port targeted by the Ingress | `http` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.ingressClassName` | The name of the Ingress Class associated with the ingress | `""` |
Expand Down
6 changes: 6 additions & 0 deletions charts/keycloakx/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,15 @@ spec:
pathType: {{ .pathType }}
backend:
service:
{{- if .backendOverride }}
name: {{ .backendOverride.name }}
port:
name: {{ .backendOverride.port }}
{{ else }}
name: {{ include "keycloak.fullname" $ }}-http
port:
name: {{ $ingress.servicePort }}
{{- end}}
{{- end }}
{{- end }}
{{- if $ingress.console.enabled }}
Expand Down
11 changes: 11 additions & 0 deletions charts/keycloakx/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@
},
"pathType": {
"type": "string"
},
"backendOverride": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"port": {
"type": "string"
}
}
}
}
}
Expand Down
Loading