Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prepare to ubuntu 22.04 #111

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ serverComponents:
docker:
# customize apt package version for docker install
# apt-cache madison docker-ce
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
# customize apt package version for containerd install
# apt-cache madison containerd.io
Expand Down Expand Up @@ -107,7 +107,7 @@ serverComponents:
kubernetes:
version: 1.25.14
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
cluster-autoscaler:
Expand Down Expand Up @@ -141,7 +141,7 @@ serverComponents:
kubernetes:
version: 1.26.9
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1

Expand All @@ -156,7 +156,7 @@ serverComponents:
kubernetes:
version: 1.27.6
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1

Expand All @@ -171,7 +171,7 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1

Expand All @@ -191,7 +191,7 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
cluster-autoscaler:
Expand All @@ -212,7 +212,7 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
masterServers:
Expand Down
11 changes: 7 additions & 4 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
ipRange: "10.0.0.0/16"
masterCount: 3
serverComponents:
ubuntu:
version: ubuntu-22.04
# files for custom install
# masterServers:
# serversinitparams:
# targz: https://github.com/maksim-paskal/hcloud-k8s-ctl/archive/refs/heads/add-post-install.tar.gz
# folder: hcloud-k8s-ctl-add-post-install
masterServers:
serversinitparams:
targz: https://github.com/maksim-paskal/hcloud-k8s-ctl/archive/refs/heads/prepare-to-ubuntu-22.04.tar.gz
folder: hcloud-k8s-ctl-prepare-to-ubuntu-22.04
2 changes: 1 addition & 1 deletion e2e/configs/full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
pausecontainer: registry.k8s.io/pause:3.2
Expand Down
2 changes: 1 addition & 1 deletion e2e/configs/v1.25.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ serverComponents:
kubernetes:
version: 1.25.14
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
cluster-autoscaler:
Expand Down
2 changes: 1 addition & 1 deletion e2e/configs/v1.26.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ serverComponents:
kubernetes:
version: 1.26.9
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
2 changes: 1 addition & 1 deletion e2e/configs/v1.27.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ serverComponents:
kubernetes:
version: 1.27.6
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
2 changes: 1 addition & 1 deletion e2e/configs/v1.28-amd64-eu-central-fsn1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
12 changes: 12 additions & 0 deletions e2e/configs/v1.28-amd64-ubuntu-22.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Kubernetes v1.28 in Europe (ARM64 architecture)
ipRange: "10.0.0.0/16"
masterCount: 3
serverComponents:
ubuntu:
version: ubuntu-22.04
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
2 changes: 1 addition & 1 deletion e2e/configs/v1.28-amd64-us-east-ash.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
cluster-autoscaler:
Expand Down
20 changes: 20 additions & 0 deletions e2e/configs/v1.28-arm64-ubuntu-22.04.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Kubernetes v1.28 in Europe (ARM64 architecture)
ipRange: "10.0.0.0/16"
masterCount: 3
serverComponents:
ubuntu:
version: ubuntu-22.04
architecture: arm
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
masterServers:
servertype: cax11
cluster-autoscaler:
autoscalingGroups:
- name: CAX41:FSN1:cax-fsn1
minSize: 1
maxSize: 20
2 changes: 1 addition & 1 deletion e2e/configs/v1.28-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ serverComponents:
kubernetes:
version: 1.28.2
docker:
version: 5:24.0.6-1~ubuntu.20.04~focal
version: 5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)
containerd:
version: 1.6.24-1
masterServers:
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func defaultConfig() Type {
Version: "1.28.2",
},
Docker: serverComponentDocker{
Version: "5:24.0.6-1~ubuntu.20.04~focal",
Version: "5:24.0.6-1~ubuntu.$(lsb_release -rs)~$(lsb_release -cs)",
},
Containerd: serverComponentContainerd{
Version: "1.6.24-1",
Expand Down
3 changes: 2 additions & 1 deletion scripts/common-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ ca-certificates \
curl \
software-properties-common \
nfs-common \
linux-headers-generic
linux-headers-generic \
lsb-release

# create new user to ssh into server
hcloud_user="{{ .Values.serverComponents.ubuntu.username }}"
Expand Down
33 changes: 33 additions & 0 deletions scripts/upgrade-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

# Copyright [email protected]
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -ex

export DEBIAN_FRONTEND=noninteractive

# make full-upgrade before release-upgrade

apt remove -y --allow-change-held-packages docker-ce docker-ce-cli containerd.io kubelet kubeadm kubectl
apt -y autoremove
apt -y autoclean

# make full non-interactive
echo 'DPkg::options { "--force-confdef"; "--force-confnew"; }' > /etc/apt/apt.conf.d/local

do-release-upgrade -f DistUpgradeViewNonInteractive

reboot

# after reboot, /root/scripts/common-install.sh
Loading