Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Commit

Permalink
bootkube: use host's /etc/hosts entries
Browse files Browse the repository at this point in the history
Currently, bare metal environment requires resolvable DNS names for API
server and etcd servers. For user without running DNS server locally or
for testing, it would be nice to be able have some workaround for it.
One would be to populate /etc/hosts of nodes with required entries.

This is almost possible, using CLC snippets for controller nodes, except
the bootkube, which runs in rkt container and have it's own /etc/hosts
file, so health check on static kube-apiserver pod never succeeds. To
make it work, rkt parameter --hosts-entry=host needs to be added.

I suggest we add --hosts-entry=host to bootkube, as potential breakage
impact is minimal and this will save as from exposing general
bootkube_rkt_extra_args in the Terraform module/lokocfg.

By the issue, it is not required to be applied on all platforms, but
again, the breakage chance seems minimal and generally we should be
heading towards having quite unified configurations across all the
platforms, so this commit adds it to all of them.

Closes #408

Signed-off-by: Mateusz Gozdek <mateusz@kinvolk.io>
  • Loading branch information
invidian authored and iaguis committed Aug 18, 2020
1 parent 8316275 commit 7c46641
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ storage:
--insecure-options=image \
--net=host \
--dns=host \
--hosts-entry=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
- path: /etc/tmpfiles.d/etcd-wrapper.conf
filesystem: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ storage:
--insecure-options=image \
--net=host \
--dns=host \
--hosts-entry=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
passwd:
users:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ storage:
--insecure-options=image \
--net=host \
--dns=host \
--hosts-entry=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
- path: /etc/kubernetes/configure-kubelet-cgroup-driver
filesystem: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ storage:
--insecure-options=image \
--net=host \
--dns=host \
--hosts-entry=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
passwd:
users:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ storage:
--insecure-options=image \
--net=host \
--dns=host \
--hosts-entry=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
- path: /etc/kubernetes/configure-kubelet-cgroup-driver
filesystem: root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ storage:
--insecure-options=image \
--net=host \
--dns=host \
--hosts-entry=host \
--exec=/bootkube -- start --asset-dir=/assets "$@"
- path: /etc/tmpfiles.d/etcd-wrapper.conf
filesystem: root
Expand Down
24 changes: 12 additions & 12 deletions pkg/assets/generated_assets.go

Large diffs are not rendered by default.

0 comments on commit 7c46641

Please sign in to comment.