Skip to content

Commit

Permalink
Support pod.spec.containers.securityContext specification
Browse files Browse the repository at this point in the history
This PR attempts to close #116
  • Loading branch information
LittleWat committed Dec 20, 2023
1 parent 97f640a commit f1e032d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ The following table lists the configurable parameters of the Trino chart and the
| `coordinator.annotations` | | `{}` |
| `coordinator.labels` | | `{}` |
| `coordinator.secretMounts` | | `[]` |
| `coordinator.containerSecurityContext` | | `{}` |
| `worker.jvm.maxHeapSize` | | `"8G"` |
| `worker.jvm.gcMethod.type` | | `"UseG1GC"` |
| `worker.jvm.gcMethod.g1.heapRegionSize` | | `"32M"` |
Expand All @@ -90,6 +91,7 @@ The following table lists the configurable parameters of the Trino chart and the
| `worker.annotations` | | `{}` |
| `worker.labels` | | `{}` |
| `worker.secretMounts` | | `[]` |
| `worker.containerSecurityContext` | | `{}` |
| `kafka.mountPath` | | `"/etc/trino/schemas"` |
| `kafka.tableDescriptions` | | `{}` |
| `commonLabels` | Labels that get applied to every resource's metadata | `{}` |
Expand Down
3 changes: 3 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ spec:
- name: {{ .Chart.Name }}-coordinator
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.coordinator.containerSecurityContext }}
securityContext: {{- toYaml .Values.coordinator.containerSecurityContext | nindent 12 }}
{{- end }}
env:
{{- toYaml .Values.env | nindent 12 }}
envFrom:
Expand Down
3 changes: 3 additions & 0 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ spec:
- name: {{ .Chart.Name }}-worker
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.worker.containerSecurityContext }}
securityContext: {{- toYaml .Values.worker.containerSecurityContext | nindent 12 }}
{{- end }}
env:
{{- toYaml .Values.env | nindent 12 }}
envFrom:
Expand Down
4 changes: 4 additions & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ coordinator:
# secretName: sample-secret
# path: /secrets/sample.json

containerSecurityContext: {}

worker:
jvm:
maxHeapSize: "8G"
Expand Down Expand Up @@ -294,6 +296,8 @@ worker:
# secretName: sample-secret
# path: /secrets/sample.json

containerSecurityContext: {}

kafka:
mountPath: "/etc/trino/schemas"
tableDescriptions: {}
Expand Down

0 comments on commit f1e032d

Please sign in to comment.