Skip to content

Commit

Permalink
fix(services) support non-None ClusterIP always (#962)
Browse files Browse the repository at this point in the history
Support user-chosen ClusterIP values for all Service types so long as
the ClusterIP value is not the special "None" value.

Support the "None" value when the Service type is ClusterIP.
  • Loading branch information
rainest authored Dec 5, 2023
1 parent b8a4ed2 commit 05ce54f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

### Improvements

* Only set `Service` `clusterIP` when `type` is `ClusterIP`
* Only allow `None` ClusterIPs on ClusterIP-type Services.
[#961](https://github.com/Kong/charts/pull/961)
[#962](https://github.com/Kong/charts/pull/962)
* Bumped Kong version to 3.5.
[#957](https://github.com/Kong/charts/pull/957)
* Support for `affinity` configuration has been added to migration job templates.
Expand Down
4 changes: 3 additions & 1 deletion charts/kong/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,11 @@ spec:
{{- if .externalTrafficPolicy }}
externalTrafficPolicy: {{ .externalTrafficPolicy }}
{{- end }}
{{- if (and (eq .type "ClusterIP") .clusterIP )}}
{{- if .clusterIP }}
{{- if (or (not (eq .clusterIP "None")) (and (eq .type "ClusterIP") (eq .clusterIP "None"))) }}
clusterIP: {{ .clusterIP }}
{{- end }}
{{- end }}
selector:
{{- .selectorLabels | nindent 4 }}
{{- end -}}
Expand Down

0 comments on commit 05ce54f

Please sign in to comment.