Skip to content

Commit

Permalink
Add support for sidecar containers
Browse files Browse the repository at this point in the history
  • Loading branch information
radek authored and losipiuk committed Oct 20, 2023
1 parent adfd05d commit e19ff7c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ The following table lists the configurable parameters of the Trino chart and the
| `env` | | `[]` |
| `envFrom` | | `[]` |
| `initContainers` | | `{}` |
| `sidecarContainers` | | `{}` |
| `securityContext.runAsUser` | | `1000` |
| `securityContext.runAsGroup` | | `1000` |
| `shareProcessNamespace.coordinator` | | `false` |
| `shareProcessNamespace.worker` | | `false` |
| `service.type` | | `"ClusterIP"` |
| `service.port` | | `8080` |
| `auth` | | `{}` |
Expand Down
6 changes: 6 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ spec:
runAsUser: {{ .runAsUser }}
runAsGroup: {{ .runAsGroup }}
{{- end }}
{{- if .Values.shareProcessNamespace.coordinator }}
shareProcessNamespace: {{ .Values.shareProcessNamespace.coordinator }}
{{- end }}
volumes:
- name: config-volume
configMap:
Expand Down Expand Up @@ -143,6 +146,9 @@ spec:
successThreshold: {{ .Values.coordinator.readinessProbe.successThreshold | default 1 }}
resources:
{{- toYaml .Values.coordinator.resources | nindent 12 }}
{{- if .Values.sidecarContainers.coordinator }}
{{- toYaml .Values.sidecarContainers.coordinator | nindent 8 }}
{{- end }}
{{- with .Values.coordinator.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
runAsUser: {{ .runAsUser }}
runAsGroup: {{ .runAsGroup }}
{{- end }}
{{- if .Values.shareProcessNamespace.worker }}
shareProcessNamespace: {{ .Values.shareProcessNamespace.worker }}
{{- end }}
volumes:
- name: config-volume
configMap:
Expand Down Expand Up @@ -122,6 +125,9 @@ spec:
successThreshold: {{ .Values.worker.readinessProbe.successThreshold | default 1 }}
resources:
{{- toYaml .Values.worker.resources | nindent 12 }}
{{- if .Values.sidecarContainers.worker }}
{{- toYaml .Values.sidecarContainers.worker | nindent 8 }}
{{- end }}
{{- with .Values.worker.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 16 additions & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,26 @@ initContainers: {}
# image: busybox:1.28
# command: ['sh', '-c', 'echo The worker is running! && sleep 3600']

sidecarContainers: {}
# coordinator:
# - name: side-coordinator
# image: busybox:1.28
# imagePullPolicy: IfNotPresent
# command: ['sleep', '1']
# worker:
# - name: side-worker
# image: busybox:1.28
# imagePullPolicy: IfNotPresent
# command: ['sleep', '1']

securityContext:
runAsUser: 1000
runAsGroup: 1000

shareProcessNamespace:
coordinator: false
worker: false

service:
type: ClusterIP
port: 8080
Expand Down

0 comments on commit e19ff7c

Please sign in to comment.