From 4dd0cf99c7e35532c71da6711b1f227e179bee05 Mon Sep 17 00:00:00 2001 From: devOpsHelm <54980549+devOpsHelm@users.noreply.github.com> Date: Wed, 8 Jan 2020 19:31:40 +0300 Subject: [PATCH] Add missing LOGGING_LEVEL env variables (#88) (#19944) Signed-off-by: devOpsHelm --- stable/hazelcast/Chart.yaml | 2 +- stable/hazelcast/README.adoc | 6 ++++++ stable/hazelcast/templates/statefulset.yaml | 6 +++++- stable/hazelcast/values.yaml | 9 +++++++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/stable/hazelcast/Chart.yaml b/stable/hazelcast/Chart.yaml index 0d491f717d..d18dc802d0 100644 --- a/stable/hazelcast/Chart.yaml +++ b/stable/hazelcast/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: hazelcast -version: 2.9.2 +version: 2.10.0 appVersion: "3.12.4" tillerVersion: ">=2.7.2" kubeVersion: ">=1.9.0-0" diff --git a/stable/hazelcast/README.adoc b/stable/hazelcast/README.adoc index f68c683a0c..41b10d3708 100644 --- a/stable/hazelcast/README.adoc +++ b/stable/hazelcast/README.adoc @@ -98,6 +98,9 @@ their default values. |`+hazelcast.javaOpts+` |Additional JAVA_OPTS properties for Hazelcast member |`+nil+` +|`+hazelcast.loggingLevel+` |Level of Hazelcast logs (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST); note that changing this value requires setting `securityContext.runAsUser` to `0` and `securityContext.readOnlyRootFilesystem` to `false` +|`+nil+` + |`+hazelcast.existingConfigMap+` |ConfigMap which contains Hazelcast configuration file(s) that are used instead hazelcast.yaml embedded into values.yaml |`+nil+` @@ -195,6 +198,9 @@ Center containers |`+65534+` |`+securityContext.fsGroup+` |Group ID associated with the Hazelcast and Management Center container |`+65534+` +|`+securityContext.readOnlyRootFilesystem+` | Enables readOnlyRootFilesystem in +the Hazelcast security context |`true` + |`+metrics.enabled+` |Turn on and off JMX Prometheus metrics available at `+/metrics+` |`+false+` diff --git a/stable/hazelcast/templates/statefulset.yaml b/stable/hazelcast/templates/statefulset.yaml index c6c8ba39f0..044da5734d 100644 --- a/stable/hazelcast/templates/statefulset.yaml +++ b/stable/hazelcast/templates/statefulset.yaml @@ -106,12 +106,16 @@ spec: {{- end }} - name: JAVA_OPTS value: "-Dhazelcast.config=/data/hazelcast/hazelcast.yaml -DserviceName={{ template "hazelcast.serviceName" . }} -Dnamespace={{ .Release.Namespace }} -Dhazelcast.mancenter.enabled={{ .Values.mancenter.enabled }} -Dhazelcast.mancenter.url=http://{{ template "mancenter.fullname" . }}:{{ .Values.mancenter.service.port }}/hazelcast-mancenter {{ 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 }} + {{- end }} {{- if .Values.securityContext.enabled }} securityContext: runAsNonRoot: {{ if eq (int .Values.securityContext.runAsUser) 0 }}false{{ else }}true{{ end }} runAsUser: {{ .Values.securityContext.runAsUser }} privileged: false - readOnlyRootFilesystem: true + readOnlyRootFilesystem: {{ .Values.securityContext.readOnlyRootFilesystem }} allowPrivilegeEscalation: false capabilities: drop: diff --git a/stable/hazelcast/values.yaml b/stable/hazelcast/values.yaml index a261dbb451..c6d68e535f 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.12.4" + tag: "3.12.5" # 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 @@ -26,8 +26,11 @@ cluster: hazelcast: # javaOpts are additional JAVA_OPTS properties for Hazelcast member javaOpts: + # loggingLevel is the level of Hazelcast logs (SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST) + # Note that changing this value requires setting securityContext.runAsUser to 0 and securityContext.readOnlyRootFilesystem to false + # loggingLevel: # existingConfigMap defines a ConfigMap which contains Hazelcast configuration file(s) that are used instead hazelcast.yaml configuration below - # existingConfigMap + # existingConfigMap: # yaml is the Hazelcast YAML configuration file yaml: hazelcast: @@ -170,6 +173,8 @@ securityContext: runAsUser: 65534 # fsGroup is the group ID associated with the container fsGroup: 65534 + # readOnlyRootFilesystem is a flag to enable readOnlyRootFilesystem for the Hazelcast security context + readOnlyRootFilesystem: true # Allows to enable a Prometheus to scrape pods, implemented for Hazelcast version >= 3.12 (or 'latest') metrics: