Skip to content

Commit

Permalink
support hostAliases in cilium-agent
Browse files Browse the repository at this point in the history
Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
  • Loading branch information
dungdm93 authored and joamaki committed Feb 9, 2022
1 parent 41a47b0 commit 18a5fa9
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions Documentation/helm-values.rst

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Documentation/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ healthz
herokuapp
hexData
hoc
hostAliases
hostConfDirMountPath
hostFirewall
hostNetwork
Expand Down
1 change: 1 addition & 0 deletions install/kubernetes/cilium/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ contributors across the globe, there is almost always someone available to help.
| gke.enabled | bool | `false` | Enable Google Kubernetes Engine integration |
| healthChecking | bool | `true` | Enable connectivity health checking. |
| healthPort | int | `9876` | TCP port for the agent health API. This is not the port for cilium-health. |
| hostAliases | list | `[]` | Host aliases for cilium-agent. |
| hostFirewall | object | `{"enabled":false}` | Configure the host firewall. |
| hostFirewall.enabled | bool | `false` | Enables the enforcement of host policies in the eBPF datapath. |
| hostPort.enabled | bool | `false` | Enable hostPort service support. |
Expand Down
16 changes: 10 additions & 6 deletions install/kubernetes/cilium/templates/cilium-agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,6 @@ spec:
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- end }}
{{- if and .Values.etcd.managed (not .Values.etcd.k8sService) }}
# In managed etcd mode, Cilium must be able to resolve the DNS name of
# the etcd service
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
hostNetwork: true
initContainers:
{{- if .Values.cgroup.autoMount.enabled }}
# Required to mount cgroup2 filesystem on the underlying Kubernetes node.
Expand Down Expand Up @@ -440,6 +434,16 @@ spec:
serviceAccount: {{ .Values.serviceAccounts.cilium.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.cilium.name | quote }}
terminationGracePeriodSeconds: 1
hostNetwork: true
{{- if and .Values.etcd.managed (not .Values.etcd.k8sService) }}
# In managed etcd mode, Cilium must be able to resolve the DNS name of
# the etcd service
dnsPolicy: ClusterFirstWithHostNet
{{- end }}
{{- with .Values.hostAliases }}
hostAliases:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
Expand Down
6 changes: 6 additions & 0 deletions install/kubernetes/cilium/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ tolerations:
# value: "value"
# effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)"

# -- Host aliases for cilium-agent.
hostAliases: []
# - ip: 10.10.xx.xx
# hostnames:
# - cluster1.mesh.cilium.io

# -- The priority class to use for cilium-agent.
priorityClassName: ""

Expand Down

0 comments on commit 18a5fa9

Please sign in to comment.