Skip to content

Commit 88d8ab0

Browse files
adbergerdominiquemetz
authored andcommitted
fix(keycloakx): also allow setting externalTrafficPolicy when service type is NodePort
Signed-off-by: Adrian Berger <adrian.berger@natron.io>
1 parent 887ac4f commit 88d8ab0

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

charts/keycloakx/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ The following table lists the configurable parameters of the Keycloak-X chart an
123123
| `service.type` | The Service type | `ClusterIP` |
124124
| `service.loadBalancerIP` | Optional IP for the load balancer. Used for services of type LoadBalancer only | `""` |
125125
| `loadBalancerSourceRanges` | Optional List of allowed source ranges (CIDRs). Used for service of type LoadBalancer only | `[]` |
126-
| `service.externalTrafficPolicy` | Optional external traffic policy. Used for services of type LoadBalancer only | `"Cluster"` |
126+
| `service.externalTrafficPolicy` | Optional external traffic policy. Used for services of type LoadBalancer & NodePort only | `"Cluster"` |
127127
| `service.httpPort` | The http Service port | `80` |
128128
| `service.httpNodePort` | The HTTP Service node port if type is NodePort | `""` |
129129
| `service.httpsPort` | The HTTPS Service port | `8443` |

charts/keycloakx/templates/service-http.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ spec:
2424
loadBalancerSourceRanges:
2525
{{- toYaml .Values.service.loadBalancerSourceRanges | nindent 4 }}
2626
{{- end }}
27-
{{- if eq "LoadBalancer" .Values.service.type }}
27+
{{- if or (eq "LoadBalancer" .Values.service.type) (eq "NodePort" .Values.service.type) }}
2828
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
2929
{{- end }}
3030
{{- if .Values.service.sessionAffinity }}

charts/keycloakx/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ service:
267267
# to connect to the LoadBalancer, e. g. will result in Security Groups
268268
# (or equivalent) with inbound source ranges allowed to connect
269269
loadBalancerSourceRanges: []
270-
# When using Service type LoadBalancer, you can preserve the source IP seen in the container
270+
# When using Service type LoadBalancer or NodePort, you can preserve the source IP seen in the container
271271
# by changing the default (Cluster) to be Local.
272272
# See https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
273273
externalTrafficPolicy: "Cluster"

0 commit comments

Comments
 (0)