From 033579b0ebe4683b01ff4db4297884d3a2cd1334 Mon Sep 17 00:00:00 2001 From: Mesut Celik Date: Tue, 25 Jun 2019 12:14:36 +0300 Subject: [PATCH] updates to hazelcast 3.12.1 and adds YAML configuration support (#15034) Signed-off-by: Mesut Celik --- stable/hazelcast/Chart.yaml | 4 +-- stable/hazelcast/templates/config.yaml | 4 ++- stable/hazelcast/templates/statefulset.yaml | 2 +- stable/hazelcast/values.yaml | 39 ++++++++------------- 4 files changed, 21 insertions(+), 28 deletions(-) diff --git a/stable/hazelcast/Chart.yaml b/stable/hazelcast/Chart.yaml index ef9399167d..c5c632194c 100644 --- a/stable/hazelcast/Chart.yaml +++ b/stable/hazelcast/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: hazelcast -version: 1.3.3 -appVersion: "3.11.2" +version: 1.4.0 +appVersion: "3.12.1" description: Hazelcast IMDG is the most widely used in-memory data grid with hundreds of thousands of installed clusters around the world. It offers caching solutions ensuring that data is in the right place when it’s needed for optimal performance. keywords: - hazelcast diff --git a/stable/hazelcast/templates/config.yaml b/stable/hazelcast/templates/config.yaml index 15d948cda2..7aa7a52086 100644 --- a/stable/hazelcast/templates/config.yaml +++ b/stable/hazelcast/templates/config.yaml @@ -1,4 +1,4 @@ -{{- if .Values.hazelcast.configurationFiles }} +{{- if or .Values.hazelcast.configurationFiles .Values.hazelcast.yaml }} apiVersion: v1 kind: ConfigMap metadata: @@ -13,4 +13,6 @@ data: {{ $key }}: |- {{ $val | indent 4}} {{- end }} + hazelcast.yaml: |- +{{ toYaml .Values.hazelcast.yaml | indent 4 }} {{- end -}} diff --git a/stable/hazelcast/templates/statefulset.yaml b/stable/hazelcast/templates/statefulset.yaml index b57cbebd31..414bf7c037 100644 --- a/stable/hazelcast/templates/statefulset.yaml +++ b/stable/hazelcast/templates/statefulset.yaml @@ -81,7 +81,7 @@ spec: value: "{{ .Values.metrics.service.port }}" {{- end }} - name: JAVA_OPTS - value: "-Dhazelcast.rest.enabled={{ .Values.hazelcast.rest }} -Dhazelcast.config=/data/hazelcast/hazelcast.xml -DserviceName={{ template "hazelcast.fullname" . }} -Dnamespace={{ .Release.Namespace }} {{ 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.rest.enabled={{ .Values.hazelcast.rest }} -Dhazelcast.config=/data/hazelcast/hazelcast.yaml -DserviceName={{ template "hazelcast.fullname" . }} -Dnamespace={{ .Release.Namespace }} {{ 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 }}" serviceAccountName: {{ template "hazelcast.serviceAccountName" . }} volumes: - name: hazelcast-storage diff --git a/stable/hazelcast/values.yaml b/stable/hazelcast/values.yaml index 039f64c570..182eb1ffe0 100644 --- a/stable/hazelcast/values.yaml +++ b/stable/hazelcast/values.yaml @@ -5,7 +5,7 @@ image: # repository is the Hazelcast image name repository: "hazelcast/hazelcast" # tag is the Hazelcast image tag - tag: "3.11.2" + tag: "3.12" # pullPolicy is the Docker image pull policy # It's recommended to change this to 'Always' if the image tag is 'latest' # ref: http://kubernetes.io/docs/user-guide/images/#updating-images @@ -28,29 +28,20 @@ hazelcast: rest: true # javaOpts are additional JAVA_OPTS properties for Hazelcast member javaOpts: - # configurationFiles are Hazelcast configuration files - configurationFiles: - hazelcast.xml: |- - - - - - true - - - - - - ${serviceName} - ${namespace} - true - - - - - + # yaml is the Hazelcast YAML configuration file + yaml: + hazelcast: + network: + join: + multicast: + enabled: false + kubernetes: + enabled: true + service-name: ${serviceName} + namespace: ${namespace} + resolve-not-ready-addresses: true + # configurationFiles are any additional Hazelcast configuration files + # configurationFiles: # nodeSelector is an array of Hazelcast Node labels for POD assignments # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector