Skip to content

Commit

Permalink
fix: ensure eth0 addr is set to NIC's primary addr (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
jadarsie committed Sep 29, 2022
1 parent 678d453 commit 31fa122
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions parts/k8s/cloud-init/artifacts/cse_main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ if [[ -n ${MASTER_NODE} ]]; then
{{/* this step configures all certs */}}
{{/* both configs etcd/cosmos */}}
time_metric "ConfigureSecrets" configureSecrets

{{/* HACK: in case a control plane node starts with incorrectly defined cloud-init IPs */}}
if grep -q -E '^ +addresses:|^ +- ' /etc/netplan/50-cloud-init.yaml; then
x=$(grep -v -E '^ +addresses:|^ +- ' /etc/netplan/50-cloud-init.yaml)
echo "$x" >/etc/netplan/50-cloud-init.yaml
netplan apply
fi
fi

{{/* configure etcd if we are configured for etcd */}}
Expand Down
1 change: 1 addition & 0 deletions pkg/api/defaults-sysctld.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ func (cs *ContainerService) setSysctlDConfig() {
"net.ipv4.neigh.default.gc_thresh1": "4096",
"net.ipv4.neigh.default.gc_thresh2": "8192",
"net.ipv4.neigh.default.gc_thresh3": "16384",
// "kernel.dmesg_restrict": "0", // Uncomment to grant non-priviledged users access to dmesg
}

if cs.Properties.OrchestratorProfile.KubernetesConfig.NeedsContainerd() {
Expand Down
7 changes: 7 additions & 0 deletions pkg/engine/templates_generated.go

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

0 comments on commit 31fa122

Please sign in to comment.