Skip to content

Commit

Permalink
Merge branch 'main' into dns.cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
amold1 authored Aug 16, 2024
2 parents 0ceb101 + 24d71b0 commit 8aceb74
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cloud/services/stackscripts.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func EnsureStackscript(ctx context.Context, machineScope *scope.MachineScope) (i
if util.IgnoreLinodeAPIError(err, http.StatusNotFound) != nil {
return 0, fmt.Errorf("failed to get stackscript with label %s: %w", stackscriptName, err)
}
if stackscripts != nil {
if len(stackscripts) != 0 {
return stackscripts[0].ID, nil
}
stackscriptCreateOptions := linodego.StackscriptCreateOptions{
Expand Down
2 changes: 2 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [Default (kubeadm)](./topics/flavors/default.md)
- [Dual-stack](./topics/flavors/dual-stack.md)
- [Etcd-disk](./topics/flavors/etcd-disk.md)
- [Etcd Backup](./topics/flavors/etcd-backup-restore.md)
- [ClusterClass kubeadm](./topics/flavors/clusterclass-kubeadm.md)
- [Cluster Autoscaler](./topics/flavors/cluster-autoscaler.md)
- [Cilium BGP LB (kubeadm)](./topics/flavors/cilium-bgp-lb.md)
Expand All @@ -17,6 +18,7 @@
- [vpcless](./topics/flavors/vpcless.md)
- [konnectivity (kubeadm)](./topics/flavors/konnectivity.md)
- [DNS based apiserver Load Balancing](./topics/flavors/dns-loadbalancing.md)
- [Flatcar](./topics/flavors/flatcar.md)
- [Etcd](./topics/etcd.md)
- [Backups](./topics/backups.md)
- [Multi-Tenancy](./topics/multi-tenancy.md)
Expand Down
14 changes: 12 additions & 2 deletions scripts/pre-kubeadminit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,20 @@ EOF

sed -i '/swap/d' /etc/fstab
swapoff -a

# check for required tools and only install missing tools
REQUIRED_TOOLS=(containerd socat conntrack ethtool iptables)
INSTALL_TOOLS=()
for tool in ${REQUIRED_TOOLS[*]}; do
echo "checking for ${tool}"
if [ ! -x "$(command -v ${tool})" ]; then
echo "${tool} is missing"
INSTALL_TOOLS+=(${tool})
fi
done
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y containerd socat conntrack
# use containerd files we write instead of package defaults
apt-get install -o Dpkg::Options::="--force-confold" -y ${INSTALL_TOOLS[*]}

PATCH_VERSION=${1#[v]}
VERSION=${PATCH_VERSION%.*}
Expand Down

0 comments on commit 8aceb74

Please sign in to comment.