Skip to content

Commit

Permalink
Merge pull request #2 from openinfradev/k8s_v1.26
Browse files Browse the repository at this point in the history
K8s v1.26 지원 추가 / 부트스트랩 토큰 유효 시간 24시간으로 증가
  • Loading branch information
zugwan authored Oct 17, 2023
2 parents 7b56ea1 + b4eae97 commit c4abd9c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions installer/internal/algo/rocky8k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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}}
Expand Down Expand Up @@ -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}}
Expand All @@ -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
Expand Down
11 changes: 4 additions & 7 deletions installer/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c4abd9c

Please sign in to comment.