Skip to content

Commit 34d28c9

Browse files
Add option to use extra_hosts and add hostAlias to deployment for provided extra_hosts entries (#100)
1 parent d064488 commit 34d28c9

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

agent/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,17 @@ helm upgrade --install hd-agent \
181181

182182
> **Note:** JVM memory values support standard Java memory units (e.g., 800m, 1g, 2G). Ensure the JVM memory settings are appropriate for your container memory limits and that both values match for optimal performance.
183183
184+
## Pinning hostnames (config.extra_hosts)
185+
186+
`config.extra_hosts` pins hostnames to specific IPs on the agent pod (rendered as `hostAliases`). The format is a semicolon-separated list of `host:ip` pairs:
187+
188+
```yaml
189+
config:
190+
extra_hosts: "ldp.orchestrator.fivetran.com:35.188.225.82;api.fivetran.com:35.236.237.87"
191+
```
192+
193+
> **Note:** The above is purely an example. Only set `extra_hosts` if requested by Fivetran Support, or if a DNS override is required.
194+
184195
## PodDisruptionBudgets
185196

186197
By default, the chart creates PodDisruptionBudgets (PDBs) for both the agent (`hd-agent-pdb`) and the data processing jobs (`hd-job-pdb`), each with `minAvailable: 1`. If your environment does not require PDBs, you can disable them:

agent/templates/deployment.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,24 @@ spec:
4242
{{- end }}
4343
{{- end }}
4444
restartPolicy: Always
45+
{{- if .Values.config.extra_hosts }}
46+
hostAliases:
47+
{{- range splitList ";" .Values.config.extra_hosts }}
48+
{{- $entry := trim . }}
49+
{{- if $entry }}
50+
{{- $parts := splitList ":" $entry }}
51+
{{- if eq (len $parts) 2 }}
52+
{{- $host := trim (index $parts 0) }}
53+
{{- $ip := trim (index $parts 1) }}
54+
{{- if and $host $ip }}
55+
- ip: {{ $ip | quote }}
56+
hostnames:
57+
- {{ $host | quote }}
58+
{{- end }}
59+
{{- end }}
60+
{{- end }}
61+
{{- end }}
62+
{{- end }}
4563
{{- if .Values.config.custom_dns }}
4664
dnsConfig:
4765
nameservers:

agent/values.schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"type": "string",
3030
"description": "Authentication token secret name to be reference for the agent"
3131
},
32+
"extra_hosts": {
33+
"type": "string",
34+
"description": "Optional semicolon-separated host:ip overrides; renders pod hostAliases (IPv4)."
35+
},
3236
"kubernetes_affinity": {
3337
"type": "array",
3438
"items": {

0 commit comments

Comments
 (0)