Skip to content

Commit

Permalink
align enterprise and opensource charts
Browse files Browse the repository at this point in the history
  • Loading branch information
plytro committed Sep 17, 2023
1 parent 54a9b7c commit 336cab7
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 67 deletions.
2 changes: 1 addition & 1 deletion stable/hazelcast-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: hazelcast-enterprise
version: 5.10.5
version: 5.10.6
appVersion: "5.3.2"
kubeVersion: ">=1.19.0-0"
description: Hazelcast is a streaming and memory-first application platform for fast, stateful, data-intensive workloads on-premises, at the edge or as a fully managed cloud service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ spec:
spec:
accessModes:
{{- range .Values.mancenter.persistence.accessModes }}
- {{ . | quote }}
- {{ . | quote }}
{{- end }}
{{- if .Values.mancenter.persistence.storageClass }}
{{- if (eq "-" .Values.mancenter.persistence.storageClass) }}
Expand All @@ -244,5 +244,5 @@ spec:
resources:
requests:
storage: {{ .Values.mancenter.persistence.size | quote }}
{{- end }}
{{- end -}}
{{- end -}}
10 changes: 5 additions & 5 deletions stable/hazelcast-enterprise/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ spec:
- name: HZ_LICENSEKEY
value: {{ .Values.hazelcast.licenseKey }}
{{- end }}
{{- if .Values.customVolume }}
- name: CLASSPATH
value: "/data/custom:/data/custom/*"
{{- end }}
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
{{- if .Values.customVolume }}
- name: CLASSPATH
value: "/data/custom:/data/custom/*"
{{- end }}
{{- if .Values.metrics.enabled }}
- name: PROMETHEUS_PORT
value: "{{ .Values.metrics.service.port }}"
Expand Down Expand Up @@ -216,7 +216,7 @@ spec:
{{- if .Values.customVolume }}
- name: hazelcast-custom
{{ toYaml .Values.customVolume | indent 10 }}
{{- end }}
{{- end }}
{{- if .Values.persistence.enabled }}
{{- if .Values.persistence.hostPath }}
- name: persistence
Expand Down
22 changes: 16 additions & 6 deletions stable/hazelcast-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ mancenter:
tag: "5.3.2"
# digest is the Hazelcast Management Center image digest that will be used only if the tag is empty
digest: ""
#
# 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 @@ -392,7 +391,6 @@ mancenter:
# adminCredentialsSecretName is Kubernetes Secret Name for admin credentials. Secret has to contain `username` and `password` literals. please check Management Center documentation for password requirements
# adminCredentialsSecretName:


# existingConfigMap defines a ConfigMap which contains Hazelcast Client configuration file(s) that are used instead of hazelcast-client.yaml configuration below
# existingConfigMap:
# yaml is the Hazelcast Client YAML configuration file
Expand Down Expand Up @@ -478,7 +476,7 @@ mancenter:
labels: {}
# key: value
# ClusterIP of the service
clusterIP:
clusterIP:
# loadBalancerIP statically set IP or set empty to use dynamic IP allocation
loadBalancerIP:

Expand Down Expand Up @@ -516,13 +514,13 @@ mancenter:

# Cluster config creation will create the connection to the Hazelcast cluster based on the yaml.hazelcast-client
clusterConfig:
# create is a flag used to enable cluster config creation
create: true

# secretsMountName is the secret name that is mounted as '/data/secrets/' (e.g. with keystore/trustore files)
# secretsMountName:

# Additional Environment variables
env: []
env: []
# - name: DB_USERNAME
# valueFrom:
# secretKeyRef:
Expand Down Expand Up @@ -566,11 +564,12 @@ externalAccess:
#
nodePorts: []

# Labels for the services that will be created.
## Labels for the services that will be created.
labels: {}

# Annotations for the services that will be created.
annotations: {}

test:
## Hazelcast chart test hook image version
image:
Expand All @@ -593,6 +592,17 @@ test:
# runAsGroup is the primary group ID used to run all processes within any container of the pod
runAsGroup: 65534

# Configure resource requests and limits
# ref: http://kubernetes.io/docs/user-guide/compute-resources/
#
# resources:
# requests:
# memory: 256Mi
# cpu: 100m
# limits:
# memory: 1024Mi
# cpu: 200m

## Array of extra objects to deploy with the release
##
extraDeploy: []
2 changes: 1 addition & 1 deletion stable/hazelcast/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: hazelcast
version: 5.8.6
version: 5.8.7
appVersion: "5.3.2"
kubeVersion: ">=1.19.0-0"
description: Hazelcast is a streaming and memory-first application platform for fast, stateful, data-intensive workloads on-premises, at the edge or as a fully managed cloud service.
Expand Down
65 changes: 37 additions & 28 deletions stable/hazelcast/templates/mancenter-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ spec:
httpGet:
path: {{ if .Values.mancenter.contextPath }}{{ .Values.mancenter.contextPath }}{{ end }}/health
port: 8081
scheme: HTTP
initialDelaySeconds: {{ .Values.mancenter.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.mancenter.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.mancenter.livenessProbe.timeoutSeconds }}
Expand Down Expand Up @@ -150,9 +151,18 @@ spec:
secretKeyRef:
name: {{ .Values.mancenter.licenseKeySecretName }}
key: key
{{- else if .Values.mancenter.licenseKey}}
{{- else if .Values.mancenter.licenseKey }}
- name: MC_LICENSE_KEY
value: {{ .Values.mancenter.licenseKey }}
{{- else if .Values.hazelcast.licenseKeySecretName }}
- name: MC_LICENSE_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.hazelcast.licenseKeySecretName }}
key: key
{{- else if .Values.hazelcast.licenseKey}}
- name: MC_LICENSE_KEY
value: {{ .Values.hazelcast.licenseKey }}
{{- end }}
{{- $clusterConfigCommand := "" }}
{{- if .Values.mancenter.clusterConfig.create }}
Expand All @@ -166,7 +176,7 @@ spec:
value: "{{ $clusterConfigCommand }}"
{{- end }}
- name: JAVA_OPTS
value: "{{ if or .Values.mancenter.licenseKey .Values.mancenter.licenseKeySecretName }}-Dhazelcast.mc.license=$(MC_LICENSE_KEY){{ end }} {{ if or .Values.mancenter.readinessProbe.enabled .Values.mancenter.livenessProbe.enabled }}-Dhazelcast.mc.healthCheck.enable=true{{ end }} -DserviceName={{ template "hazelcast.serviceName" . }} -Dnamespace={{ .Release.Namespace }} -Dhazelcast.mc.tls.enabled={{ .Values.mancenter.ssl }} {{ .Values.mancenter.javaOpts }}"
value: "{{ if or .Values.mancenter.licenseKey .Values.mancenter.licenseKeySecretName .Values.hazelcast.licenseKey .Values.hazelcast.licenseKeySecretName }}-Dhazelcast.mc.license=$(MC_LICENSE_KEY){{ end }} {{ if or .Values.mancenter.readinessProbe.enabled .Values.mancenter.livenessProbe.enabled }}-Dhazelcast.mc.healthCheck.enable=true{{ end }} -DserviceName={{ template "hazelcast.serviceName" . }} -Dnamespace={{ .Release.Namespace }} -Dhazelcast.mc.tls.enabled={{ .Values.mancenter.ssl }} -Dmancenter.ssl={{ .Values.mancenter.ssl }} {{ .Values.mancenter.javaOpts }}"
{{- with .Values.mancenter.env }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -188,36 +198,35 @@ spec:
serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
volumes:
- name: config
configMap:
{{- if .Values.mancenter.existingConfigMap }}
name: {{ .Values.mancenter.existingConfigMap }}
{{- else }}
name: {{ template "mancenter.fullname" . }}-configuration
{{- end }}
{{- if .Values.mancenter.secretsMountName }}
- name: mancenter-secrets
secret:
secretName: {{ .Values.mancenter.secretsMountName }}
{{- end }}
- name: mancenter-storage
{{- if and (eq .Values.mancenter.persistence.enabled true) .Values.mancenter.persistence.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.mancenter.persistence.existingClaim }}
{{- else if (eq .Values.mancenter.persistence.enabled false) }}
emptyDir: {}
{{- end }}
{{- if .Values.mancenter.customVolume }}
- name: mancenter-custom
{{ toYaml .Values.mancenter.customVolume | indent 8 }}
{{- end }}
{{ if and (eq .Values.mancenter.persistence.enabled true) (empty .Values.mancenter.persistence.existingClaim) }}
- name: config
configMap:
{{- if .Values.mancenter.existingConfigMap }}
name: {{ .Values.mancenter.existingConfigMap }}
{{- else }}
name: {{ template "mancenter.fullname" . }}-configuration
{{- end }}
{{- if .Values.mancenter.secretsMountName }}
- name: mancenter-secrets
secret:
secretName: {{ .Values.mancenter.secretsMountName }}
{{- end }}
- name: mancenter-storage
{{- if and (eq .Values.mancenter.persistence.enabled true) .Values.mancenter.persistence.existingClaim }}
persistentVolumeClaim:
claimName: {{ .Values.mancenter.persistence.existingClaim }}
{{- else if (eq .Values.mancenter.persistence.enabled false) }}
emptyDir: {}
{{- end }}
{{- if .Values.mancenter.customVolume }}
- name: mancenter-custom
{{ toYaml .Values.mancenter.customVolume | indent 10 }}
{{- end }}
{{ if and (eq .Values.mancenter.persistence.enabled true) (empty .Values.mancenter.persistence.existingClaim) }}
volumeClaimTemplates:
- metadata:
name: mancenter-storage
labels:
app.kubernetes.io/name: {{ template "mancenter.name" . }}
helm.sh/chart: "{{ .Chart.Name }}"
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
spec:
Expand All @@ -236,4 +245,4 @@ spec:
requests:
storage: {{ .Values.mancenter.persistence.size | quote }}
{{- end -}}
{{- end -}}
{{- end -}}
53 changes: 35 additions & 18 deletions stable/hazelcast/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ metadata:
{{- range $key, $val := .Values.annotations }}
{{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
{{- end }}
spec:
serviceName: {{ template "hazelcast.fullname" . }}
replicas: {{ .Values.cluster.memberCount }}
Expand All @@ -33,9 +33,9 @@ spec:
app.kubernetes.io/instance: "{{ .Release.Name }}"
app.kubernetes.io/managed-by: "{{ .Release.Service }}"
role: hazelcast
{{- if .Values.podLabels }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- end }}
{{- end }}
annotations:
checksum/hazelcast-config: {{ toYaml .Values.hazelcast.yaml | sha256sum }}
{{- range $key, $val := .Values.annotations }}
Expand Down Expand Up @@ -110,6 +110,7 @@ spec:
httpGet:
path: {{ .Values.livenessProbe.path }}
port: {{ if .Values.livenessProbe.port }}{{ .Values.livenessProbe.port }}{{ else if .Values.hostPort }}{{ .Values.hostPort }}{{ else }}5701{{ end }}
scheme: {{ .Values.livenessProbe.scheme }}
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
Expand All @@ -121,6 +122,7 @@ spec:
httpGet:
path: {{ .Values.readinessProbe.path }}
port: {{ if .Values.readinessProbe.port }}{{ .Values.readinessProbe.port }}{{ else if .Values.hostPort }}{{ .Values.hostPort }}{{ else }}5701{{ end }}
scheme: {{ .Values.readinessProbe.scheme }}
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
Expand All @@ -139,6 +141,16 @@ spec:
mountPath: /data/external
{{- end }}
env:
{{- if .Values.hazelcast.licenseKeySecretName }}
- name: HZ_LICENSEKEY
valueFrom:
secretKeyRef:
name: {{ .Values.hazelcast.licenseKeySecretName }}
key: key
{{- else if .Values.hazelcast.licenseKey}}
- name: HZ_LICENSEKEY
value: {{ .Values.hazelcast.licenseKey }}
{{- end }}
- name: POD_NAME
valueFrom:
fieldRef:
Expand Down Expand Up @@ -181,19 +193,24 @@ spec:
serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountToken }}
volumes:
- name: hazelcast-storage
configMap:
{{- if .Values.hazelcast.existingConfigMap }}
name: {{ .Values.hazelcast.existingConfigMap }}
{{- else }}
name: {{ template "hazelcast.fullname" . }}-configuration
{{- end }}
{{- if .Values.customVolume }}
- name: hazelcast-custom
{{ toYaml .Values.customVolume | indent 8 }}
{{- end }}
{{- if .Values.externalVolume }}
- name: hazelcast-external
{{ toYaml .Values.externalVolume | indent 8 }}
- name: hazelcast-storage
configMap:
{{- if .Values.hazelcast.existingConfigMap }}
name: {{ .Values.hazelcast.existingConfigMap }}
{{- else }}
name: {{ template "hazelcast.fullname" . }}-configuration
{{- end }}
{{- if .Values.secretsMountName }}
- name: hazelcast-secrets
secret:
secretName: {{ .Values.secretsMountName }}
{{- end }}
{{- if .Values.customVolume }}
- name: hazelcast-custom
{{ toYaml .Values.customVolume | indent 10 }}
{{- end }}
{{- if .Values.externalVolume }}
- name: hazelcast-external
{{ toYaml .Values.externalVolume | indent 10 }}
{{- end }}
{{- end }}
{{- end }}
19 changes: 13 additions & 6 deletions stable/hazelcast/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ livenessProbe:
path: /hazelcast/health/node-state
# port that will be used in liveness probe calls
# port:
# HTTPS or HTTP scheme
scheme: HTTP

# Hazelcast Readiness probe
readinessProbe:
Expand All @@ -140,6 +142,8 @@ readinessProbe:
path: /hazelcast/health/ready
# port that will be used in readiness probe calls
# port:
# HTTPS or HTTP scheme
scheme: HTTP

# Configure resource requests and limits
# ref: http://kubernetes.io/docs/user-guide/compute-resources/
Expand Down Expand Up @@ -213,6 +217,11 @@ securityContext:
# readOnlyRootFilesystem is a flag to enable readOnlyRootFilesystem for the Hazelcast security context
readOnlyRootFilesystem: true

# Hazelcast Jet Engine
jet:
# enabled is a flag to enabled Jet engine
enabled: true

# Allows to enable a Prometheus to scrape pods, implemented for Hazelcast version >= 3.12 (or 'latest')
metrics:
enabled: false
Expand Down Expand Up @@ -261,6 +270,9 @@ metrics:
# description: |
# Hazelcast instance {{ "{{ $labels.pod }}" }} is using {{ "{{ $value }}" }}% of its available memory.

# secretsMountName is the secret name that is mounted as '/data/secrets/' (e.g. with keystore/trustore files)
# secretsMountName:

# customVolume is the configuration for any volume mounted as '/data/custom/' and exposed to classpath (e.g. to mount a volume with custom JARs)
# customVolume:

Expand All @@ -287,11 +299,6 @@ env: []
# key: db-username
# name: servicename-db-creds

# Hazelcast Jet Engine
jet:
# enabled is a flag to enabled Jet engine
enabled: true

# Hazelcast Management Center application properties
mancenter:
# enabled is a flag to enable Management Center application
Expand Down Expand Up @@ -568,4 +575,4 @@ test:

## Array of extra objects to deploy with the release
##
extraDeploy: []
extraDeploy: []

0 comments on commit 336cab7

Please sign in to comment.