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

added hostAliases support for coordinator and worker deployment #255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
22 changes: 22 additions & 0 deletions charts/trino/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,17 @@ Fast distributed SQL query engine for big data analytics that helps you explore
* `coordinator.nodeSelector` - object, default: `{}`
* `coordinator.tolerations` - list, default: `[]`
* `coordinator.affinity` - object, default: `{}`
* `coordinator.hostAliases` - list, default: `[]`
For databases with self signed certificate and without valid domain names, sometimes you need to set databace host in /etc/hosts file.
[Adding entries to Pod /etc/hosts with HostAliases](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods)
Example:
```yaml
- hostnames:
- name-1
- name-2
- name-3
ip: 1.1.1.1
```
* `coordinator.additionalConfigFiles` - object, default: `{}`

Additional config files placed in the default configuration directory. Supports templating the files' contents with `tpl`.
Expand Down Expand Up @@ -602,6 +613,17 @@ Fast distributed SQL query engine for big data analytics that helps you explore
* `worker.nodeSelector` - object, default: `{}`
* `worker.tolerations` - list, default: `[]`
* `worker.affinity` - object, default: `{}`
* `coordinator.hostAliases` - list, default: `[]`
For databases with self signed certificate and without valid domain names, sometimes you need to set databace host in /etc/hosts file.
[Adding entries to Pod /etc/hosts with HostAliases](https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods)
Example:
```yaml
- hostnames:
- name-1
- name-2
- name-3
ip: 1.1.1.1
```
* `worker.additionalConfigFiles` - object, default: `{}`

Additional config files placed in the default configuration directory. Supports templating the files' contents with `tpl`.
Expand Down
4 changes: 4 additions & 0 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ spec:
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.coordinator.hostAliases }}
hostAliases:
{{- toYaml .Values.coordinator.hostAliases | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.coordinator.terminationGracePeriodSeconds }}
containers:
- name: {{ .Chart.Name }}-coordinator
Expand Down
4 changes: 4 additions & 0 deletions charts/trino/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ spec:
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.worker.hostAliases }}
hostAliases:
{{- toYaml .Values.worker.hostAliases | nindent 8 }}
{{- end }}
{{- if and .Values.worker.gracefulShutdown.enabled (gt (mulf 2.0 .Values.worker.gracefulShutdown.gracePeriodSeconds) .Values.worker.terminationGracePeriodSeconds) }}
{{- fail "The user must set the `worker.terminationGracePeriodSeconds` to a value of at least two times the configured `gracePeriodSeconds`." }}
{{- else }}
Expand Down
24 changes: 24 additions & 0 deletions charts/trino/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,18 @@ coordinator:

affinity: {}

hostAliases:
# coordinator.hostAliases -- [Adding entries to Pod /etc/hosts with HostAliases] (https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/).
# @raw
# Example:
# ```yaml
# - hostnames:
# - name-1
# - name-2
# - name-3
# ip: 1.1.1.1
# ```

additionalConfigFiles: {}
# coordinator.additionalConfigFiles -- Additional config files placed in the default configuration directory.
# Supports templating the files' contents with `tpl`.
Expand Down Expand Up @@ -748,6 +760,18 @@ worker:

affinity: {}

hostAliases: []
# worker.hostAliases -- [Adding entries to Pod /etc/hosts with HostAliases] (https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/).
# @raw
# Example:
# ```yaml
# - hostnames:
# - name-1
# - name-2
# - name-3
# ip: 1.1.1.1
# ```

additionalConfigFiles: {}
# worker.additionalConfigFiles -- Additional config files placed in the default configuration directory.
# Supports templating the files' contents with `tpl`.
Expand Down