Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lint errors #30

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stable/hazelcast-enterprise/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: hazelcast-enterprise
version: 1.3.0
version: 1.3.1
appVersion: "3.11.2"
description: Hazelcast IMDG Enterprise 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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
metadata:
labels:
app: {{ template "hazelcast.name" . }}
chart: {{ template "hazelcast.chart" . }}
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
role: mancenter
spec:
Expand Down Expand Up @@ -94,7 +96,6 @@ spec:
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
fsGroup: {{ .Values.securityContext.fsGroup }}
allowPrivilegeEscalation: false
{{- if .Values.securityContext.runAsUser }}
runAsNonRoot: true
Expand Down
5 changes: 3 additions & 2 deletions stable/hazelcast-enterprise/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ spec:
app: {{ template "hazelcast.name" . }}
release: "{{ .Release.Name }}"
role: hazelcast
serviceName: {{ template "hazelcast.fullname" . }}
template:
metadata:
labels:
app: {{ template "hazelcast.name" . }}
chart: {{ template "hazelcast.chart" . }}
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
role: hazelcast
spec:
Expand Down Expand Up @@ -98,11 +101,9 @@ spec:
{{- end }}
- name: JAVA_OPTS
value: "-Dhazelcast.rest.enabled={{ .Values.hazelcast.rest }} -Dhazelcast.config=/data/hazelcast/hazelcast.xml -DserviceName={{ template "hazelcast.fullname" . }} -Dnamespace={{ .Release.Namespace }} -Dhazelcast.mancenter.enabled={{ .Values.mancenter.enabled }} -Dhazelcast.ssl={{ .Values.hazelcast.ssl }} -Dhazelcast.mancenter.url={{ if .Values.mancenter.ssl }}https{{ else }}http{{ end }}://{{ 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 }}"
serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
fsGroup: {{ .Values.securityContext.fsGroup }}
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
{{- if .Values.securityContext.runAsUser }}
Expand Down
2 changes: 1 addition & 1 deletion stable/hazelcast/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: hazelcast
version: 1.3.0
version: 1.3.1
appVersion: "3.11.2"
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:
Expand Down
3 changes: 2 additions & 1 deletion stable/hazelcast/templates/mancenter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ spec:
metadata:
labels:
app: {{ template "hazelcast.name" . }}
chart: {{ template "hazelcast.chart" . }}
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
role: mancenter
spec:
Expand Down Expand Up @@ -81,7 +83,6 @@ spec:
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
fsGroup: {{ .Values.securityContext.fsGroup }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you set the fsGroup then? Don't we have any case when it's useful to set it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fsGroup is already being set at the Pod securityContext object level correctly here

fsGroup: {{ .Values.securityContext.fsGroup }}

fsGroup is not valid at the Container securityContext object level

allowPrivilegeEscalation: false
{{- if .Values.securityContext.runAsUser }}
runAsNonRoot: true
Expand Down
5 changes: 3 additions & 2 deletions stable/hazelcast/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ spec:
app: {{ template "hazelcast.name" . }}
release: "{{ .Release.Name }}"
role: hazelcast
serviceName: {{ template "hazelcast.fullname" . }}
template:
metadata:
labels:
app: {{ template "hazelcast.name" . }}
chart: {{ template "hazelcast.chart" . }}
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
role: hazelcast
spec:
Expand Down Expand Up @@ -83,11 +86,9 @@ spec:
{{- end }}
- name: JAVA_OPTS
value: "-Dhazelcast.rest.enabled={{ .Values.hazelcast.rest }} -Dhazelcast.config=/data/hazelcast/hazelcast.xml -DserviceName={{ template "hazelcast.fullname" . }} -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 }}"
serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What service account it used if it's not specified here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

serviceAccountName is already being set at the Pod object level correctly here

serviceAccountName: {{ template "hazelcast.serviceAccountName" . }}

serviceAccountName is not valid at the Container object level

{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
fsGroup: {{ .Values.securityContext.fsGroup }}
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
{{- if .Values.securityContext.runAsUser }}
Expand Down