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

Add support for running sidecars container #102

Merged
merged 1 commit into from
Oct 20, 2023
Merged
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
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 }}
radek-kondziolka marked this conversation as resolved.
Show resolved Hide resolved
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 }}
radek-kondziolka marked this conversation as resolved.
Show resolved Hide resolved
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
radek-kondziolka marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading