Skip to content

Commit

Permalink
🌱 Bump sigs.k8s.io/cluster-api to main@v1.8.0-rc.0.0.20240926091600-d…
Browse files Browse the repository at this point in the history
…495b4efe59f (#3206)

* Bump sigs.k8s.io/cluster-api to main@v1.8.0-rc.0.0.20240926091600-d495b4efe59f

* controllers: fixes

* Bump CAPI mainfest to main

* ignore errors.MachineStatusError deprecation

* fixup test data

* Bump controller-gen

* add missing v1.9 metadata

* fix old conditions api

* Sync Makefile

* Pin capi version manifests to dated nightly

* Bump CAPI to match image

* fix unit tests

* Predicate related changes

* vsphere: bump manifests again

* bump go again

* Fix godoc and bump controller-gen

* fix predicate logs

* Bump cluster-api

* Suppress finalizer name API warnings

* review fixes
  • Loading branch information
chrischdi authored Oct 4, 2024
1 parent f5c6374 commit 25d6f09
Show file tree
Hide file tree
Showing 60 changed files with 526 additions and 919 deletions.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ issues:
- linters:
- staticcheck
text: "SA1019: .*PreferredAPIServerCIDR is deprecated"
# Deprecations for FailureReason
- linters:
- staticcheck
text: "SA1019: \"sigs.k8s.io/cluster-api/errors\" is deprecated:"
# Deprecations for old api groups
- linters:
- staticcheck
Expand Down
24 changes: 10 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ SHELL:=/usr/bin/env bash
# Go.
#
GO_VERSION ?= 1.22.7
GO_DIRECTIVE_VERSION ?= 1.22.0
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
GO_DIRECTIVE_VERSION ?= 1.22.0

# Use GOPROXY environment variable if set
GOPROXY := $(shell go env GOPROXY)
ifeq (,$(strip $(GOPROXY)))
ifeq ($(GOPROXY),)
GOPROXY := https://proxy.golang.org
endif
export GOPROXY

# Active module mode, as we use go modules to manage dependencies
export GO111MODULE := on
export GO111MODULE=on

#
# Kubebuilder.
#
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.28.0
export KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ?= 1.31.0
export KUBEBUILDER_CONTROLPLANE_START_TIMEOUT ?= 60s
export KUBEBUILDER_CONTROLPLANE_STOP_TIMEOUT ?= 60s

Expand Down Expand Up @@ -104,16 +104,12 @@ KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v4

# This is a commit from CR main (22.05.2024).
# Intentionally using a commit from main to use a setup-envtest version
# that uses binaries from controller-tools, not GCS.
# CR PR: https://github.com/kubernetes-sigs/controller-runtime/pull/2811
SETUP_ENVTEST_VER := v0.0.0-20240522175850-2e9781e9fc60
SETUP_ENVTEST_VER := release-0.19
SETUP_ENVTEST_BIN := setup-envtest
SETUP_ENVTEST := $(abspath $(TOOLS_BIN_DIR)/$(SETUP_ENVTEST_BIN)-$(SETUP_ENVTEST_VER))
SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest

CONTROLLER_GEN_VER := v0.15.0
CONTROLLER_GEN_VER := v0.16.3
CONTROLLER_GEN_BIN := controller-gen
CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/$(CONTROLLER_GEN_BIN)-$(CONTROLLER_GEN_VER))
CONTROLLER_GEN_PKG := sigs.k8s.io/controller-tools/cmd/controller-gen
Expand All @@ -123,7 +119,7 @@ GOTESTSUM_BIN := gotestsum
GOTESTSUM := $(abspath $(TOOLS_BIN_DIR)/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER))
GOTESTSUM_PKG := gotest.tools/gotestsum

CONVERSION_GEN_VER := v0.30.0
CONVERSION_GEN_VER := v0.31.0
CONVERSION_GEN_BIN := conversion-gen
# We are intentionally using the binary without version suffix, to avoid the version
# in generated files.
Expand All @@ -142,7 +138,7 @@ GO_APIDIFF_PKG := github.com/joelanford/go-apidiff

SHELLCHECK_VER := v0.9.0

TRIVY_VER := 0.47.0
TRIVY_VER := 0.49.1

KPROMO_VER := v4.0.5
KPROMO_BIN := kpromo
Expand Down Expand Up @@ -185,7 +181,7 @@ IMPORT_BOSS_VER := v0.28.1
IMPORT_BOSS := $(abspath $(TOOLS_BIN_DIR)/$(IMPORT_BOSS_BIN))
IMPORT_BOSS_PKG := k8s.io/code-generator/cmd/import-boss

CAPI_HACK_TOOLS_VER := 02769254e95db17afbd6ec4036aacbd294d9424c # Note: this is the commit ID of CAPI v1.8.1
CAPI_HACK_TOOLS_VER := 75c986db9e38190a2313eaf6e5f97d955fa96b65 # Note: this is the commit ID of CAPI 75c986db9e38190a2313eaf6e5f97d955fa96b65 from 2024-10-02

BOSKOSCTL_BIN := boskosctl
BOSKOSCTL := $(abspath $(TOOLS_BIN_DIR)/$(BOSKOSCTL_BIN))
Expand Down Expand Up @@ -263,7 +259,7 @@ ifeq ($(SELINUX_ENABLED),1)
endif

# Set build time variables including version details
LDFLAGS ?= $(shell hack/version.sh)
LDFLAGS := $(shell hack/version.sh)

# Additional CAPV vars (everything else is ~ kept in sync with core CAPI)
# Allow overriding manifest generation destination directory
Expand Down
4 changes: 2 additions & 2 deletions apis/v1alpha3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ func (v APIEndpoint) String() string {
// NetworkSpec defines the virtual machine's network configuration.
type NetworkSpec struct {
// Devices is the list of network devices used by the virtual machine.
// TODO(akutz) Make sure at least one network matches the
// ClusterSpec.CloudProviderConfiguration.Network.Name
//
// TODO(akutz) Make sure at least one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name
Devices []NetworkDeviceSpec `json:"devices"`

// Routes is a list of optional, static routes applied to the virtual
Expand Down
2 changes: 1 addition & 1 deletion apis/v1alpha3/vendored_cluster_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ type Condition struct {
// Last time the condition transitioned from one status to another.
// This should be when the underlying condition changed. If that is not known, then using the time when
// the API field changed is acceptable.
// +required
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

// The reason for the condition's last transition in CamelCase.
Expand Down
4 changes: 2 additions & 2 deletions apis/v1alpha4/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ func (v APIEndpoint) String() string {
// NetworkSpec defines the virtual machine's network configuration.
type NetworkSpec struct {
// Devices is the list of network devices used by the virtual machine.
// TODO(akutz) Make sure at least one network matches the
// ClusterSpec.CloudProviderConfiguration.Network.Name
//
// TODO(akutz) Make sure at least one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name
Devices []NetworkDeviceSpec `json:"devices"`

// Routes is a list of optional, static routes applied to the virtual
Expand Down
2 changes: 1 addition & 1 deletion apis/v1alpha4/vendored_cluster_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ type Condition struct {
// Last time the condition transitioned from one status to another.
// This should be when the underlying condition changed. If that is not known, then using the time when
// the API field changed is acceptable.
// +required
// +optional
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`

// The reason for the condition's last transition in CamelCase.
Expand Down
4 changes: 2 additions & 2 deletions apis/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ type PCIDeviceSpec struct {
// NetworkSpec defines the virtual machine's network configuration.
type NetworkSpec struct {
// Devices is the list of network devices used by the virtual machine.
// TODO(akutz) Make sure at least one network matches the
// ClusterSpec.CloudProviderConfiguration.Network.Name
//
// TODO(akutz) Make sure at least one network matches the ClusterSpec.CloudProviderConfiguration.Network.Name
Devices []NetworkDeviceSpec `json:"devices"`

// Routes is a list of optional, static routes applied to the virtual
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.3
name: vsphereclusteridentities.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand All @@ -23,7 +23,6 @@ spec:
description: |-
VSphereClusterIdentity defines the account to be used for reconciling clusters
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -166,7 +165,6 @@ spec:
description: |-
VSphereClusterIdentity defines the account to be used for reconciling clusters
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -414,7 +412,7 @@ spec:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may not be empty.
This field may be empty.
type: string
severity:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.3
name: vsphereclusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -41,7 +41,6 @@ spec:
description: |-
VSphereCluster is the Schema for the vsphereclusters API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand All @@ -68,7 +67,6 @@ spec:
description: |-
CloudProviderConfiguration holds the cluster-wide configuration for the vSphere cloud provider.
Deprecated: will be removed in v1alpha4.
properties:
disk:
Expand Down Expand Up @@ -307,7 +305,6 @@ spec:
Insecure is a flag that controls whether to validate the
vSphere server's certificate.
Deprecated: will be removed in v1alpha4.
type: boolean
loadBalancerRef:
Expand All @@ -318,7 +315,6 @@ spec:
will not be true until the referenced resource is Status.Ready and has a
non-empty Status.Address value.
Deprecated: will be removed in v1alpha4.
properties:
apiVersion:
Expand All @@ -333,7 +329,6 @@ spec:
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
Expand Down Expand Up @@ -471,7 +466,6 @@ spec:
description: |-
VSphereCluster is the Schema for the vsphereclusters API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -804,7 +798,7 @@ spec:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may not be empty.
This field may be empty.
type: string
severity:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.3
name: vsphereclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand All @@ -23,7 +23,6 @@ spec:
description: |-
VSphereClusterTemplate is the Schema for the vsphereclustertemplates API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.3
name: vspheredeploymentzones.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand All @@ -23,7 +23,6 @@ spec:
description: |-
VSphereDeploymentZone is the Schema for the vspheredeploymentzones API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -140,7 +139,6 @@ spec:
description: |-
VSphereDeploymentZone is the Schema for the vspheredeploymentzones API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -331,7 +329,7 @@ spec:
description: |-
The reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may not be empty.
This field may be empty.
type: string
severity:
description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.3
name: vspherefailuredomains.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand All @@ -23,7 +23,6 @@ spec:
description: |-
VSphereFailureDomain is the Schema for the vspherefailuredomains API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -155,7 +154,6 @@ spec:
description: |-
VSphereFailureDomain is the Schema for the vspherefailuredomains API
Deprecated: This type will be removed in one of the next releases.
properties:
apiVersion:
Expand Down Expand Up @@ -313,7 +311,6 @@ spec:
description: |-
AutoConfigure tags the Type which is specified in the Topology
Deprecated: This field is going to be removed in a future release.
type: boolean
name:
Expand Down Expand Up @@ -381,7 +378,6 @@ spec:
description: |-
AutoConfigure tags the Type which is specified in the Topology
Deprecated: This field is going to be removed in a future release.
type: boolean
name:
Expand Down
Loading

0 comments on commit 25d6f09

Please sign in to comment.