Skip to content

Commit

Permalink
configurationFiles mapped to config dir
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Zaruba <jza0330@gmail.com>
  • Loading branch information
Jan Záruba committed Nov 28, 2023
1 parent 915efef commit af93a12
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions stable/hazelcast/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ spec:
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
volumeMounts:
{{- range $key, $val := .Values.hazelcast.configurationFiles }}
- name: config
mountPath: /opt/hazelcast/config/{{ $key }}
subPath: {{ $key }}
{{- end }}
- name: config
mountPath: /opt/hazelcast/config/hazelcast.yaml
subPath: hazelcast.yaml
- name: hazelcast-storage
mountPath: /data/hazelcast
{{- if .Values.customVolume }}
Expand Down Expand Up @@ -157,7 +165,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
- name: JAVA_OPTS
value: "-Dhazelcast.config=/data/hazelcast/hazelcast.yaml -DserviceName={{ template "hazelcast.serviceNameConfig" . }} -Dnamespace={{ .Release.Namespace }} -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 }} {{ if .Values.metrics.enabled }}-Dhazelcast.jmx=true{{ end }} {{ .Values.hazelcast.javaOpts }}"
value: "-Dhazelcast.config=/opt/hazelcast/config/hazelcast.yaml -DserviceName={{ template "hazelcast.serviceNameConfig" . }} -Dnamespace={{ .Release.Namespace }} -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 }} {{ if .Values.metrics.enabled }}-Dhazelcast.jmx=true{{ end }} {{ .Values.hazelcast.javaOpts }}"
{{- if .Values.hazelcast.loggingLevel }}
- name: LOGGING_LEVEL
value: {{ .Values.hazelcast.loggingLevel }}
Expand All @@ -183,13 +191,15 @@ spec:
serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
volumes:
- name: hazelcast-storage
- name: config
configMap:
{{- if .Values.hazelcast.existingConfigMap }}
name: {{ .Values.hazelcast.existingConfigMap }}
{{- else }}
name: {{ template "hazelcast.fullname" . }}-configuration
{{- end }}
- name: hazelcast-storage
emptyDir: {}
{{- if .Values.customVolume }}
- name: hazelcast-custom
{{ toYaml .Values.customVolume | indent 8 }}
Expand Down

0 comments on commit af93a12

Please sign in to comment.