From 5cac6f9d6bdc56d277c3491aab5542307f0b2e3f Mon Sep 17 00:00:00 2001 From: Jugwan Eom Date: Tue, 17 Oct 2023 01:52:10 +0000 Subject: [PATCH 1/2] increase bootstrap token ttl to 24h --- controllers/infrastructure/bootstrapkubeconfig_controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/infrastructure/bootstrapkubeconfig_controller.go b/controllers/infrastructure/bootstrapkubeconfig_controller.go index 5a50dd556..e7402f604 100644 --- a/controllers/infrastructure/bootstrapkubeconfig_controller.go +++ b/controllers/infrastructure/bootstrapkubeconfig_controller.go @@ -28,7 +28,7 @@ type BootstrapKubeconfigReconciler struct { const ( // ttl is the time to live for the generated bootstrap token - ttl = time.Minute * 30 + ttl = time.Hour * 24 ) //+kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=bootstrapkubeconfigs,verbs=get;list;watch;create;update;patch;delete From b4eae97d7224fb1c7e35ef9e77214fc9311a87a6 Mon Sep 17 00:00:00 2001 From: Jugwan Eom Date: Tue, 17 Oct 2023 01:53:40 +0000 Subject: [PATCH 2/2] add support for k8s 1.26.x for rocky linux --- installer/internal/algo/rocky8k8s.go | 10 +++++----- installer/registry.go | 11 ++++------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/installer/internal/algo/rocky8k8s.go b/installer/internal/algo/rocky8k8s.go index 07220f64b..0d78cf4de 100644 --- a/installer/internal/algo/rocky8k8s.go +++ b/installer/internal/algo/rocky8k8s.go @@ -40,11 +40,11 @@ func NewRocky8Installer(ctx context.Context, arch, bundleAddrs string) (*Rocky8I return tpl.String(), nil } - install, err := parseFn(DoRocky8K8s1_22) + install, err := parseFn(DoRocky8K8s1_2x) if err != nil { return nil, err } - uninstall, err := parseFn(UndoRocky8K8s1_22) + uninstall, err := parseFn(UndoRocky8K8s1_2x) if err != nil { return nil, err } @@ -66,7 +66,7 @@ func (s *Rocky8Installer) Uninstall() string { // contains the installation and uninstallation steps for the supported os and k8s var ( - DoRocky8K8s1_22 = ` + DoRocky8K8s1_2x = ` set -euox pipefail BUNDLE_DOWNLOAD_PATH={{.BundleDownloadPath}} @@ -137,7 +137,7 @@ sudo systemctl daemon-reload && systemctl enable kubelet && systemctl start kube ## starting containerd service sudo systemctl daemon-reload && systemctl enable containerd && systemctl start containerd` - UndoRocky8K8s1_22 = ` + UndoRocky8K8s1_2x = ` set -euox pipefail BUNDLE_DOWNLOAD_PATH={{.BundleDownloadPath}} @@ -150,7 +150,7 @@ sudo systemctl stop containerd && systemctl disable containerd && systemctl daem ## removing containerd configurations and cni plugins sudo rm -rf /opt/cni/ && sudo rm -rf /opt/containerd/ && tar tf "$BUNDLE_PATH/containerd.tar" | xargs -n 1 echo '/' | sed 's/ //g' | grep -e '[^/]$' | xargs rm -f -## removing deb packages +## removing rpm packages for pkg in kubeadm kubelet kubectl kubernetes-cni cri-tools; do sudo yum remove $pkg -y done diff --git a/installer/registry.go b/installer/registry.go index 5dceda10a..484053ea1 100644 --- a/installer/registry.go +++ b/installer/registry.go @@ -138,23 +138,20 @@ func GetSupportedRegistry() registry { } { - // Rocky + // Rocky 8 // BYOH Bundle Repository. Associate bundle with installer - linuxDistro := "Rocky_Linux_8.7_x86-64" - reg.AddBundleInstaller(linuxDistro, "v1.23.*") - reg.AddBundleInstaller(linuxDistro, "v1.24.*") + linuxDistro := "Rocky_Linux_8_x86-64" reg.AddBundleInstaller(linuxDistro, "v1.25.*") + reg.AddBundleInstaller(linuxDistro, "v1.26.*") /* * PLACEHOLDER - ADD MORE K8S VERSIONS HERE */ // Match any patch version of the specified Major & Minor K8s version - reg.AddK8sFilter("v1.22.*") - reg.AddK8sFilter("v1.23.*") - reg.AddK8sFilter("v1.24.*") reg.AddK8sFilter("v1.25.*") + reg.AddK8sFilter("v1.26.*") // Match concrete os version to repository os version reg.AddOsFilter("Rocky_Linux_8.*_x86-64", linuxDistro)