Skip to content
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
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v4

SETUP_ENVTEST_VER := release-0.21
SETUP_ENVTEST_VER := release-0.22
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.18.0
CONTROLLER_GEN_VER := v0.19.0
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 @@ -128,7 +128,7 @@ GOTESTSUM_BIN := gotestsum
GOTESTSUM := $(abspath $(TOOLS_BIN_DIR)/$(GOTESTSUM_BIN)-$(GOTESTSUM_VER))
GOTESTSUM_PKG := gotest.tools/gotestsum

CONVERSION_GEN_VER := v0.33.0
CONVERSION_GEN_VER := v0.34.0
CONVERSION_GEN_BIN := conversion-gen
# We are intentionally using the binary without version suffix, to avoid the version
# in generated files.
Expand Down
2 changes: 2 additions & 0 deletions apis/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ const (
// APIEndpoint represents a reachable Kubernetes API endpoint.
type APIEndpoint struct {
// The hostname on which the API server is serving.
// +optional
Host string `json:"host"`

// The port on which the API server is serving.
// +optional
Port int32 `json:"port"`
}

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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vsphereclusteridentities.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vsphereclusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -690,9 +690,6 @@ spec:
description: The port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
disableClusterModule:
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vsphereclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -176,9 +176,6 @@ spec:
description: The port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
disableClusterModule:
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspheredeploymentzones.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspherefailuredomains.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspheremachines.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspheremachinetemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspherevms.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: providerserviceaccounts.vmware.infrastructure.cluster.x-k8s.io
spec:
group: vmware.infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vsphereclusters.vmware.infrastructure.cluster.x-k8s.io
spec:
group: vmware.infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -52,9 +52,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
required:
- host
- port
type: object
network:
description: network defines the network configuration for the cluster
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vsphereclustertemplates.vmware.infrastructure.cluster.x-k8s.io
spec:
group: vmware.infrastructure.cluster.x-k8s.io
Expand Down Expand Up @@ -62,9 +62,6 @@ spec:
is serving.
format: int32
type: integer
required:
- host
- port
type: object
network:
description: network defines the network configuration for
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspheremachines.vmware.infrastructure.cluster.x-k8s.io
spec:
group: vmware.infrastructure.cluster.x-k8s.io
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.18.0
controller-gen.kubebuilder.io/version: v0.19.0
name: vspheremachinetemplates.vmware.infrastructure.cluster.x-k8s.io
spec:
group: vmware.infrastructure.cluster.x-k8s.io
Expand Down
6 changes: 0 additions & 6 deletions controllers/clustermodule_reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,6 @@ func TestReconciler_fetchMachineOwnerObjects(t *testing.T) {

func machineDeployment(name, namespace, cluster string) *clusterv1.MachineDeployment {
return &clusterv1.MachineDeployment{
TypeMeta: metav1.TypeMeta{
Kind: "MachineDeployment",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
Expand All @@ -533,9 +530,6 @@ func machineDeployment(name, namespace, cluster string) *clusterv1.MachineDeploy

func controlPlane(name, namespace, cluster string) *controlplanev1.KubeadmControlPlane {
return &controlplanev1.KubeadmControlPlane{
TypeMeta: metav1.TypeMeta{
Kind: "KubeadmControlPlane",
},
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
Expand Down
2 changes: 1 addition & 1 deletion controllers/vspherecluster_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ func (r *clusterReconciler) reconcileIdentitySecret(ctx context.Context, cluster
}

// If a different VSphereCluster is an owner return an error.
if !clusterutilv1.IsOwnedByObject(secret, vsphereCluster) && identity.IsOwnedByIdentityOrCluster(secret.GetOwnerReferences()) {
if !clusterutilv1.IsOwnedByObject(secret, vsphereCluster, infrav1.GroupVersion.WithKind("VSphereCluster").GroupKind()) && identity.IsOwnedByIdentityOrCluster(secret.GetOwnerReferences()) {
return fmt.Errorf("another cluster has set the OwnerRef for Secret %s/%s", secret.Namespace, secret.Name)
}

Expand Down
2 changes: 1 addition & 1 deletion controllers/vsphereclusteridentity_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (r clusterIdentityReconciler) Reconcile(ctx context.Context, req reconcile.
}

// If this secret is owned by a different VSphereClusterIdentity or a VSphereCluster, mark the identity as not ready and return an error.
if !clusterutilv1.IsOwnedByObject(secret, identity) && pkgidentity.IsOwnedByIdentityOrCluster(secret.GetOwnerReferences()) {
if !clusterutilv1.IsOwnedByObject(secret, identity, infrav1.GroupVersion.WithKind("VSphereClusterIdentity").GroupKind()) && pkgidentity.IsOwnedByIdentityOrCluster(secret.GetOwnerReferences()) {
v1beta1conditions.MarkFalse(identity, infrav1.CredentialsAvailableCondidtion, infrav1.SecretAlreadyInUseReason, clusterv1beta1.ConditionSeverityError, "secret being used by another Cluster/VSphereIdentity")
v1beta2conditions.Set(identity, metav1.Condition{
Type: infrav1.VSphereClusterIdentityAvailableV1Beta2Condition,
Expand Down
4 changes: 2 additions & 2 deletions controllers/vsphereclusteridentity_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var _ = Describe("VSphereClusterIdentity Reconciler", func() {
if err := testEnv.Get(ctx, skey, s); err != nil {
return false
}
return clusterutilv1.IsOwnedByObject(s, i)
return clusterutilv1.IsOwnedByObject(s, i, infrav1.GroupVersion.WithKind("VSphereClusterIdentity").GroupKind())
}, timeout).Should(BeTrue())
})

Expand Down Expand Up @@ -118,7 +118,7 @@ var _ = Describe("VSphereClusterIdentity Reconciler", func() {
if err := testEnv.Get(ctx, skey, s); err != nil {
return false
}
return clusterutilv1.IsOwnedByObject(s, i)
return clusterutilv1.IsOwnedByObject(s, i, infrav1.GroupVersion.WithKind("VSphereClusterIdentity").GroupKind())
}, timeout).Should(BeTrue())
})

Expand Down
Loading