Skip to content

Commit

Permalink
Improve Hazelast Chart to support Scaling Up/Down (helm#9150)
Browse files Browse the repository at this point in the history
* Improve Hazelcast Chart to support Scaling

Signed-off-by: Rafal Leszko <[email protected]>

* Update stable/hazelcast/Chart.yaml

Co-Authored-By: leszko <[email protected]>
Signed-off-by: Rafal Leszko <[email protected]>
  • Loading branch information
Rafał Leszko authored and k8s-ci-robot committed Nov 29, 2018
1 parent a0178fc commit a25c621
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 20 deletions.
4 changes: 2 additions & 2 deletions stable/hazelcast/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hazelcast
version: 1.0.1
appVersion: "3.10.2"
version: 1.1.0
appVersion: "3.11"
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
Expand Down
2 changes: 2 additions & 0 deletions stable/hazelcast/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ The following table lists the configurable parameters of the Hazelcast chart and
| `hazelcast.javaOpts` | Additional JAVA_OPTS properties for Hazelcast member | `nil` |
| `hazelcast.configurationFiles` | Hazelcast configuration files | `{DEFAULT_HAZELCAST_XML}` |
| `nodeSelector` | Hazelcast Node labels for pod assignment | `nil` |
| `gracefulShutdown.enabled` | Turn on and off Graceful Shutdown | `true` |
| `gracefulShutdown.maxWaitSeconds` | Maximum time to wait for the Hazelcast POD to shut down | `600` |
| `livenessProbe.enabled` | Turn on and off liveness probe | `true` |
| `livenessProbe.initialDelaySeconds` | Delay before liveness probe is initiated | `30` |
| `livenessProbe.periodSeconds` | How often to perform the probe | `10` |
Expand Down
5 changes: 4 additions & 1 deletion stable/hazelcast/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ spec:
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.gracefulShutdown.enabled }}
terminationGracePeriodSeconds: {{ .Values.gracefulShutdown.maxWaitSeconds }}
{{- end }}
containers:
- name: {{ template "hazelcast.fullname" . }}
Expand Down Expand Up @@ -65,7 +68,7 @@ spec:
mountPath: /data/hazelcast
env:
- name: JAVA_OPTS
value: "-Dhazelcast.rest.enabled={{ .Values.hazelcast.rest }} -Dhazelcast.config=/data/hazelcast/hazelcast.xml -DserviceName={{ template "hazelcast.fullname" . }} -Dnamespace={{ .Release.Namespace }} {{ .Values.hazelcast.javaOpts }}"
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 }}{{ .Values.hazelcast.javaOpts }}"
serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}
volumes:
- name: hazelcast-storage
Expand Down
37 changes: 20 additions & 17 deletions stable/hazelcast/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
##
image:
# repository is the Hazelcast image name
repository: "hazelcast/hazelcast-kubernetes"
repository: "hazelcast/hazelcast"
# tag is the Hazelcast image tag
tag: "3.10.2"
tag: "3.11"
# 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
Expand Down Expand Up @@ -42,15 +42,11 @@ hazelcast:
<network>
<join>
<multicast enabled="false"/>
<tcp-ip enabled="false" />
<discovery-strategies>
<discovery-strategy enabled="true" class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy">
<properties>
<property name="service-name">${serviceName}</property>
<property name="namespace">${namespace}</property>
</properties>
</discovery-strategy>
</discovery-strategies>
<kubernetes enabled="true">
<service-name>${serviceName}</service-name>
<namespace>${namespace}</namespace>
<resolve-not-ready-addresses>true</resolve-not-ready-addresses>
</kubernetes>
</join>
</network>
</hazelcast>
Expand All @@ -60,35 +56,42 @@ hazelcast:
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
nodeSelector: {}

# graceful shutdown properties
gracefulShutdown:
# enabled is a flag used to enable Graceful Shutdown
enabled: true
# maxWaitSeconds is the maximum time to wait for the Hazelcast POD to shut down
maxWaitSeconds: 600

# Hazelcast Liveness probe
livenessProbe:
# enabled is a flag to used to enable liveness probe
# enabled is a flag used to enable liveness probe
enabled: true
# initialDelaySeconds is a delay before liveness probe is initiated
initialDelaySeconds: 30
# periodSeconds decides how often to perform the probe
periodSeconds: 10
# timeoutSeconds decides when the probe times out
timeoutSeconds: 5
timeoutSeconds: 10
# successThreshold is the minimum consecutive successes for the probe to be considered successful after having failed
successThreshold: 1
# failureThreshold is the minimum consecutive failures for the probe to be considered failed after having succeeded
failureThreshold: 3
failureThreshold: 10

# Hazelcast Readiness probe
readinessProbe:
# enabled is a flag to used to enable readiness probe
# enabled is a flag used to enable readiness probe
enabled: true
# initialDelaySeconds is a delay before readiness probe is initiated
initialDelaySeconds: 30
# periodSeconds decides how often to perform the probe
periodSeconds: 10
# timeoutSeconds decides when the probe times out
timeoutSeconds: 1
timeoutSeconds: 10
# successThreshold is the minimum consecutive successes for the probe to be considered successful after having failed
successThreshold: 1
# failureThreshold is the minimum consecutive failures for the probe to be considered failed after having succeeded
failureThreshold: 3
failureThreshold: 10

# Configure resource requests and limits
# ref: http://kubernetes.io/docs/user-guide/compute-resources/
Expand Down

0 comments on commit a25c621

Please sign in to comment.