Skip to content

Commit

Permalink
[CN-1109] Make the discovery plugin service-name config nil-aware (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
semihbkgr authored Jan 4, 2024
1 parent a6ee151 commit d3f9c98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions stable/hazelcast-enterprise/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ Create the name of the service to use
Create the config of the service-name to use
*/}}
{{- define "hazelcast.serviceNameConfig" -}}
{{- if or (index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-dns")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-label-name")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "pod-label-name") -}}
{{- if and ((((((.Values.hazelcast).yaml).hazelcast).network).join).kubernetes)
(or
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-dns")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-label-name")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "pod-label-name")
) -}}
{{ default "" }}
{{- else -}}
{{ template "hazelcast.serviceName" .}}
Expand Down
9 changes: 6 additions & 3 deletions stable/hazelcast/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,12 @@ Create the name of the service to use
Create the config of the service-name to use
*/}}
{{- define "hazelcast.serviceNameConfig" -}}
{{- if or (index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-dns")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-label-name")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "pod-label-name") -}}
{{- if and ((((((.Values.hazelcast).yaml).hazelcast).network).join).kubernetes)
(or
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-dns")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "service-label-name")
(index .Values.hazelcast.yaml.hazelcast.network.join.kubernetes "pod-label-name")
) -}}
{{ default "" }}
{{- else -}}
{{ template "hazelcast.serviceName" .}}
Expand Down

0 comments on commit d3f9c98

Please sign in to comment.