Skip to content

Commit

Permalink
Merge pull request #3 from openinfradev/vmware_131026
Browse files Browse the repository at this point in the history
vmware-tanzu 131026
  • Loading branch information
zugwan authored Nov 1, 2023
2 parents c4abd9c + 1ee488c commit 35d5bf6
Show file tree
Hide file tree
Showing 23 changed files with 88 additions and 140 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.19.10
go-version: 1.20.7

- name: build agent
run: make host-agent-binaries
Expand All @@ -40,9 +40,12 @@ jobs:
steps:
- name: Check Docker Version
run: docker --version


- name: Uninstall podman if installed
run: sudo apt-get purge podman && sudo rm -rf /etc/cni/net.d/

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -53,9 +56,9 @@ jobs:
run: sudo sysctl -w net.netfilter.nf_conntrack_max=131072

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
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
6 changes: 3 additions & 3 deletions .github/workflows/draft-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
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
6 changes: 3 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
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
12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
golangci:
runs-on: ubuntu-20.04
steps:
- name: Install Go 1.19.10
uses: actions/setup-go@v2
- name: Install Go 1.20.7
uses: actions/setup-go@v4
with:
go-version: 1.19.10
go-version: 1.20.7

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.0
version: v1.51.0
skip-go-installation: true
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 @@ -227,7 +227,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
6 changes: 5 additions & 1 deletion agent/reconciler/host_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ func (r *HostReconciler) cleank8sdirectories(ctx context.Context) error {
}

if len(errList) > 0 {
return errors.New("not all k8s directories are cleaned up")
err := errList[0] //nolint: gosec
for _, e := range errList[1:] { //nolint: gosec
err = fmt.Errorf("%w; %v error", err, e)
}
return errors.WithMessage(err, "not all k8s directories are cleaned up")
}
return nil
}
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.6-00 kubeadm=1.26.6-00 kubectl=1.26.6-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.6 \
--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.6 \
--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.6
```
## 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
18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
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

replace golang.org/x/net => golang.org/x/net v0.17.0

require (
github.com/docker/cli v23.0.1+incompatible
github.com/docker/docker v23.0.3+incompatible
github.com/docker/cli v24.0.5+incompatible
github.com/docker/docker v24.0.5+incompatible
github.com/go-logr/logr v1.2.3
github.com/jackpal/gateway v1.0.7
github.com/kube-vip/kube-vip v0.5.5
Expand Down Expand Up @@ -141,14 +143,14 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.3.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.6.0 // indirect
golang.org/x/sync v0.2.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
Expand Down
Loading

0 comments on commit 35d5bf6

Please sign in to comment.