Skip to content

Commit

Permalink
Update kube-vip
Browse files Browse the repository at this point in the history
  • Loading branch information
Madhur97 committed Aug 24, 2022
1 parent c1b6475 commit b961e16
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 329 deletions.
6 changes: 3 additions & 3 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.17
go-version: 1.18

- name: build agent
run: make host-agent-binaries
Expand All @@ -52,10 +52,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Install ginkgo
run: go get github.com/onsi/ginkgo/[email protected]
run: go install github.com/onsi/ginkgo/[email protected]

- name: Install prequisit packages
run: sudo apt update && sudo apt install -qq --yes socat ebtables ethtool conntrack
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.17
go-version: 1.18

- 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
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

- name: Install ginkgo
run: go get github.com/onsi/ginkgo/[email protected]
run: go install github.com/onsi/ginkgo/[email protected]

- name: turn off swap
run: sudo swapoff -a
Expand Down
6 changes: 3 additions & 3 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-latest
steps:
- name: Install Go 1.17
- name: Install Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.18

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

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.0
version: v1.46.2
skip-go-installation: true
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# golangci.com configuration
# https://github.com/golangci/golangci/wiki/Configuration
service:
golangci-lint-version: 1.42.0 # use the fixed version to not introduce new linters unexpectedly
golangci-lint-version: 1.46.2 # use the fixed version to not introduce new linters unexpectedly

run:
skip-dirs:
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.17.8 as builder
FROM golang:1.18 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 @@ -211,7 +211,7 @@ host-agent-binary: $(RELEASE_DIR)
-e GOARCH=$(GOARCH) \
-v "$$(pwd):/workspace$(DOCKER_VOL_OPTS)" \
-w /workspace \
golang:1.17.8 \
golang:1.18 \
go build -a -ldflags "$(GOLDFLAGS)" \
-o ./bin/$(notdir $(RELEASE_BINARY))-$(GOOS)-$(GOARCH) $(HOST_AGENT_DIR)

Expand Down
2 changes: 1 addition & 1 deletion agent/reconciler/host_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (r *HostReconciler) deleteEndpointIP(ctx context.Context, byoHost *infrastr
logger := ctrl.LoggerFrom(ctx)
logger.Info("Removing network endpoints")
if IP, ok := byoHost.Annotations[infrastructurev1beta1.EndPointIPAnnotation]; ok {
network, err := vip.NewConfig(IP, registration.LocalHostRegistrar.ByoHostInfo.DefaultNetworkInterfaceName, false)
network, err := vip.NewConfig(IP, registration.LocalHostRegistrar.ByoHostInfo.DefaultNetworkInterfaceName, "", false, 0)
if err == nil {
err := network.DeleteIP()
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions agent/registration/csr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (

var _ = Describe("CSR Registration", func() {
var (
ctx = context.TODO()
hostName = "test-host"
fileDir string
ctx = context.TODO()
hostName = "test-host"
fileDir string
certExpiryDuration = int64((time.Hour * 24).Seconds())
)
Context("When bootstrap kubeconfig is provided", func() {
Expand Down
2 changes: 1 addition & 1 deletion docs/cluster_class.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ spec:
value: "10"
- name: vip_retryperiod
value: "2"
image: ghcr.io/kube-vip/kube-vip:v0.4.1
image: ghcr.io/kube-vip/kube-vip:v0.5.0
imagePullPolicy: IfNotPresent
name: kube-vip
resources: {}
Expand Down
15 changes: 9 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
module github.com/vmware-tanzu/cluster-api-provider-bringyourownhost

go 1.17
go 1.18

replace sigs.k8s.io/cluster-api => sigs.k8s.io/cluster-api v1.1.3

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

require (
github.com/cppforlife/go-cli-ui v0.0.0-20200716203538-1e47f820817f
github.com/docker/cli v20.10.17+incompatible
github.com/docker/docker v20.10.17+incompatible
github.com/go-logr/logr v1.2.2
github.com/jackpal/gateway v1.0.7
github.com/k14s/imgpkg v0.21.0
github.com/kube-vip/kube-vip v0.4.1
github.com/kube-vip/kube-vip v0.5.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.20.0
Expand Down Expand Up @@ -104,7 +106,7 @@ require (
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/insomniacslk/dhcp v0.0.0-20220504074936-1ca156eafb9f // indirect
github.com/insomniacslk/dhcp v0.0.0-20220119180841-3c283ff8b7dd // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
Expand All @@ -116,8 +118,9 @@ require (
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mdlayher/arp v0.0.0-20191213142603-f72070a231fc // indirect
github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7 // indirect
github.com/mdlayher/ndp v0.0.0-20210831201139-f982b8766fb5 // indirect
github.com/mdlayher/ndp v0.10.0 // indirect
github.com/mdlayher/raw v0.0.0-20211126142749-4eae47f3d54b // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand Down Expand Up @@ -146,7 +149,7 @@ require (
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/cobra v1.4.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.10.0 // indirect
github.com/spf13/viper v1.10.1 // indirect
github.com/stoewer/go-strcase v1.2.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/theupdateframework/notary v0.7.0 // indirect
Expand All @@ -161,7 +164,7 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 // indirect
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
Expand Down
Loading

0 comments on commit b961e16

Please sign in to comment.