mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/elasticsearch] Run as non-root (#13429)
* Various Signed-off-by: Naseem <naseemkullah@gmail.com> * Option to run as elasticsearch, not root Signed-off-by: Naseem <naseemkullah@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
a09be94d88
commit
bb6500de3b
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: elasticsearch
|
||||
home: https://www.elastic.co/products/elasticsearch
|
||||
version: 1.26.2
|
||||
version: 1.27.2
|
||||
appVersion: 6.7.0
|
||||
description: Flexible and powerful open source, distributed real-time search and analytics
|
||||
engine.
|
||||
|
||||
@@ -146,9 +146,11 @@ The following table lists the configurable parameters of the elasticsearch chart
|
||||
| `data.updateStrategy` | Data node update strategy policy | `{type: "onDelete"}` |
|
||||
| `sysctlInitContainer.enabled` | If true, the sysctl init container is enabled (does not stop extraInitContainers from running) | `true` |
|
||||
| `extraInitContainers` | Additional init container passed through the tpl | `` |
|
||||
| `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | `{}` |
|
||||
| `podSecurityPolicy.annotations` | Specify pod annotations in the pod security policy | `{}` |
|
||||
| `podSecurityPolicy.enabled` | Specify if a pod security policy must be created | `false` |
|
||||
| `serviceAccounts.client.create` | If true, create the client service account | `true` |
|
||||
| `securityContext.enabled` | If true, add securityContext to client, master and data pods | `false` |
|
||||
| `securityContext.runAsUser` | user ID to run containerized process | `1000` |
|
||||
| `serviceAccounts.client.create` | If true, create the client service account | `true` |
|
||||
| `serviceAccounts.client.name` | Name of the client service account to use or create | `{{ elasticsearch.client.fullname }}` |
|
||||
| `serviceAccounts.master.create` | If true, create the master service account | `true` |
|
||||
| `serviceAccounts.master.name` | Name of the master service account to use or create | `{{ elasticsearch.master.fullname }}` |
|
||||
|
||||
@@ -121,6 +121,10 @@ spec:
|
||||
initialDelaySeconds: 90
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: http
|
||||
|
||||
@@ -127,6 +127,10 @@ spec:
|
||||
{{- end }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
|
||||
@@ -135,6 +135,10 @@ spec:
|
||||
{{ toYaml .Values.master.readinessProbe | indent 10 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.securityContext.runAsUser }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
|
||||
@@ -31,6 +31,10 @@ podSecurityPolicy:
|
||||
# seccomp.security.alpha.kubernetes.io/defaultProfileName: 'docker/default'
|
||||
# apparmor.security.beta.kubernetes.io/defaultProfileName: 'runtime/default'
|
||||
|
||||
securityContext:
|
||||
enabled: false
|
||||
runAsUser: 1000
|
||||
|
||||
image:
|
||||
repository: "docker.elastic.co/elasticsearch/elasticsearch-oss"
|
||||
tag: "6.7.0"
|
||||
|
||||
Reference in New Issue
Block a user