Skip to content

Commit

Permalink
update the enterprise chart
Browse files Browse the repository at this point in the history
  • Loading branch information
semihbkgr committed Jul 30, 2024
1 parent 811cd0c commit bb6470d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
21 changes: 10 additions & 11 deletions stable/hazelcast-enterprise/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,18 @@ Create the name of the service to use
{{- end -}}

{{/*
Create the config of the service-name to use
Generate the Hazelcast configuration, ensuring that any conflicting discovery configurations are resolved.
Remove the default value for the 'service-name' field when other discovery mechanisms are explicitly used.
*/}}
{{- define "hazelcast.serviceNameConfig" -}}
{{- 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" .}}
{{- define "hazelcast.config" -}}
{{- $config := .Values.hazelcast.yaml | deepCopy -}}
{{- $k8sJoin := $config.hazelcast.network.join.kubernetes -}}
{{- if and $k8sJoin -}}
{{- if or (index $k8sJoin "service-dns") (index $k8sJoin "service-label-name") (index $k8sJoin "pod-label-name") -}}
{{- $_ := unset $k8sJoin "service-name" -}}
{{- end -}}
{{- end -}}
{{- toYaml $config -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion stable/hazelcast-enterprise/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ data:
{{ $val | indent 4}}
{{- end }}
hazelcast.yaml: |-
{{ toYaml .Values.hazelcast.yaml | indent 4 }}
{{ include "hazelcast.config" . | indent 4 }}
{{- end -}}
2 changes: 1 addition & 1 deletion stable/hazelcast-enterprise/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: JAVA_OPTS
value: "-Dhazelcast.config=/data/hazelcast/hazelcast.yaml -DserviceName={{ template "hazelcast.serviceNameConfig" . }} -Dnamespace={{ .Release.Namespace }} -Dhazelcast.persistence={{ .Values.persistence.enabled }} {{ if .Values.persistence.enabled }}-Dhazelcast.stale.join.prevention.duration.seconds=5{{ end }} -Dhz.jet.enabled={{ .Values.jet.enabled }} {{ if .Values.gracefulShutdown.enabled }}-Dhazelcast.shutdownhook.policy=GRACEFUL -Dhazelcast.shutdownhook.enabled=true -Dhazelcast.graceful.shutdown.max.wait={{ .Values.gracefulShutdown.maxWaitSeconds }} {{ end }} -Dhazelcast.cluster.version.auto.upgrade.enabled={{ .Values.hazelcast.updateClusterVersionAfterRollingUpgrade }} {{ if .Values.metrics.enabled }}-Dhazelcast.jmx=true{{ end }} {{ .Values.hazelcast.javaOpts }}"
value: "-Dhazelcast.config=/data/hazelcast/hazelcast.yaml -DserviceName={{ template "hazelcast.serviceName" . }} -Dnamespace={{ .Release.Namespace }} -Dhazelcast.persistence={{ .Values.persistence.enabled }} {{ if .Values.persistence.enabled }}-Dhazelcast.stale.join.prevention.duration.seconds=5{{ end }} -Dhz.jet.enabled={{ .Values.jet.enabled }} {{ if .Values.gracefulShutdown.enabled }}-Dhazelcast.shutdownhook.policy=GRACEFUL -Dhazelcast.shutdownhook.enabled=true -Dhazelcast.graceful.shutdown.max.wait={{ .Values.gracefulShutdown.maxWaitSeconds }} {{ end }} -Dhazelcast.cluster.version.auto.upgrade.enabled={{ .Values.hazelcast.updateClusterVersionAfterRollingUpgrade }} {{ if .Values.metrics.enabled }}-Dhazelcast.jmx=true{{ end }} {{ .Values.hazelcast.javaOpts }}"
{{- if .Values.hazelcast.loggingLevel }}
- name: LOGGING_LEVEL
value: {{ .Values.hazelcast.loggingLevel }}
Expand Down

0 comments on commit bb6470d

Please sign in to comment.