Skip to content

Commit

Permalink
Added support for K8s v1.26.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Dharmjit Singh committed Aug 15, 2023
1 parent fcb7f73 commit f5ec27b
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 40 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.10
go-version: 1.20.7

- name: build agent
run: make host-agent-binaries
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.10
go-version: 1.20.7

- name: Install ginkgo
run: go install github.com/onsi/ginkgo/v2/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.10
go-version: 1.20.7

- name: Build Release Artifacts
run: IMG="projects.registry.vmware.com/cluster_api_provider_bringyourownhost/cluster-api-byoh-controller:${{ github.ref_name }}" make build-release-artifacts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.10
go-version: 1.20.7

- name: Install ginkgo
run: go install github.com/onsi/ginkgo/v2/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
golangci:
runs-on: ubuntu-20.04
steps:
- name: Install Go 1.19.10
- name: Install Go 1.20.7
uses: actions/setup-go@v2
with:
go-version: 1.19.10
go-version: 1.20.7

- name: Checkout code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.19.10 as builder
FROM golang:1.20.7 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ host-agent-binary: $(RELEASE_DIR)
-e GOARCH=$(GOARCH) \
-v "$$(pwd):/workspace$(DOCKER_VOL_OPTS)" \
-w /workspace \
golang:1.19.10 \
golang:1.20.7 \
go build -buildvcs=false -a -ldflags "$(GOLDFLAGS)" \
-o ./bin/$(notdir $(RELEASE_BINARY))-$(GOOS)-$(GOARCH) $(HOST_AGENT_DIR)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ If someone wants to implement their own installer controller then they need to f
- BYOH is currently compatible wth Cluster API v1beta1 (v1.0)

## Supported OS and Kubernetes versions
| Operating System | Architecture | Kubernetes v1.22.* | Kubernetes v1.23.* | Kubernetes v1.24.* | Kubernetes v1.25.* |
| ------------------|---------------|:------------------:|:------------------:|:------------------:|:------------------:|
| Ubuntu 20.04.* | amd64 |||||
| Operating System | Architecture | Kubernetes v1.24.* | Kubernetes v1.25.* | Kubernetes v1.26.* |
| ------------------|---------------|:------------------:|:------------------:|:------------------:|
| Ubuntu 20.04.* | amd64 ||||

**NOTE:** The '*' in OS means that all Ubuntu 20.04 patches are supported.

Expand Down
2 changes: 1 addition & 1 deletion docs/BYOHDockerFileDev
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN echo "Installing kubectl kubeadm kubelet" \
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
&& apt-get update \
&& apt-get install -y linux-image-$(uname -r) \
&& apt-get install -y kubelet=1.25.11-00 kubeadm=1.25.11-00 kubectl=1.25.11-00 \
&& apt-get install -y kubelet=1.26.7-00 kubeadm=1.26.7-00 kubectl=1.26.7-00 \
&& apt-mark hold containerd kubelet kubeadm kubectl \
&& apt-get clean \
&& systemctl enable kubelet.service \
Expand Down
6 changes: 3 additions & 3 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Generate the cluster.yaml for workload cluster
```shell
CONTROL_PLANE_ENDPOINT_IP=10.10.10.10 clusterctl generate cluster byoh-cluster \
--infrastructure byoh \
--kubernetes-version v1.25.11 \
--kubernetes-version v1.26.7 \
--control-plane-machine-count 1 \
--worker-machine-count 1 > cluster.yaml
```
Expand All @@ -214,7 +214,7 @@ Generate the cluster.yaml for workload cluster
```shell
CONTROL_PLANE_ENDPOINT_IP=10.10.10.10 clusterctl generate cluster byoh-cluster \
--infrastructure byoh \
--kubernetes-version v1.25.11 \
--kubernetes-version v1.26.7 \
--control-plane-machine-count 1 \
--worker-machine-count 1 \
--flavor docker > cluster.yaml
Expand Down Expand Up @@ -253,7 +253,7 @@ after that you should see your nodes turn into ready:
```shell
$ KUBECONFIG=byoh-cluster.kubeconfig kubectl get nodes
NAME STATUS ROLES AGE VERSION
byoh-cluster-8siai8 Ready master 5m v1.25.11
byoh-cluster-8siai8 Ready master 5m v1.26.7
```
## Additional: Running host-agent as a systemd service
Expand Down
17 changes: 6 additions & 11 deletions docs/local_dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,26 +231,21 @@ Note: It may happen that a specific patch version of a k8s minor release is not
<td>K8S Version</td>
<td>BYOH Bundle Name</td>
</tr>
<tr>
<td>Ubuntu_20.04.*_x86-64</td>
<td>v1.22.*</td>
<td>byoh-bundle-ubuntu_20.04.1_x86-64_k8s:v1.22.*</td>
</tr>
<tr>
<td>Ubuntu_20.04.*_x86-64</td>
<td>v1.23.*</td>
<td>byoh-bundle-ubuntu_20.04.1_x86-64_k8s:v1.23.*</td>
</tr>
<tr>
<td>Ubuntu_20.04.*_x86-64</td>
<td>v1.24.*</td>
<td>byoh-bundle-ubuntu_20.04.1_x86-64_k8s:v1.24.*</td>
</tr>
<tr>
<tr>
<td>Ubuntu_20.04.*_x86-64</td>
<td>v1.25.*</td>
<td>byoh-bundle-ubuntu_20.04.1_x86-64_k8s:v1.25.*</td>
</tr>
<tr>
<td>Ubuntu_20.04.*_x86-64</td>
<td>v1.26.*</td>
<td>byoh-bundle-ubuntu_20.04.1_x86-64_k8s:v1.26.*</td>
</tr>
</table>
The '*' in OS means that all Ubuntu 20.04 patches will be handled by this BYOH bundle.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/vmware-tanzu/cluster-api-provider-bringyourownhost

go 1.19
go 1.20

replace github.com/insomniacslk/dhcp => github.com/harvester/dhcp v0.0.0-20220421024905-28b38eafefe3

Expand Down
2 changes: 1 addition & 1 deletion hack/getting_started.sh
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ manageClusterConfFile="${HOME}/.kube/management-cluster.conf"
kubeConfigFile=/tmp/byoh-cluster-kubeconfig
reposDir=$(dirname $0)/../
byohBinaryFile=${reposDir}/bin/byoh-hostagent-linux-amd64
kubernetesVersion="v1.25.11"
kubernetesVersion="v1.26.7"

readArgs $@
userConfirmation
Expand Down
2 changes: 1 addition & 1 deletion installer/bundle_builder/ingredients/deb/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM $BASE_IMAGE as build

# Override to download other version
ENV CONTAINERD_VERSION=1.6.18
ENV KUBERNETES_VERSION=1.25.11-00
ENV KUBERNETES_VERSION=1.26.7-00
ENV ARCH=amd64

RUN apt-get update \
Expand Down
5 changes: 2 additions & 3 deletions installer/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,18 @@ func GetSupportedRegistry() registry {

// BYOH Bundle Repository. Associate bundle with installer
linuxDistro := "Ubuntu_20.04.1_x86-64"
reg.AddBundleInstaller(linuxDistro, "v1.23.*")
reg.AddBundleInstaller(linuxDistro, "v1.24.*")
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("Ubuntu_20.04.*_x86-64", linuxDistro)
Expand Down
2 changes: 1 addition & 1 deletion installer/registry_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ var _ = Describe("Byohost Installer Tests", func() {
Expect(osBundles).To(HaveLen(1))

osBundleResult := r.ListK8s("Ubuntu_20.04.1_x86-64")
Expect(osBundleResult).To(ContainElements("v1.23.*", "v1.24.*", "v1.25.*"))
Expect(osBundleResult).To(ContainElements("v1.24.*", "v1.25.*", "v1.26.*"))
Expect(osBundleResult).To(HaveLen(3))
})
})
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/cluster_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ var _ = Describe("Cluster upgrade test [K8s-upgrade]", func() {
dockerClient *client.Client
allbyohostContainerIDs []string
allAgentLogFiles []string
kubernetesVersionUpgradeFrom = "v1.24.2"
kubernetesVersionUpgradeTo = "v1.25.11"
kubernetesVersionUpgradeFrom = "v1.25.11"
kubernetesVersionUpgradeTo = "v1.26.7"
etcdUpgradeVersion = "3.5.6-0"
coreDNSUpgradeVersion = "v1.9.3"
)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/clusterclass_upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ var _ = Describe("Clusterclass upgrade test [K8s-upgrade]", func() {
dockerClient *client.Client
allbyohostContainerIDs []string
allAgentLogFiles []string
kubernetesVersionUpgradeFrom = "v1.24.2"
kubernetesVersionUpgradeTo = "v1.25.11"
kubernetesVersionUpgradeFrom = "v1.25.11"
kubernetesVersionUpgradeTo = "v1.26.7"
etcdUpgradeVersion = "3.5.6-0"
coreDNSUpgradeVersion = "v1.9.3"
)
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/config/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ providers:
variables:
# default variables for the e2e test; those values could be overridden via env variables, thus
# allowing the same e2e config file to be re-used in different prow jobs e.g. each one with a K8s version permutation
KUBERNETES_VERSION: "v1.25.11"
KUBERNETES_VERSION: "v1.26.7"
ETCD_VERSION_UPGRADE_TO: "3.5.6-0"
COREDNS_VERSION_UPGRADE_TO: "1.9.3"
KUBERNETES_VERSION_UPGRADE_TO: "v1.22.0"
Expand All @@ -103,7 +103,7 @@ variables:
NODE_DRAIN_TIMEOUT: "60s"
# NOTE: INIT_WITH_BINARY is used only by the clusterctl upgrade test to initialize the management cluster to be upgraded
INIT_WITH_BINARY: "https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/clusterctl-{OS}-{ARCH}"
BUNDLE_LOOKUP_TAG: "v1.25.11"
BUNDLE_LOOKUP_TAG: "v1.26.7"
CONTROL_PLANE_ENDPOINT_IP: ""
MANUAL_CSR_APPROVAL: "disable"

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func setupBootstrapCluster(config *clusterctl.E2EConfig, scheme *runtime.Scheme,
if !useExistingCluster {
clusterProvider = bootstrap.CreateKindBootstrapClusterAndLoadImages(context.TODO(), bootstrap.CreateKindBootstrapClusterAndLoadImagesInput{
Name: config.ManagementClusterName,
KubernetesVersion: "v1.25.11",
KubernetesVersion: "v1.26.7",
RequiresDockerSock: config.HasDockerProvider(),
Images: config.Images,
IPFamily: config.GetVariable(IPFamily),
Expand Down

0 comments on commit f5ec27b

Please sign in to comment.