diff --git a/.golangci.yml b/.golangci.yml
index bc313cbadf91..0e6b1ef0c878 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -269,7 +269,11 @@ linters:
- linters:
- staticcheck
text: 'SA1019: .*(res|result|i|j)\.Requeue is deprecated: Use `RequeueAfter` instead'
- # TODO: var-naming: avoid meaningless package names by revive
+ # CR v0.22 deprecated client.Apply, will be fixed via: https://github.com/kubernetes-sigs/cluster-api/issues/12695
+ - linters:
+ - staticcheck
+ text: 'SA1019: client.Apply is deprecated: Use client.Client.Apply'
+ # TODO: var-naming: avoid meaningless package names by revive
# * test/infrastructure/docker/internal/docker/types/
# * bootstrap/kubeadm/types/
# * internal/webhooks/util/
diff --git a/Makefile b/Makefile
index fe26fa4f3475..651f82588b82 100644
--- a/Makefile
+++ b/Makefile
@@ -106,12 +106,12 @@ KUSTOMIZE_BIN := kustomize
KUSTOMIZE := $(abspath $(TOOLS_BIN_DIR)/$(KUSTOMIZE_BIN)-$(KUSTOMIZE_VER))
KUSTOMIZE_PKG := sigs.k8s.io/kustomize/kustomize/v5
-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
@@ -121,7 +121,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.
diff --git a/api/core/v1beta1/cluster_types.go b/api/core/v1beta1/cluster_types.go
index c6ff0853b180..5d6d69a9b36d 100644
--- a/api/core/v1beta1/cluster_types.go
+++ b/api/core/v1beta1/cluster_types.go
@@ -1092,12 +1092,12 @@ func (c *ClusterStatus) GetTypedPhase() ClusterPhase {
type APIEndpoint struct {
// host is the hostname on which the API server is serving.
// TODO: Can't set MinLength=1 for now, because this struct is not always used in pointer fields so today we have cases where host is set to an empty string.
- // +required
+ // +optional
// +kubebuilder:validation:MaxLength=512
Host string `json:"host"`
// port is the port on which the API server is serving.
- // +required
+ // +optional
Port int32 `json:"port"`
}
diff --git a/api/core/v1beta1/conversion.go b/api/core/v1beta1/conversion.go
index 03d7a7a9ad8e..1b15ed66341c 100644
--- a/api/core/v1beta1/conversion.go
+++ b/api/core/v1beta1/conversion.go
@@ -2285,8 +2285,6 @@ func convertToObjectReference(ref clusterv1.ContractVersionedObjectReference, na
}
func Convert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps(in *JSONSchemaProps, out *clusterv1.JSONSchemaProps, s apimachineryconversion.Scope) error {
- // This conversion func is also required due to a bug in conversion gen that does not recognize the changes for converting bool to *bool.
- // By implementing this func, autoConvert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps is generated properly.
if err := autoConvert_v1beta1_JSONSchemaProps_To_v1beta2_JSONSchemaProps(in, out, s); err != nil {
return err
}
diff --git a/api/core/v1beta1/zz_generated.openapi.go b/api/core/v1beta1/zz_generated.openapi.go
index 13a78b23719c..723cf5a90c93 100644
--- a/api/core/v1beta1/zz_generated.openapi.go
+++ b/api/core/v1beta1/zz_generated.openapi.go
@@ -154,7 +154,6 @@ func schema_cluster_api_api_core_v1beta1_APIEndpoint(ref common.ReferenceCallbac
},
},
},
- Required: []string{"host", "port"},
},
},
}
diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
index 13c7c3dfd2c4..4d7156ab28ca 100644
--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
+++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigs.yaml
@@ -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: kubeadmconfigs.bootstrap.cluster.x-k8s.io
spec:
group: bootstrap.cluster.x-k8s.io
@@ -641,9 +641,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -816,9 +815,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -1638,9 +1636,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -1815,9 +1812,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -2084,8 +2080,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2143,6 +2140,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2298,8 +2332,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2357,6 +2392,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2545,8 +2617,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2604,6 +2677,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2778,8 +2888,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2837,6 +2948,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3305,9 +3453,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -3706,9 +3853,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -4205,8 +4351,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4264,6 +4411,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4453,8 +4637,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4512,6 +4697,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4735,8 +4957,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4794,6 +5017,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4959,8 +5219,9 @@ spec:
in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5018,6 +5279,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount containing
+ the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5526,9 +5824,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -6008,9 +6305,8 @@ spec:
a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
diff --git a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
index 0c742aa7913a..d9c04191981f 100644
--- a/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
+++ b/bootstrap/kubeadm/config/crd/bases/bootstrap.cluster.x-k8s.io_kubeadmconfigtemplates.yaml
@@ -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: kubeadmconfigtemplates.bootstrap.cluster.x-k8s.io
spec:
group: bootstrap.cluster.x-k8s.io
@@ -661,9 +661,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -838,9 +837,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -1614,9 +1612,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -1794,9 +1791,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -2031,8 +2027,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2091,6 +2088,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2251,8 +2285,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2311,6 +2346,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2505,8 +2577,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2566,6 +2639,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2744,8 +2854,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2804,6 +2915,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3286,9 +3434,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -3695,9 +3842,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -4074,8 +4220,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4134,6 +4281,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4328,8 +4512,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4388,6 +4573,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4618,8 +4840,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4679,6 +4902,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4848,8 +5108,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4908,6 +5169,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5428,9 +5726,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
@@ -5917,9 +6214,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at
+ which the taint was added.
format: date-time
type: string
value:
diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
index 50c708c77b26..6db9b13b544a 100644
--- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
+++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller_test.go
@@ -2347,7 +2347,6 @@ contexts:
user: default
name: default
current-context: default
-preferences: {}
users:
- name: default
user:
diff --git a/cmd/clusterctl/client/cluster/mover_test.go b/cmd/clusterctl/client/cluster/mover_test.go
index e72793011c32..83b1752c031a 100644
--- a/cmd/clusterctl/client/cluster/mover_test.go
+++ b/cmd/clusterctl/client/cluster/mover_test.go
@@ -693,10 +693,10 @@ var backupRestoreTests = []struct {
objs: test.NewFakeCluster("ns1", "foo").Objs(),
},
files: map[string]string{
- "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
- "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
- "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
- "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
+ "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
+ "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
+ "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
+ "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
},
wantErr: false,
},
@@ -711,14 +711,14 @@ var backupRestoreTests = []struct {
}(),
},
files: map[string]string{
- "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
- "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
- "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
- "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
- "Cluster_ns2_bar.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"creationTimestamp":null,"name":"bar","namespace":"ns2","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns2/bar"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"bar"}}}` + "\n",
- "Secret_ns2_bar-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-kubeconfig","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-kubeconfig"}}` + "\n",
- "Secret_ns2_bar-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"creationTimestamp":null,"name":"bar-ca","namespace":"ns2","resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-ca"}}` + "\n",
- "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"creationTimestamp":null,"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n",
+ "Cluster_ns1_foo.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"name":"foo","namespace":"ns1","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns1/foo"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"foo"}}}` + "\n",
+ "Secret_ns1_foo-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-kubeconfig","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-kubeconfig"}}` + "\n",
+ "Secret_ns1_foo-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"foo-ca","namespace":"ns1","resourceVersion":"999","uid":"/v1, Kind=Secret, ns1/foo-ca"}}` + "\n",
+ "GenericInfrastructureCluster_ns1_foo.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"labels":{"cluster.x-k8s.io/cluster-name":"foo"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"foo","uid":"$CAPI, Kind=Cluster, ns1/foo"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns1/foo"}}` + "\n",
+ "Cluster_ns2_bar.yaml": `{"apiVersion":"$CAPI","kind":"Cluster","metadata":{"name":"bar","namespace":"ns2","resourceVersion":"999","uid":"$CAPI, Kind=Cluster, ns2/bar"},"spec":{"infrastructureRef":{"apiGroup":"$INFRA_GROUP","kind":"GenericInfrastructureCluster","name":"bar"}}}` + "\n",
+ "Secret_ns2_bar-kubeconfig.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"bar-kubeconfig","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-kubeconfig"}}` + "\n",
+ "Secret_ns2_bar-ca.yaml": `{"apiVersion":"v1","kind":"Secret","metadata":{"name":"bar-ca","namespace":"ns2","resourceVersion":"999","uid":"/v1, Kind=Secret, ns2/bar-ca"}}` + "\n",
+ "GenericInfrastructureCluster_ns2_bar.yaml": `{"apiVersion":"$INFRA","kind":"GenericInfrastructureCluster","metadata":{"labels":{"cluster.x-k8s.io/cluster-name":"bar"},"name":"bar","namespace":"ns2","ownerReferences":[{"apiVersion":"$CAPI","kind":"Cluster","name":"bar","uid":"$CAPI, Kind=Cluster, ns2/bar"}],"resourceVersion":"999","uid":"$INFRA, Kind=GenericInfrastructureCluster, ns2/bar"}}` + "\n",
},
wantErr: false,
},
diff --git a/cmd/clusterctl/client/cluster/upgrader_info_test.go b/cmd/clusterctl/client/cluster/upgrader_info_test.go
index d13138ae3111..9397a1b6d98a 100644
--- a/cmd/clusterctl/client/cluster/upgrader_info_test.go
+++ b/cmd/clusterctl/client/cluster/upgrader_info_test.go
@@ -491,10 +491,6 @@ func toSemanticVersions(versions []string) []version.Version {
func fakeProvider(name string, providerType clusterctlv1.ProviderType, version, targetNamespace string) clusterctlv1.Provider {
return clusterctlv1.Provider{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterctlv1.GroupVersion.String(),
- Kind: "Provider",
- },
ObjectMeta: metav1.ObjectMeta{
ResourceVersion: "999",
Namespace: targetNamespace,
diff --git a/cmd/clusterctl/client/repository/components_test.go b/cmd/clusterctl/client/repository/components_test.go
index 0035cbac1619..f86c70e58ce3 100644
--- a/cmd/clusterctl/client/repository/components_test.go
+++ b/cmd/clusterctl/client/repository/components_test.go
@@ -241,8 +241,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "capm3-mutating-webhook-configuration",
+ "name": "capm3-mutating-webhook-configuration",
},
"webhooks": []interface{}{
map[string]interface{}{
@@ -329,8 +328,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "capm3-mutating-webhook-configuration",
+ "name": "capm3-mutating-webhook-configuration",
},
"webhooks": []interface{}{
map[string]interface{}{
@@ -390,8 +388,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "aCoolName",
+ "name": "aCoolName",
},
"spec": map[string]interface{}{
"group": "",
@@ -491,8 +488,7 @@ func Test_fixTargetNamespace(t *testing.T) {
"annotations": map[string]interface{}{
"cert-manager.io/inject-ca-from": "bar/capm3-serving-cert",
},
- "creationTimestamp": nil,
- "name": "aCoolName",
+ "name": "aCoolName",
},
"spec": map[string]interface{}{
"group": "",
diff --git a/cmd/clusterctl/client/tree/discovery.go b/cmd/clusterctl/client/tree/discovery.go
index d8ae0aaf6b71..05f44759d579 100644
--- a/cmd/clusterctl/client/tree/discovery.go
+++ b/cmd/clusterctl/client/tree/discovery.go
@@ -19,9 +19,11 @@ package tree
import (
"context"
+ "github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/client"
addonsv1 "sigs.k8s.io/cluster-api/api/addons/v1beta2"
@@ -110,7 +112,9 @@ func Discovery(ctx context.Context, c client.Client, namespace, name string, opt
addAnnotation(controlPlane, ObjectContractAnnotation, "ControlPlane")
addAnnotation(controlPlane, ObjectContractVersionAnnotation, contractVersion)
- addControlPlane(cluster, controlPlane, tree, options)
+ if err := addControlPlane(ctx, c, cluster, controlPlane, tree, options); err != nil {
+ return nil, err
+ }
}
// Adds control plane machines.
@@ -120,7 +124,7 @@ func Discovery(ctx context.Context, c client.Client, namespace, name string, opt
}
machineMap := map[string]bool{}
addMachineFunc := func(parent client.Object, m *clusterv1.Machine) {
- _, visible := tree.Add(parent, m)
+ _, visible := tree.Add(parent, m, GroupVersionKind(clusterv1.GroupVersion.WithKind("Machine")))
machineMap[m.Name] = true
if visible {
@@ -204,30 +208,51 @@ func addClusterResourceSetsToObjectTree(ctx context.Context, c client.Client, cl
}
}
-func addControlPlane(cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, tree *ObjectTree, options DiscoverOptions) {
+func addControlPlane(ctx context.Context, c client.Client, cluster *clusterv1.Cluster, controlPlane *unstructured.Unstructured, tree *ObjectTree, options DiscoverOptions) error {
tree.Add(cluster, controlPlane, ObjectMetaName("ControlPlane"), GroupingObject(true))
if options.ShowTemplates {
// Add control plane infrastructure ref using spec fields guaranteed in contract
- infrastructureRef, found, err := unstructured.NestedMap(controlPlane.UnstructuredContent(), "spec", "machineTemplate", "infrastructureRef")
- if err == nil && found {
- infrastructureObjectRef := &corev1.ObjectReference{
- Kind: infrastructureRef["kind"].(string),
- Namespace: infrastructureRef["namespace"].(string),
- Name: infrastructureRef["name"].(string),
- APIVersion: infrastructureRef["apiVersion"].(string),
- }
+ contractVersion, err := contract.GetContractVersionForVersion(ctx, c, controlPlane.GroupVersionKind().GroupKind(), controlPlane.GroupVersionKind().Version)
+ if err != nil {
+ return errors.Wrapf(err, "failed to get contract version for the ControlPlane object")
+ }
- machineTemplateRefObject := ObjectReferenceObject(infrastructureObjectRef)
- var templateParent client.Object
- if options.AddTemplateVirtualNode {
- templateParent = addTemplateVirtualNode(tree, controlPlane, cluster.Namespace)
- } else {
- templateParent = controlPlane
+ var infrastructureObjectRef *corev1.ObjectReference
+ if contractVersion == "v1beta1" {
+ currentRef, err := contract.ControlPlane().MachineTemplate().InfrastructureV1Beta1Ref().Get(controlPlane)
+ if err != nil {
+ return nil //nolint:nilerr // intentionally ignoring the error here because infraRef in CP is optional
}
- tree.Add(templateParent, machineTemplateRefObject, ObjectMetaName("MachineInfrastructureTemplate"))
+ infrastructureObjectRef = currentRef
+ } else {
+ currentRef, err := contract.ControlPlane().MachineTemplate().InfrastructureRef().Get(controlPlane)
+ if err != nil {
+ return nil //nolint:nilerr // intentionally ignoring the error here because infraRef in CP is optional
+ }
+ apiVersion, err := contract.GetAPIVersion(ctx, c, currentRef.GroupKind())
+ if err != nil {
+ return err
+ }
+ infrastructureObjectRef = &corev1.ObjectReference{
+ APIVersion: apiVersion,
+ Kind: currentRef.Kind,
+ Namespace: controlPlane.GetNamespace(),
+ Name: currentRef.Name,
+ }
+ }
+
+ machineTemplateRefObject := ObjectReferenceObject(infrastructureObjectRef)
+ var templateParent client.Object
+ if options.AddTemplateVirtualNode {
+ templateParent = addTemplateVirtualNode(tree, controlPlane, cluster.Namespace)
+ } else {
+ templateParent = controlPlane
}
+ tree.Add(templateParent, machineTemplateRefObject, ObjectMetaName("MachineInfrastructureTemplate"))
}
+
+ return nil
}
func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, cluster *clusterv1.Cluster, workers *NodeObject, machinesList *clusterv1.MachineList, tree *ObjectTree, options DiscoverOptions, addMachineFunc func(parent client.Object, m *clusterv1.Machine)) error {
@@ -248,6 +273,7 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus
if !options.ShowMachineSets {
addOpts = append(addOpts, GroupingObject(true))
}
+ addOpts = append(addOpts, GroupVersionKind(clusterv1.GroupVersion.WithKind("MachineDeployment")))
tree.Add(workers, md, addOpts...)
if options.ShowTemplates {
@@ -286,17 +312,17 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus
tree.Add(templateParent, machineTemplateRefObject, ObjectMetaName("MachineInfrastructureTemplate"))
}
- machineSets := selectMachinesSetsControlledBy(machineSetList, md)
+ machineSets := selectMachinesSetsControlledBy(machineSetList, md, clusterv1.GroupVersion.WithKind("MachineDeployment").GroupKind())
for i := range machineSets {
ms := machineSets[i]
var parent client.Object = md
if options.ShowMachineSets {
- tree.Add(md, ms, GroupingObject(true))
+ tree.Add(md, ms, GroupingObject(true), GroupVersionKind(clusterv1.GroupVersion.WithKind("MachineSet")))
parent = ms
}
- machines := selectMachinesControlledBy(machinesList, ms)
+ machines := selectMachinesControlledBy(machinesList, ms, clusterv1.GroupVersion.WithKind("MachineSet").GroupKind())
for _, w := range machines {
addMachineFunc(parent, w)
}
@@ -309,7 +335,7 @@ func addMachineDeploymentToObjectTree(ctx context.Context, c client.Client, clus
func addMachinePoolsToObjectTree(ctx context.Context, c client.Client, workers *NodeObject, machinePoolList *clusterv1.MachinePoolList, machinesList *clusterv1.MachineList, tree *ObjectTree, addMachineFunc func(parent client.Object, m *clusterv1.Machine)) {
for i := range machinePoolList.Items {
mp := &machinePoolList.Items[i]
- _, visible := tree.Add(workers, mp, GroupingObject(true))
+ _, visible := tree.Add(workers, mp, GroupingObject(true), GroupVersionKind(clusterv1.GroupVersion.WithKind("MachinePool")))
if visible {
if machinePoolBootstrap, err := external.GetObjectFromContractVersionedRef(ctx, c, mp.Spec.Template.Spec.Bootstrap.ConfigRef, mp.Namespace); err == nil {
@@ -321,7 +347,7 @@ func addMachinePoolsToObjectTree(ctx context.Context, c client.Client, workers *
}
}
- machines := selectMachinesControlledBy(machinesList, mp)
+ machines := selectMachinesControlledBy(machinesList, mp, clusterv1.GroupVersion.WithKind("MachinePool").GroupKind())
for _, m := range machines {
addMachineFunc(mp, m)
}
@@ -417,22 +443,22 @@ func selectControlPlaneMachines(machineList *clusterv1.MachineList) []*clusterv1
return machines
}
-func selectMachinesSetsControlledBy(machineSetList *clusterv1.MachineSetList, controller client.Object) []*clusterv1.MachineSet {
+func selectMachinesSetsControlledBy(machineSetList *clusterv1.MachineSetList, controller client.Object, controllerGK schema.GroupKind) []*clusterv1.MachineSet {
machineSets := []*clusterv1.MachineSet{}
for i := range machineSetList.Items {
m := &machineSetList.Items[i]
- if util.IsControlledBy(m, controller) {
+ if util.IsControlledBy(m, controller, controllerGK) {
machineSets = append(machineSets, m)
}
}
return machineSets
}
-func selectMachinesControlledBy(machineList *clusterv1.MachineList, controller client.Object) []*clusterv1.Machine {
+func selectMachinesControlledBy(machineList *clusterv1.MachineList, controller client.Object, controllerGK schema.GroupKind) []*clusterv1.Machine {
machines := []*clusterv1.Machine{}
for i := range machineList.Items {
m := &machineList.Items[i]
- if util.IsControlledBy(m, controller) {
+ if util.IsControlledBy(m, controller, controllerGK) {
machines = append(machines, m)
}
}
diff --git a/cmd/clusterctl/client/tree/options.go b/cmd/clusterctl/client/tree/options.go
index cb52a426d2b3..7e898d6329f6 100644
--- a/cmd/clusterctl/client/tree/options.go
+++ b/cmd/clusterctl/client/tree/options.go
@@ -16,16 +16,22 @@ limitations under the License.
package tree
+import (
+ "k8s.io/apimachinery/pkg/runtime/schema"
+ "k8s.io/utils/ptr"
+)
+
// AddObjectOption define an option for the ObjectTree Add operation.
type AddObjectOption interface {
ApplyToAdd(*addObjectOptions)
}
type addObjectOptions struct {
- MetaName string
- GroupingObject bool
- NoEcho bool
- ZOrder int
+ GroupVersionKind *schema.GroupVersionKind
+ MetaName string
+ GroupingObject bool
+ NoEcho bool
+ ZOrder int
}
func (o *addObjectOptions) ApplyOptions(opts []AddObjectOption) *addObjectOptions {
@@ -35,6 +41,16 @@ func (o *addObjectOptions) ApplyOptions(opts []AddObjectOption) *addObjectOption
return o
}
+// GroupVersionKind is the gvk to set on the passed in obj.
+// This option has to be used if obj is a typed object and
+// it cannot be guaranteed that gvk is set.
+type GroupVersionKind schema.GroupVersionKind
+
+// ApplyToAdd applies the given options.
+func (n GroupVersionKind) ApplyToAdd(options *addObjectOptions) {
+ options.GroupVersionKind = ptr.To(schema.GroupVersionKind(n))
+}
+
// The ObjectMetaName option defines the meta name that should be used for the object in the presentation layer,
// e.g. control plane for KCP.
type ObjectMetaName string
diff --git a/cmd/clusterctl/client/tree/tree.go b/cmd/clusterctl/client/tree/tree.go
index 13cbc3140b64..b1aa9db75f22 100644
--- a/cmd/clusterctl/client/tree/tree.go
+++ b/cmd/clusterctl/client/tree/tree.go
@@ -97,6 +97,10 @@ func (od ObjectTree) Add(parent, obj client.Object, opts ...AddObjectOption) (ad
addOpts := &addObjectOptions{}
addOpts.ApplyOptions(opts)
+ if addOpts.GroupVersionKind != nil {
+ obj.GetObjectKind().SetGroupVersionKind(*addOpts.GroupVersionKind)
+ }
+
// Get a small set of conditions that will be used to determine e.g. when grouping or when an object is just an echo of
// its parent.
var objReadyV1Beta1, parentReadyV1Beta1 *clusterv1.Condition
diff --git a/cmd/clusterctl/client/upgrade_test.go b/cmd/clusterctl/client/upgrade_test.go
index d5df8f6e1862..bf633f021d0e 100644
--- a/cmd/clusterctl/client/upgrade_test.go
+++ b/cmd/clusterctl/client/upgrade_test.go
@@ -365,10 +365,6 @@ func fakeClientForUpgrade() *fakeClient {
func fakeProvider(name string, providerType clusterctlv1.ProviderType, version, targetNamespace string) clusterctlv1.Provider {
return clusterctlv1.Provider{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterctlv1.GroupVersion.String(),
- Kind: "Provider",
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: targetNamespace,
Name: clusterctlv1.ManifestLabel(name, providerType),
diff --git a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
index 1eeae9cb934b..7ca550194471 100644
--- a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
+++ b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_metadata.yaml
@@ -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: metadata.clusterctl.cluster.x-k8s.io
spec:
group: clusterctl.cluster.x-k8s.io
diff --git a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
index 8d7e2cc0f02a..4e9f47ffd652 100644
--- a/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
+++ b/cmd/clusterctl/config/crd/bases/clusterctl.cluster.x-k8s.io_providers.yaml
@@ -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: providers.clusterctl.cluster.x-k8s.io
spec:
group: clusterctl.cluster.x-k8s.io
diff --git a/cmd/clusterctl/config/manifest/clusterctl-api.yaml b/cmd/clusterctl/config/manifest/clusterctl-api.yaml
index 9f3f6ab67262..e906a9fe4aa4 100644
--- a/cmd/clusterctl/config/manifest/clusterctl-api.yaml
+++ b/cmd/clusterctl/config/manifest/clusterctl-api.yaml
@@ -2,7 +2,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: providers.clusterctl.cluster.x-k8s.io
spec:
group: clusterctl.cluster.x-k8s.io
diff --git a/cmd/clusterctl/internal/test/fake_objects.go b/cmd/clusterctl/internal/test/fake_objects.go
index c91ee9bcf40c..61997b6864d3 100644
--- a/cmd/clusterctl/internal/test/fake_objects.go
+++ b/cmd/clusterctl/internal/test/fake_objects.go
@@ -25,6 +25,7 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
+ "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/v2"
"k8s.io/utils/ptr"
@@ -358,11 +359,12 @@ func (f *FakeControlPlane) Objs(cluster *clusterv1.Cluster) []client.Object {
},
Spec: fakecontrolplane.GenericControlPlaneSpec{
MachineTemplate: fakecontrolplane.GenericMachineTemplate{
- InfrastructureRef: corev1.ObjectReference{
- APIVersion: controlPlaneInfrastructure.APIVersion,
- Kind: controlPlaneInfrastructure.Kind,
- Namespace: controlPlaneInfrastructure.Namespace,
- Name: controlPlaneInfrastructure.Name,
+ Spec: fakecontrolplane.GenericMachineTemplateSpec{
+ InfrastructureRef: clusterv1.ContractVersionedObjectReference{
+ APIGroup: fakeinfrastructure.GroupVersion.Group,
+ Kind: controlPlaneInfrastructure.Kind,
+ Name: controlPlaneInfrastructure.Name,
+ },
},
},
},
@@ -1555,11 +1557,15 @@ func (f *FakeClusterClass) Objs() []client.Object {
}
clusterClass := clusterClassBuilder.Build()
+ clusterClass.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("ClusterClass"))
objMap[clusterClass] = false
for o := range objMap {
setUID(o)
}
+ // GVK should be only set for setUID to avoid the wrong assumption that GVK is set on a
+ // ClusterClass in other parts of the code.
+ clusterClass.SetGroupVersionKind(schema.GroupVersionKind{})
for o, setOwnerReference := range objMap {
if setOwnerReference {
diff --git a/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go b/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go
index b4a130942c87..4dd0bac89056 100644
--- a/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go
+++ b/cmd/clusterctl/internal/test/providers/controlplane/generic_types.go
@@ -17,13 +17,19 @@ limitations under the License.
package controlplane
import (
- corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+
+ clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
)
// GenericMachineTemplate contains a generic control plane spec.
type GenericMachineTemplate struct {
- InfrastructureRef corev1.ObjectReference `json:"infrastructureRef"`
+ Spec GenericMachineTemplateSpec `json:"spec"`
+}
+
+// GenericMachineTemplateSpec contains a generic control plane spec.
+type GenericMachineTemplateSpec struct {
+ InfrastructureRef clusterv1.ContractVersionedObjectReference `json:"infrastructureRef"`
}
// GenericControlPlaneSpec contains a generic control plane spec.
diff --git a/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go b/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go
index aacc2ef45d3d..06b3473ff854 100644
--- a/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go
+++ b/cmd/clusterctl/internal/test/providers/controlplane/zz_generated.deepcopy.go
@@ -101,7 +101,7 @@ func (in *GenericControlPlaneSpec) DeepCopy() *GenericControlPlaneSpec {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GenericMachineTemplate) DeepCopyInto(out *GenericMachineTemplate) {
*out = *in
- out.InfrastructureRef = in.InfrastructureRef
+ out.Spec = in.Spec
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericMachineTemplate.
@@ -113,3 +113,19 @@ func (in *GenericMachineTemplate) DeepCopy() *GenericMachineTemplate {
in.DeepCopyInto(out)
return out
}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *GenericMachineTemplateSpec) DeepCopyInto(out *GenericMachineTemplateSpec) {
+ *out = *in
+ out.InfrastructureRef = in.InfrastructureRef
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericMachineTemplateSpec.
+func (in *GenericMachineTemplateSpec) DeepCopy() *GenericMachineTemplateSpec {
+ if in == nil {
+ return nil
+ }
+ out := new(GenericMachineTemplateSpec)
+ in.DeepCopyInto(out)
+ return out
+}
diff --git a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml
index aaada266bed9..22c512caa66b 100644
--- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml
+++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesetbindings.yaml
@@ -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: clusterresourcesetbindings.addons.cluster.x-k8s.io
spec:
group: addons.cluster.x-k8s.io
diff --git a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml
index e566096811dd..7cd655dd2853 100644
--- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml
+++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml
@@ -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: clusterresourcesets.addons.cluster.x-k8s.io
spec:
group: addons.cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
index dd3ca76f608e..60ca830f5af1 100644
--- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml
@@ -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: clusterclasses.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml
index 6bae359e86fa..e3b22be95125 100644
--- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml
@@ -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: clusters.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
@@ -855,9 +855,6 @@ spec:
description: port is the port on which the API server is serving.
format: int32
type: integer
- required:
- - host
- - port
type: object
controlPlaneRef:
description: |-
diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
index db9491037f84..deeb748a2a6c 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml
@@ -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: machinedeployments.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml b/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml
index 927182c1b857..4e9f1f649529 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinedrainrules.yaml
@@ -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: machinedrainrules.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
index db99e6286fd6..cd6cfc67d52c 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml
@@ -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: machinehealthchecks.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml
index d8094cc1053a..9f287129fd04 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml
@@ -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: machinepools.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_machines.yaml b/config/crd/bases/cluster.x-k8s.io_machines.yaml
index 7de8401c07e7..12f910515b07 100644
--- a/config/crd/bases/cluster.x-k8s.io_machines.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machines.yaml
@@ -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: machines.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
index c3ecdaa0ac3c..bb806f6b3935 100644
--- a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
+++ b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml
@@ -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: machinesets.cluster.x-k8s.io
spec:
group: cluster.x-k8s.io
diff --git a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml
index ed03b07b3c72..467cd4147a22 100644
--- a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml
+++ b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml
@@ -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: ipaddressclaims.ipam.cluster.x-k8s.io
spec:
group: ipam.cluster.x-k8s.io
diff --git a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml
index 6f4cf9e248a8..1dd4002f3717 100644
--- a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml
+++ b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddresses.yaml
@@ -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: ipaddresses.ipam.cluster.x-k8s.io
spec:
group: ipam.cluster.x-k8s.io
diff --git a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml
index 65ff45142e2b..666b2c3b1836 100644
--- a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml
+++ b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml
@@ -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: extensionconfigs.runtime.cluster.x-k8s.io
spec:
group: runtime.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml
index 100c8844e266..93c784c367b4 100644
--- a/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t1/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -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: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml
index 497595ef1136..5b228b55e307 100644
--- a/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t2/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -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: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml
index 26026c0f3991..fe9779f3d0db 100644
--- a/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t3/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -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: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml b/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml
index dde0047add67..883127ebc120 100644
--- a/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml
+++ b/controllers/crdmigrator/test/t4/crd/test.cluster.x-k8s.io_testclusters.yaml
@@ -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: testclusters.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
index 1f43319a0864..fec6112d42d4 100644
--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
+++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanes.yaml
@@ -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: kubeadmcontrolplanes.controlplane.cluster.x-k8s.io
spec:
group: controlplane.cluster.x-k8s.io
@@ -733,9 +733,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -908,9 +907,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -1874,9 +1872,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -2052,9 +2049,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -2555,8 +2551,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2614,6 +2611,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2771,8 +2805,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2830,6 +2865,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3021,8 +3093,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3081,6 +3154,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3257,8 +3367,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3316,6 +3427,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3791,9 +3939,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -4196,9 +4343,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -5119,8 +5265,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5178,6 +5325,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5369,8 +5553,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5428,6 +5613,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5654,8 +5876,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5714,6 +5937,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -5881,8 +6141,9 @@ spec:
present in a Container.
properties:
name:
- description: Name of the environment variable. Must
- be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -5940,6 +6201,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume mount
+ containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -6453,9 +6751,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
@@ -6938,9 +7235,8 @@ spec:
to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time at which
+ the taint was added.
format: date-time
type: string
value:
diff --git a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
index badeef3309e0..f1adad63fb64 100644
--- a/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
+++ b/controlplane/kubeadm/config/crd/bases/controlplane.cluster.x-k8s.io_kubeadmcontrolplanetemplates.yaml
@@ -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: kubeadmcontrolplanetemplates.controlplane.cluster.x-k8s.io
spec:
group: controlplane.cluster.x-k8s.io
@@ -674,9 +674,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -854,9 +853,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -1240,8 +1238,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -1301,6 +1300,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -1463,8 +1499,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -1524,6 +1561,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -1720,8 +1794,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment
- variable. Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -1784,6 +1859,44 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the
+ volume mount containing the
+ env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -1964,8 +2077,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -2025,6 +2139,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -2512,9 +2663,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -2922,9 +3072,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -3486,8 +3635,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3547,6 +3697,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -3744,8 +3931,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -3805,6 +3993,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4039,8 +4264,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment
- variable. Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4103,6 +4329,44 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the
+ volume mount containing the
+ env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4275,8 +4539,9 @@ spec:
variable present in a Container.
properties:
name:
- description: Name of the environment variable.
- Must be a C_IDENTIFIER.
+ description: |-
+ Name of the environment variable.
+ May consist of any printable ASCII characters except '='.
type: string
value:
description: |-
@@ -4336,6 +4601,43 @@ spec:
- fieldPath
type: object
x-kubernetes-map-type: atomic
+ fileKeyRef:
+ description: |-
+ FileKeyRef selects a key of the env file.
+ Requires the EnvFiles feature gate to be enabled.
+ properties:
+ key:
+ description: |-
+ The key within the env file. An invalid key will prevent the pod from starting.
+ The keys defined within a source may consist of any printable ASCII characters except '='.
+ During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters.
+ type: string
+ optional:
+ default: false
+ description: |-
+ Specify whether the file or its key must be defined. If the file or key
+ does not exist, then the env var is not published.
+ If optional is set to true and the specified key does not exist,
+ the environment variable will not be set in the Pod's containers.
+
+ If optional is set to false and the specified key does not exist,
+ an error will be returned during Pod creation.
+ type: boolean
+ path:
+ description: |-
+ The path within the volume from which to select the file.
+ Must be relative and may not contain the '..' path or start with '..'.
+ type: string
+ volumeName:
+ description: The name of the volume
+ mount containing the env file.
+ type: string
+ required:
+ - key
+ - path
+ - volumeName
+ type: object
+ x-kubernetes-map-type: atomic
resourceFieldRef:
description: |-
Selects a resource of the container: only resources limits and requests
@@ -4862,9 +5164,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
@@ -5353,9 +5654,8 @@ spec:
be applied to a node.
type: string
timeAdded:
- description: |-
- TimeAdded represents the time at which the taint was added.
- It is only written for NoExecute taints.
+ description: TimeAdded represents the time
+ at which the taint was added.
format: date-time
type: string
value:
diff --git a/controlplane/kubeadm/internal/controllers/controller.go b/controlplane/kubeadm/internal/controllers/controller.go
index ec7502a700c9..fb66f1b1453d 100644
--- a/controlplane/kubeadm/internal/controllers/controller.go
+++ b/controlplane/kubeadm/internal/controllers/controller.go
@@ -308,7 +308,7 @@ func (r *KubeadmControlPlaneReconciler) initControlPlaneScope(ctx context.Contex
return nil, true, r.adoptMachines(ctx, kcp, adoptableMachines, cluster)
}
- ownedMachines := controlPlaneMachines.Filter(collections.OwnedMachines(kcp))
+ ownedMachines := controlPlaneMachines.Filter(collections.OwnedMachines(kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind()))
if kcp.DeletionTimestamp.IsZero() && len(ownedMachines) != len(controlPlaneMachines) {
err := errors.New("not all control plane machines are owned by this KubeadmControlPlane, refusing to operate in mixed management mode")
log.Error(err, "KCP cannot reconcile")
@@ -1387,7 +1387,7 @@ func (r *KubeadmControlPlaneReconciler) adoptOwnedSecrets(ctx context.Context, k
for i := range secrets.Items {
s := secrets.Items[i]
- if !util.IsOwnedByObject(&s, currentOwner) {
+ if !util.IsOwnedByObject(&s, currentOwner, bootstrapv1.GroupVersion.WithKind("KubeadmConfig").GroupKind()) {
continue
}
// avoid taking ownership of the bootstrap data secret
diff --git a/controlplane/kubeadm/internal/controllers/helpers.go b/controlplane/kubeadm/internal/controllers/helpers.go
index bcc3c4518375..4eee7c19853a 100644
--- a/controlplane/kubeadm/internal/controllers/helpers.go
+++ b/controlplane/kubeadm/internal/controllers/helpers.go
@@ -94,7 +94,7 @@ func (r *KubeadmControlPlaneReconciler) reconcileKubeconfig(ctx context.Context,
}
// only do rotation on owned secrets
- if !util.IsControlledBy(configSecret, controlPlane.KCP) {
+ if !util.IsControlledBy(configSecret, controlPlane.KCP, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind()) {
return ctrl.Result{}, nil
}
diff --git a/controlplane/kubeadm/internal/controllers/scale_test.go b/controlplane/kubeadm/internal/controllers/scale_test.go
index b125a7abfdc9..ace9e7681391 100644
--- a/controlplane/kubeadm/internal/controllers/scale_test.go
+++ b/controlplane/kubeadm/internal/controllers/scale_test.go
@@ -88,7 +88,7 @@ func TestKubeadmControlPlaneReconciler_initializeControlPlane(t *testing.T) {
g.Expect(env.GetAPIReader().List(ctx, machineList, client.InNamespace(cluster.Namespace))).To(Succeed())
g.Expect(machineList.Items).To(HaveLen(1))
- res, err := collections.GetFilteredMachinesForCluster(ctx, env.GetAPIReader(), cluster, collections.OwnedMachines(kcp))
+ res, err := collections.GetFilteredMachinesForCluster(ctx, env.GetAPIReader(), cluster, collections.OwnedMachines(kcp, controlplanev1.GroupVersion.WithKind("KubeadmControlPlane").GroupKind()))
g.Expect(res).To(HaveLen(1))
g.Expect(err).ToNot(HaveOccurred())
diff --git a/controlplane/kubeadm/internal/etcd/etcd.go b/controlplane/kubeadm/internal/etcd/etcd.go
index 835f320256ca..6d959fa8451e 100644
--- a/controlplane/kubeadm/internal/etcd/etcd.go
+++ b/controlplane/kubeadm/internal/etcd/etcd.go
@@ -41,7 +41,7 @@ type etcd interface {
AlarmList(ctx context.Context) (*clientv3.AlarmResponse, error)
Close() error
Endpoints() []string
- MemberList(ctx context.Context) (*clientv3.MemberListResponse, error)
+ MemberList(ctx context.Context, opts ...clientv3.OpOption) (*clientv3.MemberListResponse, error)
MemberRemove(ctx context.Context, id uint64) (*clientv3.MemberRemoveResponse, error)
MoveLeader(ctx context.Context, id uint64) (*clientv3.MoveLeaderResponse, error)
Status(ctx context.Context, endpoint string) (*clientv3.StatusResponse, error)
diff --git a/controlplane/kubeadm/internal/etcd/fake/client.go b/controlplane/kubeadm/internal/etcd/fake/client.go
index 9d0f28a08811..7c2b024f22a0 100644
--- a/controlplane/kubeadm/internal/etcd/fake/client.go
+++ b/controlplane/kubeadm/internal/etcd/fake/client.go
@@ -52,7 +52,7 @@ func (c *FakeEtcdClient) AlarmList(_ context.Context) (*clientv3.AlarmResponse,
return c.AlarmResponse, c.ErrorResponse
}
-func (c *FakeEtcdClient) MemberList(_ context.Context) (*clientv3.MemberListResponse, error) {
+func (c *FakeEtcdClient) MemberList(_ context.Context, _ ...clientv3.OpOption) (*clientv3.MemberListResponse, error) {
return c.MemberListResponse, c.ErrorResponse
}
func (c *FakeEtcdClient) MemberRemove(_ context.Context, i uint64) (*clientv3.MemberRemoveResponse, error) {
diff --git a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go
index 0f0be800a820..420ba9ab43bf 100644
--- a/controlplane/kubeadm/internal/workload_cluster_coredns_test.go
+++ b/controlplane/kubeadm/internal/workload_cluster_coredns_test.go
@@ -1139,10 +1139,6 @@ func (m *fakeMigrator) Migrate(_, _, _ string, _ bool) (string, error) {
func newCoreDNSInfoDeploymentWithimage(image string) *appsv1.Deployment {
return &appsv1.Deployment{
- TypeMeta: metav1.TypeMeta{
- Kind: "Deployment",
- APIVersion: "apps/v1",
- },
ObjectMeta: metav1.ObjectMeta{
Name: coreDNSKey,
Namespace: metav1.NamespaceSystem,
diff --git a/docs/book/src/SUMMARY.md b/docs/book/src/SUMMARY.md
index d2e7feb3f3a7..db75a2cc6395 100644
--- a/docs/book/src/SUMMARY.md
+++ b/docs/book/src/SUMMARY.md
@@ -101,9 +101,9 @@
- [Best practices](./developer/providers/best-practices.md)
- [Security guidelines](./developer/providers/security-guidelines.md)
- [Version migration](developer/providers/migrations/overview.md)
- - [v1.8 to v1.9](./developer/providers/migrations/v1.8-to-v1.9.md)
- [v1.9 to v1.10](./developer/providers/migrations/v1.9-to-v1.10.md)
- [v1.10 to v1.11](./developer/providers/migrations/v1.10-to-v1.11.md)
+ - [v1.11 to v1.12](./developer/providers/migrations/v1.11-to-v1.12.md)
- [Troubleshooting](./user/troubleshooting.md)
- [Reference](./reference/reference.md)
- [API Reference](./reference/api/reference.md)
diff --git a/docs/book/src/developer/providers/migrations/v1.11-to-v1.12.md b/docs/book/src/developer/providers/migrations/v1.11-to-v1.12.md
new file mode 100644
index 000000000000..5ad89914faf6
--- /dev/null
+++ b/docs/book/src/developer/providers/migrations/v1.11-to-v1.12.md
@@ -0,0 +1,38 @@
+# Cluster API v1.11 compared to v1.12
+
+This document provides an overview over relevant changes between Cluster API v1.11 and v1.12 for
+maintainers of providers and consumers of our Go API.
+
+## Go version
+
+- The minimal Go version required to build Cluster API is v1.24.x
+- The Go version used by Cluster API is v1.24.x
+
+## Dependencies
+
+- The Controller Runtime version used by Cluster API is v0.22.x
+- The version of the Kubernetes libraries used by Cluster API is v1.34.x
+
+## Changes by Kind
+
+### Deprecation
+
+### Removals
+
+### API Changes
+
+### Other
+
+* `util.IsOwnedByObject`, `util.IsControlledBy` and `collections.OwnedMachines` now also require `schema.GroupKind` as input parameter.
+ `schema.GroupKind` is needed for cases where typed objects are passed in because controller-runtime does not guarantee that GVK is set on typed objects.
+
+### Suggested changes for providers
+
+* For providers that copied the core Cluster API v1beta1 `APIEndpoint` struct and used it in their InfraCluster Go type
+ it is recommended to now make the `Host` and `Port` fields optional (they already have been made optional in
+ `clusterv1beta1.APIEndpoint` in Cluster API v1.12).
+ tl;dr The fields were previously required, but due to side effects that validation was never enforced. These side
+ effects might go away which then makes the fields suddenly required. To avoid issues we recommend making the fields
+ optional. Similar to how they are optional in the v1beta2 `APIEndpoint` struct and v1beta2 InfraCluster contract.
+ For more details, please see: https://github.com/kubernetes-sigs/cluster-api/pull/12634#discussion_r2275468291.
+ But this might look differently depending on how your InfraCluster Go type and corresponding mutating webhook evolved over time.
diff --git a/docs/book/src/developer/providers/migrations/v1.8-to-v1.9.md b/docs/book/src/developer/providers/migrations/v1.8-to-v1.9.md
deleted file mode 100644
index 81e13b91167f..000000000000
--- a/docs/book/src/developer/providers/migrations/v1.8-to-v1.9.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Cluster API v1.8 compared to v1.9
-
-This document provides an overview over relevant changes between Cluster API v1.8 and v1.9 for
-maintainers of providers and consumers of our Go API.
-
-## Go version
-
-- The Go version used by Cluster API is Go 1.22.x
-
-## Changes by Kind
-
-### Deprecation
-
-### Removals
-
-### API Changes
-
-### Other
-
-- Notes for Machines managed by KCP (starting with Cluster API v1.8.2):
- - KCP adds its own pre-terminate hook on all Machines it controls. This is done to ensure it can later remove
- the etcd member right before Machine termination (i.e. before InfraMachine deletion).
- - Starting with Kubernetes v1.31 the KCP pre-terminate hook will wait for all other pre-terminate hooks to finish to
- ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is only done
- for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31. This feature configures
- the kubelet to communicate with the local apiserver. Only because of that the kubelet immediately starts failing after the etcd
- member is removed. We need the ControlPlaneKubeletLocalMode feature with 1.31 to adhere to the kubelet skew policy.
-
-### Suggested changes for providers
-
-- The Errors package was created when capi provider implementation was running as machineActuators that needed to vendor core capi to function. There is no usage recommendations today and its value is questionable since we moved to CRDs that inter-operate mostly via conditions. Instead we plan to drop the dedicated semantic for terminal failure and keep improving Machine lifecycle signal through conditions. Therefore the Errors package [has been deprecated in v1.8](https://github.com/kubernetes-sigs/cluster-api/issues/10784). It's recommended to remove any usage of the currently exported variables.
-- The `ClusterCacheTracker` component has been deprecated, please use the new `ClusterCache` instead. For more context and examples for
- how to use it, see [PR: Introduce new ClusterCache](https://github.com/kubernetes-sigs/cluster-api/pull/11247) and the corresponding
- [issue](https://github.com/kubernetes-sigs/cluster-api/issues/11272). Some notes:
- - The `DisabledFor` option (previously `ClientUncachedObjects`) is not defaulted to `&corev1.ConfigMap` & `&corev1.Secret` anymore,
- thus it's now necessary to explicitly set `DisabledFor` to avoid caching ConfigMaps and Secrets.
- - `SecretClient` and `UserAgent` are now mandatory options, please take a look at the corresponding godoc.
diff --git a/exp/topology/desiredstate/desired_state_test.go b/exp/topology/desiredstate/desired_state_test.go
index cadbf8bf63ee..a2e41371ffe5 100644
--- a/exp/topology/desiredstate/desired_state_test.go
+++ b/exp/topology/desiredstate/desired_state_test.go
@@ -1220,10 +1220,9 @@ func TestComputeControlPlaneVersion(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
},
},
Annotations: map[string]string{
@@ -1565,10 +1564,9 @@ func TestComputeControlPlaneVersion(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
},
})
if tt.s.Current.Cluster.Annotations == nil {
diff --git a/go.mod b/go.mod
index 2121ce323932..9042af2fad31 100644
--- a/go.mod
+++ b/go.mod
@@ -18,7 +18,7 @@ require (
github.com/go-logr/logr v1.4.3
github.com/gobuffalo/flect v1.0.3
// Note: This must be kept in sync with the version used by k8s.io.
- github.com/google/cel-go v0.23.2
+ github.com/google/cel-go v0.26.0
github.com/google/go-cmp v0.7.0
github.com/google/go-github/v53 v53.2.0
github.com/olekukonko/tablewriter v0.0.5
@@ -30,32 +30,32 @@ require (
github.com/spf13/pflag v1.0.7
github.com/spf13/viper v1.20.1
github.com/valyala/fastjson v1.6.4
- go.etcd.io/etcd/api/v3 v3.5.22
- go.etcd.io/etcd/client/pkg/v3 v3.5.22
- go.etcd.io/etcd/client/v3 v3.5.22
+ go.etcd.io/etcd/api/v3 v3.6.4
+ go.etcd.io/etcd/client/pkg/v3 v3.6.4
+ go.etcd.io/etcd/client/v3 v3.6.4
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/oauth2 v0.30.0
golang.org/x/text v0.28.0
gomodules.xyz/jsonpatch/v2 v2.5.0
- google.golang.org/grpc v1.71.3
- k8s.io/api v0.33.4
- k8s.io/apiextensions-apiserver v0.33.4
- k8s.io/apimachinery v0.33.4
- k8s.io/apiserver v0.33.4
- k8s.io/client-go v0.33.4
- k8s.io/cluster-bootstrap v0.33.4
- k8s.io/component-base v0.33.4
+ google.golang.org/grpc v1.72.1
+ k8s.io/api v0.34.0
+ k8s.io/apiextensions-apiserver v0.34.0
+ k8s.io/apimachinery v0.34.0
+ k8s.io/apiserver v0.34.0
+ k8s.io/client-go v0.34.0
+ k8s.io/cluster-bootstrap v0.34.0
+ k8s.io/component-base v0.34.0
k8s.io/klog/v2 v2.130.1
- k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
- k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
- sigs.k8s.io/controller-runtime v0.21.0
+ k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b
+ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
+ sigs.k8s.io/controller-runtime v0.22.0
sigs.k8s.io/randfill v1.0.0
sigs.k8s.io/yaml v1.6.0
)
require (
- cel.dev/expr v0.19.1 // indirect
+ cel.dev/expr v0.24.0 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
@@ -75,8 +75,8 @@ require (
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
- github.com/fsnotify/fsnotify v1.8.0 // indirect
- github.com/fxamacker/cbor/v2 v2.7.0 // indirect
+ github.com/fsnotify/fsnotify v1.9.0 // indirect
+ github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
@@ -87,12 +87,12 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
- github.com/google/gnostic-models v0.6.9 // indirect
+ github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
@@ -106,11 +106,12 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.62.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
@@ -126,13 +127,13 @@ require (
github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
- go.opentelemetry.io/otel v1.34.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect
- go.opentelemetry.io/otel/metric v1.34.0 // indirect
+ go.opentelemetry.io/otel v1.35.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
+ go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
- go.opentelemetry.io/otel/trace v1.34.0 // indirect
- go.opentelemetry.io/proto/otlp v1.4.0 // indirect
+ go.opentelemetry.io/otel/trace v1.35.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
@@ -145,13 +146,13 @@ require (
golang.org/x/term v0.34.0 // indirect
golang.org/x/time v0.9.0 // indirect
golang.org/x/tools v0.36.0 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
- sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
- sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
+ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
+ sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
diff --git a/go.sum b/go.sum
index a1aa057d3456..66a87b5e79fe 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,5 @@
-cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
-cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
+cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY=
+cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw=
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
@@ -105,10 +105,10 @@ github.com/flatcar/ignition v0.36.2/go.mod h1:uk1tpzLFRXus4RrvzgMI+IqmmB8a/RGFSB
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
-github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
-github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
-github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
-github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
+github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
+github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
+github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
+github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
@@ -155,16 +155,15 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
-github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4=
-github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
-github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
-github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
+github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
+github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
+github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
+github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI=
@@ -191,8 +190,8 @@ github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5T
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
@@ -241,8 +240,9 @@ github.com/moby/spdystream v0.5.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVO
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
+github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
@@ -330,38 +330,38 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-go.etcd.io/etcd/api/v3 v3.5.22 h1:jRqZlcmndfKs1fO9I1Euqk3O5acEyBICyMKunxxhL94=
-go.etcd.io/etcd/api/v3 v3.5.22/go.mod h1:/mQQOEMyP7nAjMKZTJSCtMmlOoNAG5s7IjKZGvMN9Yc=
-go.etcd.io/etcd/client/pkg/v3 v3.5.22 h1:dFVbXCohuH0JKo6X+IznK6aohJSWcU+SF8QZF5EsaOQ=
-go.etcd.io/etcd/client/pkg/v3 v3.5.22/go.mod h1:cSURbmmXBOqyX839SdTbuO2zYtUjcZvKeQ7DEiYVOmU=
-go.etcd.io/etcd/client/v3 v3.5.22 h1:h+y9ocnclCPLPsoBoKwneZy7gy71VjvJ+8z4IPWxTn8=
-go.etcd.io/etcd/client/v3 v3.5.22/go.mod h1:p4ROLdCiv8gwQtnozOILXkqIjjSI0MR6Ly5F9qpFg+8=
+go.etcd.io/etcd/api/v3 v3.6.4 h1:7F6N7toCKcV72QmoUKa23yYLiiljMrT4xCeBL9BmXdo=
+go.etcd.io/etcd/api/v3 v3.6.4/go.mod h1:eFhhvfR8Px1P6SEuLT600v+vrhdDTdcfMzmnxVXXSbk=
+go.etcd.io/etcd/client/pkg/v3 v3.6.4 h1:9HBYrjppeOfFjBjaMTRxT3R7xT0GLK8EJMVC4xg6ok0=
+go.etcd.io/etcd/client/pkg/v3 v3.6.4/go.mod h1:sbdzr2cl3HzVmxNw//PH7aLGVtY4QySjQFuaCgcRFAI=
+go.etcd.io/etcd/client/v3 v3.6.4 h1:YOMrCfMhRzY8NgtzUsHl8hC2EBSnuqbR3dh84Uryl7A=
+go.etcd.io/etcd/client/v3 v3.6.4/go.mod h1:jaNNHCyg2FdALyKWnd7hxZXZxZANb0+KGY+YQaEMISo=
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q=
-go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
-go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA=
-go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
-go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
+go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
+go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
+go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
+go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
-go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
-go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
-go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg=
-go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY=
+go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
+go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
@@ -546,10 +546,10 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx
google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24=
-google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50=
+google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950=
+google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -557,8 +557,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.71.3 h1:iEhneYTxOruJyZAxdAv8Y0iRZvsc5M6KoW7UA0/7jn0=
-google.golang.org/grpc v1.71.3/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
+google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
+google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -581,40 +581,38 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-k8s.io/api v0.33.4 h1:oTzrFVNPXBjMu0IlpA2eDDIU49jsuEorGHB4cvKupkk=
-k8s.io/api v0.33.4/go.mod h1:VHQZ4cuxQ9sCUMESJV5+Fe8bGnqAARZ08tSTdHWfeAc=
-k8s.io/apiextensions-apiserver v0.33.4 h1:rtq5SeXiDbXmSwxsF0MLe2Mtv3SwprA6wp+5qh/CrOU=
-k8s.io/apiextensions-apiserver v0.33.4/go.mod h1:mWXcZQkQV1GQyxeIjYApuqsn/081hhXPZwZ2URuJeSs=
-k8s.io/apimachinery v0.33.4 h1:SOf/JW33TP0eppJMkIgQ+L6atlDiP/090oaX0y9pd9s=
-k8s.io/apimachinery v0.33.4/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
-k8s.io/apiserver v0.33.4 h1:6N0TEVA6kASUS3owYDIFJjUH6lgN8ogQmzZvaFFj1/Y=
-k8s.io/apiserver v0.33.4/go.mod h1:8ODgXMnOoSPLMUg1aAzMFx+7wTJM+URil+INjbTZCok=
-k8s.io/client-go v0.33.4 h1:TNH+CSu8EmXfitntjUPwaKVPN0AYMbc9F1bBS8/ABpw=
-k8s.io/client-go v0.33.4/go.mod h1:LsA0+hBG2DPwovjd931L/AoaezMPX9CmBgyVyBZmbCY=
-k8s.io/cluster-bootstrap v0.33.4 h1:on2rpd9l+UOhXAeouFn8ROBSo+Ad6U9NELNpmwRxZ44=
-k8s.io/cluster-bootstrap v0.33.4/go.mod h1:SaOAiv+B/RQeUbcmjXKZO62w5BX4oT3ZJ8RFNl3ZoS8=
-k8s.io/component-base v0.33.4 h1:Jvb/aw/tl3pfgnJ0E0qPuYLT0NwdYs1VXXYQmSuxJGY=
-k8s.io/component-base v0.33.4/go.mod h1:567TeSdixWW2Xb1yYUQ7qk5Docp2kNznKL87eygY8Rc=
+k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE=
+k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug=
+k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc=
+k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0=
+k8s.io/apimachinery v0.34.0 h1:eR1WO5fo0HyoQZt1wdISpFDffnWOvFLOOeJ7MgIv4z0=
+k8s.io/apimachinery v0.34.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
+k8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg=
+k8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ=
+k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo=
+k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY=
+k8s.io/cluster-bootstrap v0.34.0 h1:fWH6cUXbocLYMtWuONVwQ8ayqdEWlyvu25gedMTYTDk=
+k8s.io/cluster-bootstrap v0.34.0/go.mod h1:ZpbQwB+CDTYZIjDKM6Hnt081s0xswcFrlhW7mHVNc7k=
+k8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8=
+k8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
-sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
-sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
-sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
-sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
-sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
+sigs.k8s.io/controller-runtime v0.22.0 h1:mTOfibb8Hxwpx3xEkR56i7xSjB+nH4hZG37SrlCY5e0=
+sigs.k8s.io/controller-runtime v0.22.0/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
-sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
diff --git a/hack/tools/go.mod b/hack/tools/go.mod
index f590f1793eff..2b761b8c5480 100644
--- a/hack/tools/go.mod
+++ b/hack/tools/go.mod
@@ -17,17 +17,17 @@ require (
github.com/valyala/fastjson v1.6.4
golang.org/x/oauth2 v0.30.0
google.golang.org/api v0.248.0
- k8s.io/api v0.33.4
- k8s.io/apiextensions-apiserver v0.33.4
- k8s.io/apimachinery v0.33.4
- k8s.io/client-go v0.33.4
+ k8s.io/api v0.34.0
+ k8s.io/apiextensions-apiserver v0.34.0
+ k8s.io/apimachinery v0.34.0
+ k8s.io/client-go v0.34.0
k8s.io/klog/v2 v2.130.1
- k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff
- k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
+ k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b
+ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000
sigs.k8s.io/cluster-api/test v0.0.0-00010101000000-000000000000
- sigs.k8s.io/controller-runtime v0.21.0
- sigs.k8s.io/controller-tools v0.18.0
+ sigs.k8s.io/controller-runtime v0.22.0
+ sigs.k8s.io/controller-tools v0.19.0
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d
sigs.k8s.io/kustomize/api v0.17.3
sigs.k8s.io/yaml v1.6.0
@@ -46,13 +46,14 @@ require (
github.com/containerd/errdefs/pkg v0.3.0 // indirect
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
- github.com/fxamacker/cbor/v2 v2.7.0 // indirect
+ github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/zeebo/errs v1.4.0 // indirect
@@ -62,9 +63,9 @@ require (
go.opentelemetry.io/otel/sdk/metric v1.36.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
- golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
+ sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
require (
@@ -93,7 +94,7 @@ require (
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
- github.com/fsnotify/fsnotify v1.8.0 // indirect
+ github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
@@ -106,7 +107,7 @@ require (
github.com/gobuffalo/flect v1.0.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
- github.com/google/gnostic-models v0.6.9 // indirect
+ github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-github/v58 v58.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
@@ -123,7 +124,7 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nozzle/throttler v0.0.0-20180817012639-2ea982251481 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
@@ -171,13 +172,12 @@ require (
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
- k8s.io/apiserver v0.33.4 // indirect
- k8s.io/cluster-bootstrap v0.33.4 // indirect
- k8s.io/component-base v0.33.4 // indirect
+ k8s.io/apiserver v0.34.0 // indirect
+ k8s.io/cluster-bootstrap v0.34.0 // indirect
+ k8s.io/component-base v0.34.0 // indirect
k8s.io/release v0.16.9
- sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
+ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/kyaml v0.17.2 // indirect
sigs.k8s.io/release-sdk v0.11.0 // indirect
sigs.k8s.io/release-utils v0.8.1 // indirect
- sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
)
diff --git a/hack/tools/go.sum b/hack/tools/go.sum
index f11229d866ee..7bf83c6ef7a6 100644
--- a/hack/tools/go.sum
+++ b/hack/tools/go.sum
@@ -122,10 +122,10 @@ github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
-github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
-github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
-github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
-github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
+github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
+github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
+github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
+github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/gliderlabs/ssh v0.3.7 h1:iV3Bqi942d9huXnzEF2Mt+CY9gLu8DNM4Obd+8bODRE=
github.com/gliderlabs/ssh v0.3.7/go.mod h1:zpHEXBstFnQYtGnB8k8kQLol82umzn/2/snG7alWVD8=
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
@@ -170,13 +170,12 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
-github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4=
-github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
-github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
-github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
+github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
+github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
+github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
+github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY=
@@ -202,9 +201,8 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU
github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo=
github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
@@ -255,8 +253,9 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
+github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
@@ -365,10 +364,10 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6h
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q=
go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg=
go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY=
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.36.0 h1:rixTyDGXFxRy1xzhKrotaHy3/KXdPhlWARrCgK+eqUY=
@@ -381,8 +380,8 @@ go.opentelemetry.io/otel/sdk/metric v1.36.0 h1:r0ntwwGosWGaa0CrSt8cuNuTcccMXERFw
go.opentelemetry.io/otel/sdk/metric v1.36.0/go.mod h1:qTNOhFDfKRwX0yXOqJYegL5WRaW376QbB7P4Pb0qva4=
go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w=
go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA=
-go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg=
-go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
@@ -519,51 +518,49 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
-k8s.io/api v0.33.4 h1:oTzrFVNPXBjMu0IlpA2eDDIU49jsuEorGHB4cvKupkk=
-k8s.io/api v0.33.4/go.mod h1:VHQZ4cuxQ9sCUMESJV5+Fe8bGnqAARZ08tSTdHWfeAc=
-k8s.io/apiextensions-apiserver v0.33.4 h1:rtq5SeXiDbXmSwxsF0MLe2Mtv3SwprA6wp+5qh/CrOU=
-k8s.io/apiextensions-apiserver v0.33.4/go.mod h1:mWXcZQkQV1GQyxeIjYApuqsn/081hhXPZwZ2URuJeSs=
-k8s.io/apimachinery v0.33.4 h1:SOf/JW33TP0eppJMkIgQ+L6atlDiP/090oaX0y9pd9s=
-k8s.io/apimachinery v0.33.4/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
-k8s.io/apiserver v0.33.4 h1:6N0TEVA6kASUS3owYDIFJjUH6lgN8ogQmzZvaFFj1/Y=
-k8s.io/apiserver v0.33.4/go.mod h1:8ODgXMnOoSPLMUg1aAzMFx+7wTJM+URil+INjbTZCok=
-k8s.io/client-go v0.33.4 h1:TNH+CSu8EmXfitntjUPwaKVPN0AYMbc9F1bBS8/ABpw=
-k8s.io/client-go v0.33.4/go.mod h1:LsA0+hBG2DPwovjd931L/AoaezMPX9CmBgyVyBZmbCY=
-k8s.io/cluster-bootstrap v0.33.4 h1:on2rpd9l+UOhXAeouFn8ROBSo+Ad6U9NELNpmwRxZ44=
-k8s.io/cluster-bootstrap v0.33.4/go.mod h1:SaOAiv+B/RQeUbcmjXKZO62w5BX4oT3ZJ8RFNl3ZoS8=
-k8s.io/component-base v0.33.4 h1:Jvb/aw/tl3pfgnJ0E0qPuYLT0NwdYs1VXXYQmSuxJGY=
-k8s.io/component-base v0.33.4/go.mod h1:567TeSdixWW2Xb1yYUQ7qk5Docp2kNznKL87eygY8Rc=
+k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE=
+k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug=
+k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc=
+k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0=
+k8s.io/apimachinery v0.34.0 h1:eR1WO5fo0HyoQZt1wdISpFDffnWOvFLOOeJ7MgIv4z0=
+k8s.io/apimachinery v0.34.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
+k8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg=
+k8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ=
+k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo=
+k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY=
+k8s.io/cluster-bootstrap v0.34.0 h1:fWH6cUXbocLYMtWuONVwQ8ayqdEWlyvu25gedMTYTDk=
+k8s.io/cluster-bootstrap v0.34.0/go.mod h1:ZpbQwB+CDTYZIjDKM6Hnt081s0xswcFrlhW7mHVNc7k=
+k8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8=
+k8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
k8s.io/release v0.16.9 h1:CDqFlNmckqtXEn+YPVbDoUbnmqf1Y2R9BkHBC2vgMGo=
k8s.io/release v0.16.9/go.mod h1:iRTTQYssZDVke2X7bqhdbi3cPjdmRqZXpIJsp2IRDyM=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
-sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
-sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
-sigs.k8s.io/controller-tools v0.18.0 h1:rGxGZCZTV2wJreeRgqVoWab/mfcumTMmSwKzoM9xrsE=
-sigs.k8s.io/controller-tools v0.18.0/go.mod h1:gLKoiGBriyNh+x1rWtUQnakUYEujErjXs9pf+x/8n1U=
-sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
-sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
+sigs.k8s.io/controller-runtime v0.22.0 h1:mTOfibb8Hxwpx3xEkR56i7xSjB+nH4hZG37SrlCY5e0=
+sigs.k8s.io/controller-runtime v0.22.0/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY=
+sigs.k8s.io/controller-tools v0.19.0 h1:OU7jrPPiZusryu6YK0jYSjPqg8Vhf8cAzluP9XGI5uk=
+sigs.k8s.io/controller-tools v0.19.0/go.mod h1:y5HY/iNDFkmFla2CfQoVb2AQXMsBk4ad84iR1PLANB0=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d h1:KLiQzLW3RZJR19+j4pw2h5iioyAyqCkDBEAFdnGa3N8=
sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d/go.mod h1:NRdZafr4zSCseLQggdvIMXa7umxf+Q+PJzrj3wFwiGE=
sigs.k8s.io/kustomize/api v0.17.3 h1:6GCuHSsxq7fN5yhF2XrC+AAr8gxQwhexgHflOAD/JJU=
sigs.k8s.io/kustomize/api v0.17.3/go.mod h1:TuDH4mdx7jTfK61SQ/j1QZM/QWR+5rmEiNjvYlhzFhc=
sigs.k8s.io/kustomize/kyaml v0.17.2 h1:+AzvoJUY0kq4QAhH/ydPHHMRLijtUKiyVyh7fOSshr0=
sigs.k8s.io/kustomize/kyaml v0.17.2/go.mod h1:9V0mCjIEYjlXuCdYsSXvyoy2BTsLESH7TlGV81S282U=
-sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/release-sdk v0.11.0 h1:a+zjOO3tHm1NiVZgNcUWq5QrKmv7b63UZXw+XGdPGfk=
sigs.k8s.io/release-sdk v0.11.0/go.mod h1:sjbFpskyVjCXcFBnI3Bj1iGQHGjDYPoHVyld/pT+TvU=
sigs.k8s.io/release-utils v0.8.1 h1:qSA9p3vZzO6RAq7zvzupCZjR29+n3NK9DSJPe9bSf7w=
sigs.k8s.io/release-utils v0.8.1/go.mod h1:vrQ3eR1VmudgX4OUwr4pUZEkYLRms9bdbv06mr3kchQ=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
-sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
diff --git a/internal/controllers/cluster/cluster_controller.go b/internal/controllers/cluster/cluster_controller.go
index 7e66695bdce6..6158ed58f79b 100644
--- a/internal/controllers/cluster/cluster_controller.go
+++ b/internal/controllers/cluster/cluster_controller.go
@@ -631,7 +631,7 @@ func (c *clusterDescendants) filterOwnedDescendants(cluster *clusterv1.Cluster)
return nil //nolint:nilerr // We don't want to exit the EachListItem loop, just continue
}
- if util.IsOwnedByObject(acc, cluster) {
+ if util.IsOwnedByObject(acc, cluster, clusterv1.GroupVersion.WithKind("Cluster").GroupKind()) {
ownedDescendants = append(ownedDescendants, obj)
}
diff --git a/internal/controllers/cluster/cluster_controller_status.go b/internal/controllers/cluster/cluster_controller_status.go
index f880ffe0b535..f50caeb98198 100644
--- a/internal/controllers/cluster/cluster_controller_status.go
+++ b/internal/controllers/cluster/cluster_controller_status.go
@@ -246,7 +246,7 @@ func setWorkersReplicas(_ context.Context, cluster *clusterv1.Cluster, machinePo
}
for _, ms := range machineSets.Items {
- if !util.IsOwnedByObject(&ms, cluster) {
+ if !util.IsOwnedByObject(&ms, cluster, clusterv1.GroupVersion.WithKind("Cluster").GroupKind()) {
continue
}
if ms.Spec.Replicas != nil {
@@ -267,7 +267,7 @@ func setWorkersReplicas(_ context.Context, cluster *clusterv1.Cluster, machinePo
}
for _, m := range workerMachines.UnsortedList() {
- if !util.IsOwnedByObject(m, cluster) {
+ if !util.IsOwnedByObject(m, cluster, clusterv1.GroupVersion.WithKind("Cluster").GroupKind()) {
continue
}
currentReplicas = ptr.To(ptr.Deref(currentReplicas, 0) + 1)
@@ -973,7 +973,7 @@ func setScalingUpCondition(ctx context.Context, cluster *clusterv1.Cluster, cont
ws = append(ws, aggregationWrapper{md: &md})
}
for _, ms := range machineSets.Items {
- if !util.IsOwnedByObject(&ms, cluster) {
+ if !util.IsOwnedByObject(&ms, cluster, clusterv1.GroupVersion.WithKind("Cluster").GroupKind()) {
continue
}
ws = append(ws, aggregationWrapper{ms: &ms})
@@ -1050,7 +1050,7 @@ func setScalingDownCondition(ctx context.Context, cluster *clusterv1.Cluster, co
ws = append(ws, aggregationWrapper{md: &md})
}
for _, ms := range machineSets.Items {
- if !util.IsOwnedByObject(&ms, cluster) {
+ if !util.IsOwnedByObject(&ms, cluster, clusterv1.GroupVersion.WithKind("Cluster").GroupKind()) {
continue
}
ws = append(ws, aggregationWrapper{ms: &ms})
diff --git a/internal/controllers/clusterclass/clusterclass_controller_test.go b/internal/controllers/clusterclass/clusterclass_controller_test.go
index 747b768d93b4..a1eef15cf50d 100644
--- a/internal/controllers/clusterclass/clusterclass_controller_test.go
+++ b/internal/controllers/clusterclass/clusterclass_controller_test.go
@@ -1101,15 +1101,15 @@ func TestReconciler_reconcileVariables(t *testing.T) {
wantErrMessage: "failed to discover variables for ClusterClass class1: [" +
"patch1.variables[cpu].schema.openAPIV3Schema.properties[nestedField].default: Invalid value: \"integer\": failed rule: self >= 1, " +
"patch1.variables[anotherCPU].schema.openAPIV3Schema.x-kubernetes-validations[0].messageExpression: Invalid value: " +
- "apiextensions.ValidationRule{Rule:\"self >= 1\", Message:\"\", MessageExpression:\"'Expected integer greater or equal to 1, got ' + this does not compile\", " +
- "Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\"\", OptionalOldSelf:(*bool)(nil)}: " +
+ "{\"Rule\":\"self \\u003e= 1\",\"Message\":\"\",\"MessageExpression\":\"'Expected integer greater or equal to 1, got ' + this does not compile\"," +
+ "\"Reason\":null,\"FieldPath\":\"\",\"OptionalOldSelf\":null}: " +
"messageExpression compilation failed: ERROR: :1:55: Syntax error: mismatched input 'does' expecting \n " +
"| 'Expected integer greater or equal to 1, got ' + this does not compile\n " +
"| ......................................................^]",
wantVariableDiscoveryErrorMessage: "VariableDiscovery failed: [patch1.variables[cpu].schema.openAPIV3Schema.properties[nestedField].default: Invalid value: \"integer\": failed rule: self >= 1, " +
"patch1.variables[anotherCPU].schema.openAPIV3Schema.x-kubernetes-validations[0].messageExpression: Invalid value: " +
- "apiextensions.ValidationRule{Rule:\"self >= 1\", Message:\"\", MessageExpression:\"'Expected integer greater or equal to 1, got ' + this does not compile\", " +
- "Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\"\", OptionalOldSelf:(*bool)(nil)}: " +
+ "{\"Rule\":\"self \\u003e= 1\",\"Message\":\"\",\"MessageExpression\":\"'Expected integer greater or equal to 1, got ' + this does not compile\"," +
+ "\"Reason\":null,\"FieldPath\":\"\",\"OptionalOldSelf\":null}: " +
"messageExpression compilation failed: ERROR: :1:55: Syntax error: mismatched input 'does' expecting \n " +
"| 'Expected integer greater or equal to 1, got ' + this does not compile\n " +
"| ......................................................^]",
@@ -1150,7 +1150,7 @@ func TestReconciler_reconcileVariables(t *testing.T) {
},
wantErrMessage: "failed to discover variables for ClusterClass class1: " +
"patch1.variables[someIP].schema.openAPIV3Schema.x-kubernetes-validations[0].rule: Invalid value: " +
- "apiextensions.ValidationRule{Rule:\"ip(self).family() == 6\", Message:\"\", MessageExpression:\"\", Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\"\", OptionalOldSelf:(*bool)(nil)}: compilation failed: " +
+ "{\"Rule\":\"ip(self).family() == 6\",\"Message\":\"\",\"MessageExpression\":\"\",\"Reason\":null,\"FieldPath\":\"\",\"OptionalOldSelf\":null}: compilation failed: " +
"ERROR: :1:3: undeclared reference to 'ip' (in container '')\n" +
" | ip(self).family() == 6\n" +
" | ..^\n" +
@@ -1158,7 +1158,7 @@ func TestReconciler_reconcileVariables(t *testing.T) {
" | ip(self).family() == 6\n" +
" | ...............^",
wantVariableDiscoveryErrorMessage: "VariableDiscovery failed: patch1.variables[someIP].schema.openAPIV3Schema.x-kubernetes-validations[0].rule: Invalid value: " +
- "apiextensions.ValidationRule{Rule:\"ip(self).family() == 6\", Message:\"\", MessageExpression:\"\", Reason:(*apiextensions.FieldValueErrorReason)(nil), FieldPath:\"\", OptionalOldSelf:(*bool)(nil)}: compilation failed: " +
+ "{\"Rule\":\"ip(self).family() == 6\",\"Message\":\"\",\"MessageExpression\":\"\",\"Reason\":null,\"FieldPath\":\"\",\"OptionalOldSelf\":null}: compilation failed: " +
"ERROR: :1:3: undeclared reference to 'ip' (in container '')\n" +
" | ip(self).family() == 6\n" +
" | ..^\n" +
diff --git a/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go b/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go
index 0140f5832151..274991abd48a 100644
--- a/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go
+++ b/internal/controllers/clusterresourceset/clusterresourceset_helpers_test.go
@@ -117,7 +117,6 @@ func TestGetorCreateClusterResourceSetBinding(t *testing.T) {
func TestGetSecretFromNamespacedName(t *testing.T) {
existingSecretName := types.NamespacedName{Name: "my-secret", Namespace: metav1.NamespaceDefault}
existingSecret := &corev1.Secret{
- TypeMeta: metav1.TypeMeta{Kind: "Secret", APIVersion: "v1"},
ObjectMeta: metav1.ObjectMeta{
Name: existingSecretName.Name,
Namespace: existingSecretName.Namespace,
@@ -173,7 +172,6 @@ func TestGetConfigMapFromNamespacedName(t *testing.T) {
existingConfigMapName := types.NamespacedName{Name: "my-configmap", Namespace: metav1.NamespaceDefault}
existingConfigMap := &corev1.ConfigMap{
- TypeMeta: metav1.TypeMeta{Kind: "ConfigMap", APIVersion: "v1"},
ObjectMeta: metav1.ObjectMeta{
Name: existingConfigMapName.Name,
Namespace: existingConfigMapName.Namespace,
diff --git a/internal/controllers/machine/machine_controller_noderef_test.go b/internal/controllers/machine/machine_controller_noderef_test.go
index 100cdfc9a16a..a1114c0979b8 100644
--- a/internal/controllers/machine/machine_controller_noderef_test.go
+++ b/internal/controllers/machine/machine_controller_noderef_test.go
@@ -1400,7 +1400,7 @@ func Test_shouldNodeHaveOutdatedTaint(t *testing.T) {
testMachineDeploymentNew.Annotations = map[string]string{clusterv1.RevisionAnnotation: "2"}
testMachineSet := builder.MachineSet(namespaceName, "my-ms").
- WithOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineDeployment, testMachineDeployment.GroupVersionKind())}).
+ WithOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineDeployment, clusterv1.GroupVersion.WithKind("MachineDeployment"))}).
Build()
testMachineSet.Annotations = map[string]string{clusterv1.RevisionAnnotation: "1"}
@@ -1408,7 +1408,7 @@ func Test_shouldNodeHaveOutdatedTaint(t *testing.T) {
clusterv1.MachineDeploymentNameLabel: "my-md",
}
testMachine := builder.Machine(namespaceName, "my-machine").WithLabels(labels).Build()
- testMachine.SetOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineSet, testMachineSet.GroupVersionKind())})
+ testMachine.SetOwnerReferences([]metav1.OwnerReference{*ownerrefs.OwnerReferenceTo(testMachineSet, clusterv1.GroupVersion.WithKind("MachineSet"))})
tests := []struct {
name string
diff --git a/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go b/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go
index e55ed9a86816..b995cef7f4bb 100644
--- a/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go
+++ b/internal/controllers/machinehealthcheck/machinehealthcheck_targets_test.go
@@ -582,10 +582,6 @@ func newTestMachine(name, namespace, clusterName, nodeName string, labels map[st
bootstrap := "bootstrap"
return &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- APIVersion: clusterv1.GroupVersion.String(),
- Kind: "Machine",
- },
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: namespace,
@@ -612,10 +608,6 @@ func newTestMachine(name, namespace, clusterName, nodeName string, labels map[st
func newTestNode(name string) *corev1.Node {
return &corev1.Node{
- TypeMeta: metav1.TypeMeta{
- APIVersion: "v1",
- Kind: "Node",
- },
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
diff --git a/internal/controllers/machineset/machineset_controller_test.go b/internal/controllers/machineset/machineset_controller_test.go
index ba5b75d5c334..5990445b666e 100644
--- a/internal/controllers/machineset/machineset_controller_test.go
+++ b/internal/controllers/machineset/machineset_controller_test.go
@@ -1002,7 +1002,10 @@ func TestMachineSetReconcile_MachinesCreatedConditionFalseOnBadInfraRef(t *testi
request := reconcile.Request{
NamespacedName: key,
}
- fakeClient := fake.NewClientBuilder().WithObjects(cluster, ms, builder.GenericInfrastructureMachineTemplateCRD.DeepCopy()).WithStatusSubresource(&clusterv1.MachineSet{}).Build()
+ scheme := runtime.NewScheme()
+ g.Expect(apiextensionsv1.AddToScheme(scheme)).To(Succeed())
+ g.Expect(clusterv1.AddToScheme(scheme)).To(Succeed())
+ fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(cluster, ms, builder.GenericInfrastructureMachineTemplateCRD.DeepCopy()).WithStatusSubresource(&clusterv1.MachineSet{}).Build()
msr := &Reconciler{
Client: fakeClient,
diff --git a/internal/controllers/topology/cluster/cluster_controller_test.go b/internal/controllers/topology/cluster/cluster_controller_test.go
index ffdfd0d11fa1..bd6a1d7bc672 100644
--- a/internal/controllers/topology/cluster/cluster_controller_test.go
+++ b/internal/controllers/topology/cluster/cluster_controller_test.go
@@ -568,10 +568,9 @@ func TestClusterReconciler_reconcileDelete(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
},
})
if tt.cluster.Annotations == nil {
@@ -739,10 +738,9 @@ func TestReconciler_callBeforeClusterCreateHook(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
},
},
Annotations: map[string]string{
diff --git a/internal/controllers/topology/cluster/patches/template_test.go b/internal/controllers/topology/cluster/patches/template_test.go
index 54d9d6f80280..ab6d9ff5a21e 100644
--- a/internal/controllers/topology/cluster/patches/template_test.go
+++ b/internal/controllers/topology/cluster/patches/template_test.go
@@ -52,10 +52,9 @@ func TestRequestItemBuilder(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{Raw: []byte("fields")},
},
})
u.SetAnnotations(map[string]string{
diff --git a/internal/controllers/topology/cluster/reconcile_state_test.go b/internal/controllers/topology/cluster/reconcile_state_test.go
index a6f47c01b057..70f89a72ea62 100644
--- a/internal/controllers/topology/cluster/reconcile_state_test.go
+++ b/internal/controllers/topology/cluster/reconcile_state_test.go
@@ -502,10 +502,9 @@ func TestReconcile_callAfterControlPlaneInitialized(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
},
})
if tt.cluster.Annotations == nil {
@@ -1146,10 +1145,9 @@ func TestReconcile_callAfterClusterUpgrade(t *testing.T) {
{
APIVersion: builder.InfrastructureGroupVersion.String(),
Manager: "manager",
- Operation: "op",
+ Operation: "Apply",
Time: ptr.To(metav1.Now()),
FieldsType: "FieldsV1",
- FieldsV1: &metav1.FieldsV1{},
},
})
if tt.s.Current.Cluster.Annotations == nil {
@@ -2037,7 +2035,10 @@ func TestReconcileControlPlaneMachineHealthCheck(t *testing.T) {
g.Expect(env.PatchAndWait(ctx, tt.current.InfrastructureMachineTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
if tt.current.MachineHealthCheck != nil {
- g.Expect(env.PatchAndWait(ctx, tt.current.MachineHealthCheck, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ mhc := tt.current.MachineHealthCheck.DeepCopy()
+ mhc.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachineHealthCheck"))
+ g.Expect(env.PatchAndWait(ctx, mhc, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
}
@@ -2321,7 +2322,10 @@ func TestReconcileMachineDeployments(t *testing.T) {
for _, s := range tt.current {
g.Expect(env.PatchAndWait(ctx, s.InfrastructureMachineTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
g.Expect(env.PatchAndWait(ctx, s.BootstrapTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
- g.Expect(env.PatchAndWait(ctx, s.Object, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ md := s.Object.DeepCopy()
+ md.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachineDeployment"))
+ g.Expect(env.PatchAndWait(ctx, md, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
currentMachineDeploymentStates := toMachineDeploymentTopologyStateMap(tt.current)
@@ -2335,7 +2339,10 @@ func TestReconcileMachineDeployments(t *testing.T) {
g.Expect(env.PatchAndWait(ctx, mdState.InfrastructureMachineTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
g.Expect(env.PatchAndWait(ctx, mdState.BootstrapTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
- g.Expect(env.PatchAndWait(ctx, mdState.Object, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ md := mdState.Object.DeepCopy()
+ md.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachineDeployment"))
+ g.Expect(env.PatchAndWait(ctx, md, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
s.Desired = &scope.ClusterState{MachineDeployments: toMachineDeploymentTopologyStateMap(tt.desired)}
@@ -2728,7 +2735,10 @@ func TestReconcileMachinePools(t *testing.T) {
for _, s := range tt.current {
g.Expect(env.PatchAndWait(ctx, s.InfrastructureMachinePoolObject, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
g.Expect(env.PatchAndWait(ctx, s.BootstrapObject, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
- g.Expect(env.PatchAndWait(ctx, s.Object, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ mp := s.Object.DeepCopy()
+ mp.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachinePool"))
+ g.Expect(env.PatchAndWait(ctx, mp, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
currentMachinePoolStates := toMachinePoolTopologyStateMap(tt.current)
@@ -2742,7 +2752,10 @@ func TestReconcileMachinePools(t *testing.T) {
g.Expect(env.PatchAndWait(ctx, mpState.InfrastructureMachinePoolObject, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
g.Expect(env.PatchAndWait(ctx, mpState.BootstrapObject, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
- g.Expect(env.PatchAndWait(ctx, mpState.Object, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ mp := mpState.Object.DeepCopy()
+ mp.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachinePool"))
+ g.Expect(env.PatchAndWait(ctx, mp, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
s.Desired = &scope.ClusterState{MachinePools: toMachinePoolTopologyStateMap(tt.desired)}
@@ -3530,7 +3543,10 @@ func TestReconcileMachineDeploymentMachineHealthCheck(t *testing.T) {
uidsByName := map[string]types.UID{}
for _, mdts := range tt.current {
- g.Expect(env.PatchAndWait(ctx, mdts.Object, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ mdtsMD := mdts.Object.DeepCopy()
+ mdtsMD.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachineDeployment"))
+ g.Expect(env.PatchAndWait(ctx, mdtsMD, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
g.Expect(env.PatchAndWait(ctx, mdts.InfrastructureMachineTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
g.Expect(env.PatchAndWait(ctx, mdts.BootstrapTemplate, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
@@ -3541,7 +3557,10 @@ func TestReconcileMachineDeploymentMachineHealthCheck(t *testing.T) {
ref.UID = mdts.Object.GetUID()
mdts.MachineHealthCheck.OwnerReferences[i] = ref
}
- g.Expect(env.PatchAndWait(ctx, mdts.MachineHealthCheck, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
+ // Note: Have to set GVK on typed objects when using SSA.
+ mdtsMHC := mdts.MachineHealthCheck.DeepCopy()
+ mdtsMHC.SetGroupVersionKind(clusterv1.GroupVersion.WithKind("MachineHealthCheck"))
+ g.Expect(env.PatchAndWait(ctx, mdtsMHC, client.ForceOwnership, client.FieldOwner(structuredmerge.TopologyManagerName))).To(Succeed())
}
}
@@ -3591,6 +3610,7 @@ func TestReconcileMachineDeploymentMachineHealthCheck(t *testing.T) {
ref.UID = ""
actual.OwnerReferences[i] = ref
}
+ actual.SetGroupVersionKind(schema.GroupVersionKind{}) // set GVK to empty for comparison
g.Expect(wantMHC).To(EqualObject(&actual, IgnoreAutogeneratedMetadata))
}
}
diff --git a/internal/controllers/topology/cluster/structuredmerge/dryrun.go b/internal/controllers/topology/cluster/structuredmerge/dryrun.go
index c691a9d25bca..3e1231b14b97 100644
--- a/internal/controllers/topology/cluster/structuredmerge/dryrun.go
+++ b/internal/controllers/topology/cluster/structuredmerge/dryrun.go
@@ -68,9 +68,8 @@ func dryRunSSAPatch(ctx context.Context, dryRunCtx *dryRunSSAPatchInput) (bool,
// For dry run we use the same options as for the intent but with adding metadata.managedFields
// to ensure that changes to ownership are detected.
filterObjectInput := &ssa.FilterObjectInput{
- AllowedPaths: append(dryRunCtx.helperOptions.AllowedPaths, []string{"metadata", "managedFields"}),
- IgnorePaths: dryRunCtx.helperOptions.IgnorePaths,
- DropEmptyStructAndNil: dryRunCtx.helperOptions.DropEmptyStructAndNil,
+ AllowedPaths: append(dryRunCtx.helperOptions.AllowedPaths, []string{"metadata", "managedFields"}),
+ IgnorePaths: dryRunCtx.helperOptions.IgnorePaths,
}
// Add TopologyDryRunAnnotation to notify validation webhooks to skip immutability checks.
diff --git a/internal/controllers/topology/cluster/structuredmerge/options.go b/internal/controllers/topology/cluster/structuredmerge/options.go
index 8fa59d8a7061..0b94c8c1948b 100644
--- a/internal/controllers/topology/cluster/structuredmerge/options.go
+++ b/internal/controllers/topology/cluster/structuredmerge/options.go
@@ -17,7 +17,6 @@ limitations under the License.
package structuredmerge
import (
- "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/controller-runtime/pkg/client"
clusterv1 "sigs.k8s.io/cluster-api/api/core/v1beta2"
@@ -79,27 +78,15 @@ type HelperOptions struct {
func newHelperOptions(target client.Object, opts ...HelperOption) *HelperOptions {
helperOptions := &HelperOptions{
FilterObjectInput: ssa.FilterObjectInput{
- AllowedPaths: defaultAllowedPaths,
- IgnorePaths: []contract.Path{},
- DropEmptyStructAndNil: false,
+ AllowedPaths: defaultAllowedPaths,
+ IgnorePaths: []contract.Path{},
},
}
// Overwrite the allowedPaths for Cluster objects to prevent the topology controller
// to take ownership of fields it is not supposed to.
- switch target.(type) {
- case *clusterv1.Cluster:
+ if _, ok := target.(*clusterv1.Cluster); ok {
helperOptions.AllowedPaths = allowedPathsCluster
- helperOptions.DropEmptyStructAndNil = true
- // NOTE: DropEmptyStructAndNil is required for Cluster, because it is converted to unstructured using the DefaultUnstructuredConverter,
- // and it does not handle omitzero (yet).
- case *unstructured.Unstructured:
- // NOTE: DropEmptyStructAndNil is not required for unstructured objects, because DefaultUnstructuredConverter is not called.
- default:
- helperOptions.DropEmptyStructAndNil = true
- // NOTE: DropEmptyStructAndNil is required for typed objects, because they are converted to unstructured using the DefaultUnstructuredConverter,
- // and it does not handle omitzero (yet).
}
-
helperOptions = helperOptions.ApplyOptions(opts)
return helperOptions
}
@@ -122,13 +109,3 @@ type IgnorePaths []contract.Path
func (i IgnorePaths) ApplyToHelper(opts *HelperOptions) {
opts.IgnorePaths = i
}
-
-// DropEmptyStructAndNil instructs the Helper to drop all fields with values equal to empty struct or nil.
-// NOTE: This is required when using typed objects, because the DefaultUnstructuredConverter does
-// not handle omitzero (yet).
-type DropEmptyStructAndNil bool
-
-// ApplyToHelper applies this configuration to the given helper options.
-func (i DropEmptyStructAndNil) ApplyToHelper(opts *HelperOptions) {
- opts.DropEmptyStructAndNil = bool(i)
-}
diff --git a/internal/test/envtest/environment.go b/internal/test/envtest/environment.go
index 568cd7549e64..48baf781b846 100644
--- a/internal/test/envtest/environment.go
+++ b/internal/test/envtest/environment.go
@@ -611,6 +611,14 @@ func verifyPanicMetrics() error {
}
}
}
+
+ if metricFamily.GetName() == "controller_runtime_conversion_webhook_panics_total" {
+ for _, webhookPanicMetric := range metricFamily.Metric {
+ if webhookPanicMetric.Counter != nil && webhookPanicMetric.Counter.Value != nil && *webhookPanicMetric.Counter.Value > 0 {
+ errs = append(errs, fmt.Errorf("%.0f panics occurred in conversion webhooks (check logs for more details)", *webhookPanicMetric.Counter.Value))
+ }
+ }
+ }
}
if len(errs) > 0 {
diff --git a/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresources.yaml b/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresources.yaml
index 882ed0fdc1ce..3bc94ec34626 100644
--- a/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresources.yaml
+++ b/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresources.yaml
@@ -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: testresources.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml b/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml
index 0953b76532a7..6ceb72e9b381 100644
--- a/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml
+++ b/internal/topology/upgrade/test/t1/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml
@@ -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: testresourcetemplates.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresources.yaml b/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresources.yaml
index 7f827d82ed56..669dbe14dc59 100644
--- a/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresources.yaml
+++ b/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresources.yaml
@@ -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: testresources.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml b/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml
index b0898207d7ee..6c28ab20a6af 100644
--- a/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml
+++ b/internal/topology/upgrade/test/t2/crd/test.cluster.x-k8s.io_testresourcetemplates.yaml
@@ -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: testresourcetemplates.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/internal/util/ssa/filterintent.go b/internal/util/ssa/filterintent.go
index c3c776407d45..0429ab795ae3 100644
--- a/internal/util/ssa/filterintent.go
+++ b/internal/util/ssa/filterintent.go
@@ -17,10 +17,6 @@ limitations under the License.
package ssa
import (
- "fmt"
- "reflect"
- "strings"
-
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/cluster-api/internal/contract"
@@ -36,43 +32,26 @@ type FilterObjectInput struct {
// spec.ControlPlaneEndpoint.
// NOTE: ignore paths which point to an array are not supported by the current implementation.
IgnorePaths []contract.Path
-
- // DropEmptyStructAndNil instructs the Helper to drop all fields with values equal to empty struct or nil.
- // NOTE: This is required when using typed objects, because the DefaultUnstructuredConverter does
- // not handle omitzero (yet).
- DropEmptyStructAndNil bool
}
// FilterObject filter out changes not relevant for the controller.
func FilterObject(obj *unstructured.Unstructured, input *FilterObjectInput) {
// filter out changes not in the allowed paths (fields to not consider, e.g. status);
- // also drop empty struct if required.
if len(input.AllowedPaths) > 0 {
FilterIntent(&FilterIntentInput{
- Path: contract.Path{},
- Value: obj.Object,
- ShouldFilter: IsPathNotAllowed(input.AllowedPaths),
- DropEmptyStructAndNil: input.DropEmptyStructAndNil,
+ Path: contract.Path{},
+ Value: obj.Object,
+ ShouldFilter: IsPathNotAllowed(input.AllowedPaths),
})
}
// filter out changes for ignore paths (well known fields owned by other controllers, e.g.
- // spec.controlPlaneEndpoint in the InfrastructureCluster object); also drop empty struct if required.
+ // spec.controlPlaneEndpoint in the InfrastructureCluster object);
if len(input.IgnorePaths) > 0 {
FilterIntent(&FilterIntentInput{
- Path: contract.Path{},
- Value: obj.Object,
- ShouldFilter: IsPathIgnored(input.IgnorePaths),
- DropEmptyStructAndNil: input.DropEmptyStructAndNil,
- })
- }
-
- // DropEmptyStructAndNil if not already done above.
- if input.DropEmptyStructAndNil && len(input.AllowedPaths) == 0 && len(input.IgnorePaths) == 0 {
- FilterIntent(&FilterIntentInput{
- Path: contract.Path{},
- Value: obj.Object,
- DropEmptyStructAndNil: input.DropEmptyStructAndNil,
+ Path: contract.Path{},
+ Value: obj.Object,
+ ShouldFilter: IsPathIgnored(input.IgnorePaths),
})
}
}
@@ -84,71 +63,38 @@ func FilterObject(obj *unstructured.Unstructured, input *FilterObjectInput) {
// all of them are defined in reconcile_state.go and are targeting well-known fields inside nested maps.
// Allowed paths / ignore paths which point to an array are not supported by the current implementation.
func FilterIntent(ctx *FilterIntentInput) bool {
+ value, ok := ctx.Value.(map[string]interface{})
+ if !ok {
+ return false
+ }
+
gotDeletions := false
+ for field := range value {
+ fieldCtx := &FilterIntentInput{
+ // Compose the Path for the nested field.
+ Path: ctx.Path.Append(field),
+ // Gets the original and the modified Value for the field.
+ Value: value[field],
+ // Carry over global values from the context.
+ ShouldFilter: ctx.ShouldFilter,
+ }
- switch value := ctx.Value.(type) {
- case map[string]interface{}:
- for field := range value {
- fieldCtx := &FilterIntentInput{
- // Compose the Path for the nested field.
- Path: ctx.Path.Append(field),
- // Gets the original and the modified Value for the field.
- Value: value[field],
- // Carry over global values from the context.
- ShouldFilter: ctx.ShouldFilter,
- DropEmptyStructAndNil: ctx.DropEmptyStructAndNil,
- }
+ // If the field should be filtered out, delete it from the modified object.
+ if fieldCtx.ShouldFilter != nil && fieldCtx.ShouldFilter(fieldCtx.Path) {
+ delete(value, field)
+ gotDeletions = true
+ continue
+ }
- // If the field should be filtered out, delete it from the modified object.
- if fieldCtx.ShouldFilter != nil && fieldCtx.ShouldFilter(fieldCtx.Path) {
+ // Process nested fields and get in return if FilterIntent removed fields.
+ if FilterIntent(fieldCtx) {
+ gotDeletions = true
+ // Ensure we are not leaving empty maps around.
+ if v, ok := fieldCtx.Value.(map[string]interface{}); ok && len(v) == 0 {
delete(value, field)
- gotDeletions = true
- continue
- }
-
- // TODO: Can be removed once we bumped to k8s.io v0.34 because the DefaultUnstructuredConverter will then handle omitzero
- if strings.HasPrefix(fieldCtx.Path.String(), "spec") && fieldCtx.DropEmptyStructAndNil {
- // If empty struct should be dropped and the value is a empty struct, delete it from the modified object.
- if reflect.DeepEqual(fieldCtx.Value, map[string]interface{}{}) {
- delete(value, field)
- gotDeletions = true
- continue
- }
- // If nil should be dropped and the value is nil, delete it from the modified object.
- if reflect.DeepEqual(fieldCtx.Value, nil) {
- delete(value, field)
- gotDeletions = true
- continue
- }
- }
-
- // Process nested fields and get in return if FilterIntent removed fields.
- if FilterIntent(fieldCtx) {
- gotDeletions = true
- // Ensure we are not leaving empty maps around.
- if v, ok := fieldCtx.Value.(map[string]interface{}); ok && len(v) == 0 {
- delete(value, field)
- }
- }
- }
- case []interface{}:
- // TODO: Can be removed once we bumped to k8s.io v0.34 because the DefaultUnstructuredConverter will then handle omitzero
- if strings.HasPrefix(ctx.Path.String(), "spec") && ctx.DropEmptyStructAndNil {
- for i, v := range value {
- fieldCtx := &FilterIntentInput{
- // Compose the Path for the nested field.
- Path: ctx.Path.Append(fmt.Sprintf("[%d]", i)),
- // Not supporting ShouldFilter within arrays, so not setting it.
- Value: v,
- DropEmptyStructAndNil: ctx.DropEmptyStructAndNil,
- }
- if FilterIntent(fieldCtx) {
- gotDeletions = true
- }
}
}
}
-
return gotDeletions
}
@@ -163,8 +109,6 @@ type FilterIntentInput struct {
// ShouldFilter handle the func that determine if the current Path should be dropped or not.
ShouldFilter func(path contract.Path) bool
-
- DropEmptyStructAndNil bool
}
// IsPathAllowed returns true when the Path is one of the AllowedPaths.
diff --git a/internal/util/ssa/filterintent_test.go b/internal/util/ssa/filterintent_test.go
index ea078c08f7ed..820047e1f82e 100644
--- a/internal/util/ssa/filterintent_test.go
+++ b/internal/util/ssa/filterintent_test.go
@@ -199,126 +199,3 @@ func Test_filterIgnoredPaths(t *testing.T) {
})
}
}
-
-func Test_filterDropEmptyStructAndNil(t *testing.T) {
- tests := []struct {
- name string
- ctx *FilterIntentInput
- wantValue map[string]interface{}
- }{
- {
- name: "Cleanup empty maps",
- ctx: &FilterIntentInput{
- Path: contract.Path{},
- Value: map[string]interface{}{
- "spec": map[string]interface{}{},
- },
- DropEmptyStructAndNil: true,
- },
- wantValue: map[string]interface{}{
- // we are filtering out spec given that it is an empty map
- },
- },
- {
- name: "Cleanup empty nested maps",
- ctx: &FilterIntentInput{
- Path: contract.Path{},
- Value: map[string]interface{}{
- "spec": map[string]interface{}{
- "bar": map[string]interface{}{},
- },
- },
- DropEmptyStructAndNil: true,
- },
- wantValue: map[string]interface{}{
- // we are filtering out spec.bar and then spec given that it is an empty map
- },
- },
- {
- name: "Cleanup nil and parent empty nested maps",
- ctx: &FilterIntentInput{
- Path: contract.Path{},
- Value: map[string]interface{}{
- "spec": map[string]interface{}{
- "bar": map[string]interface{}{
- "field": nil,
- },
- },
- },
- DropEmptyStructAndNil: true,
- },
- wantValue: map[string]interface{}{
- // we are filtering out spec.bar.field and then spec.bar and spec given that they are empty maps
- },
- },
- {
- name: "Cleanup fields in arrays and don't cleanup empty leaf arrays",
- ctx: &FilterIntentInput{
- Path: contract.Path{},
- Value: map[string]interface{}{
- "spec": map[string]interface{}{
- "template": map[string]interface{}{
- "spec": map[string]interface{}{
- "joinConfiguration": map[string]interface{}{
- "nodeRegistration": map[string]interface{}{
- "taints": []interface{}{}, // should be preserved
- "kubeletExtraArgs": []interface{}{
- map[string]interface{}{
- "name": "eviction-hard",
- "value": "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%",
- },
- },
- },
- "discovery": map[string]interface{}{}, // should be cleaned up
- },
- "users": []interface{}{
- map[string]interface{}{
- "name": "default-user",
- "passwdFrom": map[string]interface{}{ // should be cleaned up
- "secret": map[string]interface{}{}},
- },
- },
- },
- },
- },
- },
- DropEmptyStructAndNil: true,
- },
- wantValue: map[string]interface{}{
- "spec": map[string]interface{}{
- "template": map[string]interface{}{
- "spec": map[string]interface{}{
- "joinConfiguration": map[string]interface{}{
- "nodeRegistration": map[string]interface{}{
- "taints": []interface{}{}, // taints was preserved
- "kubeletExtraArgs": []interface{}{
- map[string]interface{}{
- "name": "eviction-hard",
- "value": "nodefs.available<0%,nodefs.inodesFree<0%,imagefs.available<0%",
- },
- },
- },
- // discovery was cleaned up
- },
- "users": []interface{}{
- map[string]interface{}{
- "name": "default-user",
- // passwdFrom was cleaned up
- },
- },
- },
- },
- },
- },
- },
- }
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- g := NewWithT(t)
-
- FilterIntent(tt.ctx)
-
- g.Expect(tt.ctx.Value).To(BeComparableTo(tt.wantValue))
- })
- }
-}
diff --git a/internal/util/ssa/managedfields_test.go b/internal/util/ssa/managedfields_test.go
index 0b4f432867d8..cb90f9e0fa57 100644
--- a/internal/util/ssa/managedfields_test.go
+++ b/internal/util/ssa/managedfields_test.go
@@ -36,6 +36,110 @@ func TestDropManagedFields(t *testing.T) {
ssaManager := "ssa-manager"
+ tests := []struct {
+ name string
+ updateManager string
+ obj client.Object
+ wantOwnershipToDrop bool
+ }{
+ {
+ name: "should drop ownership of fields if there is no entry for ssaManager",
+ wantOwnershipToDrop: true,
+ },
+ {
+ name: "should not drop ownership of fields if there is an entry for ssaManager",
+ updateManager: ssaManager,
+ wantOwnershipToDrop: false,
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ createCM := &corev1.ConfigMap{
+ // Have to set TypeMeta explicitly when using SSA with typed objects.
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: "v1",
+ Kind: "ConfigMap",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "cm-1",
+ Namespace: "default",
+ Labels: map[string]string{
+ "label-1": "value-1",
+ },
+ Annotations: map[string]string{
+ "annotation-1": "value-1",
+ },
+ Finalizers: []string{"test.com/finalizer"},
+ },
+ Data: map[string]string{
+ "test-key": "test-value",
+ },
+ }
+ updateCM := createCM.DeepCopy()
+ updateCM.Data["test-key-update"] = "test-value-update"
+
+ g.Expect(env.Client.Create(ctx, createCM, client.FieldOwner(classicManager))).To(Succeed())
+ t.Cleanup(func() {
+ createCMWithoutFinalizer := createCM.DeepCopy()
+ createCMWithoutFinalizer.ObjectMeta.Finalizers = []string{}
+ g.Expect(env.Client.Patch(ctx, createCMWithoutFinalizer, client.MergeFrom(createCM))).To(Succeed())
+ g.Expect(env.CleanupAndWait(ctx, createCM)).To(Succeed())
+ })
+
+ if tt.updateManager != "" {
+ // If updateManager is set, update the object with SSA
+ g.Expect(env.Client.Patch(ctx, updateCM, client.Apply, client.FieldOwner(tt.updateManager))).To(Succeed())
+ }
+
+ gotObj := createCM.DeepCopyObject().(client.Object)
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(createCM), gotObj)).To(Succeed())
+ labelsAndAnnotationsManagedFieldPaths := []contract.Path{
+ {"f:metadata", "f:annotations"},
+ {"f:metadata", "f:labels"},
+ }
+ g.Expect(DropManagedFields(ctx, env.Client, gotObj, ssaManager, labelsAndAnnotationsManagedFieldPaths)).To(Succeed())
+
+ if tt.wantOwnershipToDrop {
+ g.Expect(gotObj.GetManagedFields()).ShouldNot(MatchFieldOwnership(
+ classicManager,
+ metav1.ManagedFieldsOperationUpdate,
+ contract.Path{"f:metadata", "f:labels"},
+ ))
+ g.Expect(gotObj.GetManagedFields()).ShouldNot(MatchFieldOwnership(
+ classicManager,
+ metav1.ManagedFieldsOperationUpdate,
+ contract.Path{"f:metadata", "f:annotations"},
+ ))
+ } else {
+ g.Expect(gotObj.GetManagedFields()).Should(MatchFieldOwnership(
+ classicManager,
+ metav1.ManagedFieldsOperationUpdate,
+ contract.Path{"f:metadata", "f:labels"},
+ ))
+ g.Expect(gotObj.GetManagedFields()).Should(MatchFieldOwnership(
+ classicManager,
+ metav1.ManagedFieldsOperationUpdate,
+ contract.Path{"f:metadata", "f:annotations"},
+ ))
+ }
+ // Verify ownership of other fields is not affected.
+ g.Expect(gotObj.GetManagedFields()).Should(MatchFieldOwnership(
+ classicManager,
+ metav1.ManagedFieldsOperationUpdate,
+ contract.Path{"f:metadata", "f:finalizers"},
+ ))
+ })
+ }
+}
+
+func TestDropManagedFieldsWithFakeClient(t *testing.T) {
+ ctx := context.Background()
+
+ ssaManager := "ssa-manager"
+
fieldV1Map := map[string]interface{}{
"f:metadata": map[string]interface{}{
"f:name": map[string]interface{}{},
@@ -58,6 +162,7 @@ func TestDropManagedFields(t *testing.T) {
Operation: metav1.ManagedFieldsOperationUpdate,
FieldsType: "FieldsV1",
FieldsV1: &metav1.FieldsV1{Raw: fieldV1},
+ APIVersion: "v1",
}},
Labels: map[string]string{
"label-1": "value-1",
@@ -82,10 +187,13 @@ func TestDropManagedFields(t *testing.T) {
Operation: metav1.ManagedFieldsOperationUpdate,
FieldsType: "FieldsV1",
FieldsV1: &metav1.FieldsV1{Raw: fieldV1},
+ APIVersion: "v1",
},
{
- Manager: ssaManager,
- Operation: metav1.ManagedFieldsOperationApply,
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsType: "FieldsV1",
+ APIVersion: "v1",
},
},
Labels: map[string]string{
@@ -121,7 +229,7 @@ func TestDropManagedFields(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
- fakeClient := fake.NewClientBuilder().WithObjects(tt.obj).Build()
+ fakeClient := fake.NewClientBuilder().WithObjects(tt.obj).WithReturnManagedFields().Build()
labelsAndAnnotationsManagedFieldPaths := []contract.Path{
{"f:metadata", "f:annotations"},
{"f:metadata", "f:labels"},
@@ -165,6 +273,137 @@ func TestCleanUpManagedFieldsForSSAAdoption(t *testing.T) {
ssaManager := "ssa-manager"
+ type managedFields struct {
+ Manager string
+ Operation metav1.ManagedFieldsOperationType
+ }
+ tests := []struct {
+ name string
+ createManager string
+ updateManager string
+ wantManagedFields []managedFields
+ }{
+ {
+ name: "should add an entry for ssaManager if it does not have one",
+ createManager: "unknown-manager",
+ wantManagedFields: []managedFields{
+ {
+ Manager: "unknown-manager",
+ Operation: metav1.ManagedFieldsOperationUpdate,
+ },
+ {
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ },
+ },
+ },
+ {
+ name: "should add an entry for ssaManager and drop entry for classic manager if it exists",
+ createManager: classicManager,
+ wantManagedFields: []managedFields{
+ {
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ },
+ },
+ },
+ {
+ name: "should keep the entry for ssa-manager if it already has one (no-op)",
+ createManager: ssaManager,
+ wantManagedFields: []managedFields{
+ {
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ },
+ },
+ },
+ {
+ name: "should keep the entry with ssa-manager if it already has one - should not drop other manager entries (no-op)",
+ createManager: classicManager,
+ updateManager: ssaManager,
+ wantManagedFields: []managedFields{
+ {
+ Manager: classicManager,
+ Operation: metav1.ManagedFieldsOperationUpdate,
+ },
+ {
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ },
+ },
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.name, func(t *testing.T) {
+ g := NewWithT(t)
+
+ createCM := &corev1.ConfigMap{
+ // Have to set TypeMeta explicitly when using SSA with typed objects.
+ TypeMeta: metav1.TypeMeta{
+ APIVersion: "v1",
+ Kind: "ConfigMap",
+ },
+ ObjectMeta: metav1.ObjectMeta{
+ Name: "cm-1",
+ Namespace: "default",
+ },
+ Data: map[string]string{
+ "test-key": "test-value",
+ },
+ }
+ updateCM := createCM.DeepCopy()
+ updateCM.Data["test-key-update"] = "test-value-update"
+
+ if tt.createManager == ssaManager {
+ // If createManager is ssaManager, use SSA
+ g.Expect(env.Client.Patch(ctx, createCM, client.Apply, client.FieldOwner(tt.createManager))).To(Succeed())
+ } else {
+ // Otherwise use regular Create
+ g.Expect(env.Client.Create(ctx, createCM, client.FieldOwner(tt.createManager))).To(Succeed())
+ }
+ t.Cleanup(func() {
+ g.Expect(env.CleanupAndWait(ctx, createCM)).To(Succeed())
+ })
+
+ if tt.updateManager != "" {
+ // If updateManager is set, update the object with SSA
+ g.Expect(env.Client.Patch(ctx, updateCM, client.Apply, client.FieldOwner(tt.updateManager))).To(Succeed())
+ }
+
+ // Validate object has exactly the field manager we expect.
+ gotObj := createCM.DeepCopyObject().(client.Object)
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(createCM), gotObj)).To(Succeed())
+ expectedManager := []string{tt.createManager}
+ if tt.updateManager != "" {
+ expectedManager = append(expectedManager, tt.updateManager)
+ }
+ var gotManager []string
+ for _, managedFields := range gotObj.GetManagedFields() {
+ gotManager = append(gotManager, managedFields.Manager)
+ }
+ g.Expect(gotManager).To(ConsistOf(expectedManager))
+
+ // Cleanup managed fields.
+ g.Expect(CleanUpManagedFieldsForSSAAdoption(ctx, env.Client, gotObj, ssaManager)).Should(Succeed())
+
+ // Validate object has been cleaned up correctly
+ gotObj = createCM.DeepCopyObject().(client.Object)
+ g.Expect(env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(createCM), gotObj)).To(Succeed())
+ g.Expect(gotObj.GetManagedFields()).To(HaveLen(len(tt.wantManagedFields)))
+ for _, mf := range tt.wantManagedFields {
+ g.Expect(gotObj.GetManagedFields()).Should(
+ ContainElement(MatchManagedFieldsEntry(mf.Manager, mf.Operation)))
+ }
+ })
+ }
+}
+
+func TestCleanUpManagedFieldsForSSAAdoptionWithFakeClient(t *testing.T) {
+ ctx := context.Background()
+
+ ssaManager := "ssa-manager"
+
objWithoutAnyManager := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: "cm-1",
@@ -179,8 +418,10 @@ func TestCleanUpManagedFieldsForSSAAdoption(t *testing.T) {
Name: "cm-1",
Namespace: "default",
ManagedFields: []metav1.ManagedFieldsEntry{{
- Manager: classicManager,
- Operation: metav1.ManagedFieldsOperationUpdate,
+ Manager: classicManager,
+ Operation: metav1.ManagedFieldsOperationUpdate,
+ FieldsType: "FieldsV1",
+ APIVersion: "v1",
}},
},
Data: map[string]string{
@@ -192,8 +433,10 @@ func TestCleanUpManagedFieldsForSSAAdoption(t *testing.T) {
Name: "cm-1",
Namespace: "default",
ManagedFields: []metav1.ManagedFieldsEntry{{
- Manager: ssaManager,
- Operation: metav1.ManagedFieldsOperationApply,
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsType: "FieldsV1",
+ APIVersion: "v1",
}},
},
Data: map[string]string{
@@ -206,12 +449,16 @@ func TestCleanUpManagedFieldsForSSAAdoption(t *testing.T) {
Namespace: "default",
ManagedFields: []metav1.ManagedFieldsEntry{
{
- Manager: classicManager,
- Operation: metav1.ManagedFieldsOperationUpdate,
+ Manager: classicManager,
+ Operation: metav1.ManagedFieldsOperationUpdate,
+ FieldsType: "FieldsV1",
+ APIVersion: "v1",
},
{
- Manager: ssaManager,
- Operation: metav1.ManagedFieldsOperationApply,
+ Manager: ssaManager,
+ Operation: metav1.ManagedFieldsOperationApply,
+ FieldsType: "FieldsV1",
+ APIVersion: "v1",
},
},
},
@@ -250,7 +497,7 @@ func TestCleanUpManagedFieldsForSSAAdoption(t *testing.T) {
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
g := NewWithT(t)
- fakeClient := fake.NewClientBuilder().WithObjects(tt.obj).Build()
+ fakeClient := fake.NewClientBuilder().WithObjects(tt.obj).WithReturnManagedFields().Build()
g.Expect(CleanUpManagedFieldsForSSAAdoption(ctx, fakeClient, tt.obj, ssaManager)).Should(Succeed())
g.Expect(tt.obj.GetManagedFields()).Should(
ContainElement(MatchManagedFieldsEntry(ssaManager, metav1.ManagedFieldsOperationApply)))
diff --git a/internal/util/ssa/patch.go b/internal/util/ssa/patch.go
index ef42bbaac511..1c89f35325d2 100644
--- a/internal/util/ssa/patch.go
+++ b/internal/util/ssa/patch.go
@@ -128,7 +128,6 @@ func Patch(ctx context.Context, c client.Client, fieldManager string, modified c
// prepareModified converts obj into an Unstructured and filters out undesired fields.
func prepareModified(scheme *runtime.Scheme, obj client.Object) (*unstructured.Unstructured, error) {
u := &unstructured.Unstructured{}
- dropEmptyStructAndNil := false
switch obj.(type) {
case *unstructured.Unstructured:
u = obj.DeepCopyObject().(*unstructured.Unstructured)
@@ -136,9 +135,6 @@ func prepareModified(scheme *runtime.Scheme, obj client.Object) (*unstructured.U
if err := scheme.Convert(obj, u, nil); err != nil {
return nil, errors.Wrap(err, "failed to convert object to Unstructured")
}
- // NOTE: DropEmptyStructAndNil is required for typed objects, because they are converted to unstructured using the DefaultUnstructuredConverter,
- // and it does not handle omitzero (yet).
- dropEmptyStructAndNil = true
}
// Only keep the paths that we have opinions on.
@@ -158,7 +154,6 @@ func prepareModified(scheme *runtime.Scheme, obj client.Object) (*unstructured.U
{"metadata", "ownerReferences"},
{"spec"},
},
- DropEmptyStructAndNil: dropEmptyStructAndNil,
})
return u, nil
}
diff --git a/internal/webhooks/test/machinedrainrules_test.go b/internal/webhooks/test/machinedrainrules_test.go
index 318045ef716a..1276d0690524 100644
--- a/internal/webhooks/test/machinedrainrules_test.go
+++ b/internal/webhooks/test/machinedrainrules_test.go
@@ -146,10 +146,10 @@ func Test_validate(t *testing.T) {
},
wantErr: "admission webhook \"validation.machinedrainrule.cluster.x-k8s.io\" denied the request: " +
"MachineDrainRule.cluster.x-k8s.io \"mdr\" is invalid: [" +
- "spec.machines[0].selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator, " +
- "spec.machines[0].clusterSelector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator, " +
- "spec.pods[0].selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator, " +
- "spec.pods[0].namespaceSelector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string(nil), MatchExpressions:[]v1.LabelSelectorRequirement{v1.LabelSelectorRequirement{Key:\"\", Operator:\"Invalid-Operator\", Values:[]string(nil)}}}: \"Invalid-Operator\" is not a valid label selector operator]",
+ "spec.machines[0].selector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator, " +
+ "spec.machines[0].clusterSelector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator, " +
+ "spec.pods[0].selector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator, " +
+ "spec.pods[0].namespaceSelector: Invalid value: {\"matchExpressions\":[{\"key\":\"\",\"operator\":\"Invalid-Operator\"}]}: \"Invalid-Operator\" is not a valid label selector operator]",
},
{
name: "Return error if machine selectors are not unique",
diff --git a/test/framework/deployment_helpers.go b/test/framework/deployment_helpers.go
index 64174b15ffae..0eb3b6577c1f 100644
--- a/test/framework/deployment_helpers.go
+++ b/test/framework/deployment_helpers.go
@@ -447,6 +447,14 @@ func verifyMetrics(data []byte) error {
}
}
}
+
+ if metric == "controller_runtime_conversion_webhook_panics_total" {
+ for _, webhookPanicMetric := range metricFamily.Metric {
+ if webhookPanicMetric.Counter != nil && webhookPanicMetric.Counter.Value != nil && *webhookPanicMetric.Counter.Value > 0 {
+ errs = append(errs, fmt.Errorf("%.0f panics occurred in conversion webhooks (check logs for more details)", *webhookPanicMetric.Counter.Value))
+ }
+ }
+ }
}
if len(errs) > 0 {
diff --git a/test/framework/deployment_helpers_test.go b/test/framework/deployment_helpers_test.go
index 54c3fb993540..f827869193db 100644
--- a/test/framework/deployment_helpers_test.go
+++ b/test/framework/deployment_helpers_test.go
@@ -71,7 +71,7 @@ controller_runtime_webhook_panics_total 0
wantErr: "1 panics occurred in \"cluster\" controller (check logs for more details)",
},
{
- name: "panic occurred in webhook",
+ name: "panic occurred in webhooks",
data: []byte(`
# HELP controller_runtime_max_concurrent_reconciles Maximum number of concurrent reconciles per controller
# TYPE controller_runtime_max_concurrent_reconciles gauge
@@ -84,9 +84,32 @@ controller_runtime_reconcile_panics_total{controller="clusterclass"} 0
# HELP controller_runtime_webhook_panics_total Total number of webhook panics
# TYPE controller_runtime_webhook_panics_total counter
controller_runtime_webhook_panics_total 1
+# HELP controller_runtime_conversion_webhook_panics_total Total number of conversion webhook panics
+# TYPE controller_runtime_conversion_webhook_panics_total counter
+controller_runtime_conversion_webhook_panics_total 0
`),
wantErr: "1 panics occurred in webhooks (check logs for more details)",
},
+ {
+ name: "panics occurred in conversion webhooks",
+ data: []byte(`
+# HELP controller_runtime_max_concurrent_reconciles Maximum number of concurrent reconciles per controller
+# TYPE controller_runtime_max_concurrent_reconciles gauge
+controller_runtime_max_concurrent_reconciles{controller="cluster"} 10
+controller_runtime_max_concurrent_reconciles{controller="clusterclass"} 10
+# HELP controller_runtime_reconcile_panics_total Total number of reconciliation panics per controller
+# TYPE controller_runtime_reconcile_panics_total counter
+controller_runtime_reconcile_panics_total{controller="cluster"} 0
+controller_runtime_reconcile_panics_total{controller="clusterclass"} 0
+# HELP controller_runtime_webhook_panics_total Total number of webhook panics
+# TYPE controller_runtime_webhook_panics_total counter
+controller_runtime_webhook_panics_total 0
+# HELP controller_runtime_conversion_webhook_panics_total Total number of conversion webhook panics
+# TYPE controller_runtime_conversion_webhook_panics_total counter
+controller_runtime_conversion_webhook_panics_total 2
+`),
+ wantErr: "2 panics occurred in conversion webhooks (check logs for more details)",
+ },
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
diff --git a/test/go.mod b/test/go.mod
index e34aa6e38d6e..c98253f08d1d 100644
--- a/test/go.mod
+++ b/test/go.mod
@@ -20,20 +20,20 @@ require (
github.com/prometheus/common v0.62.0
github.com/spf13/pflag v1.0.7
github.com/vincent-petithory/dataurl v1.0.0
- go.etcd.io/etcd/api/v3 v3.5.22
- go.etcd.io/etcd/client/v3 v3.5.22
+ go.etcd.io/etcd/api/v3 v3.6.4
+ go.etcd.io/etcd/client/v3 v3.6.4
golang.org/x/net v0.43.0
- google.golang.org/grpc v1.71.3
- k8s.io/api v0.33.4
- k8s.io/apiextensions-apiserver v0.33.4
- k8s.io/apimachinery v0.33.4
- k8s.io/apiserver v0.33.4
- k8s.io/client-go v0.33.4
- k8s.io/component-base v0.33.4
+ google.golang.org/grpc v1.72.1
+ k8s.io/api v0.34.0
+ k8s.io/apiextensions-apiserver v0.34.0
+ k8s.io/apimachinery v0.34.0
+ k8s.io/apiserver v0.34.0
+ k8s.io/client-go v0.34.0
+ k8s.io/component-base v0.34.0
k8s.io/klog/v2 v2.130.1
- k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738
+ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397
sigs.k8s.io/cluster-api v0.0.0-00010101000000-000000000000
- sigs.k8s.io/controller-runtime v0.21.0
+ sigs.k8s.io/controller-runtime v0.22.0
sigs.k8s.io/kind v0.30.0
sigs.k8s.io/randfill v1.0.0
sigs.k8s.io/yaml v1.6.0
@@ -41,7 +41,7 @@ require (
require (
al.essio.dev/pkg/shellescape v1.5.1 // indirect
- cel.dev/expr v0.19.1 // indirect
+ cel.dev/expr v0.24.0 // indirect
dario.cat/mergo v1.0.1 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
@@ -69,8 +69,8 @@ require (
github.com/drone/envsubst/v2 v2.0.0-20210730161058-179042472c46 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
- github.com/fsnotify/fsnotify v1.8.0 // indirect
- github.com/fxamacker/cbor/v2 v2.7.0 // indirect
+ github.com/fsnotify/fsnotify v1.9.0 // indirect
+ github.com/fxamacker/cbor/v2 v2.9.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
@@ -82,15 +82,15 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.3 // indirect
- github.com/google/cel-go v0.23.2 // indirect
- github.com/google/gnostic-models v0.6.9 // indirect
+ github.com/google/cel-go v0.26.0 // indirect
+ github.com/google/gnostic-models v0.7.0 // indirect
github.com/google/go-github/v53 v53.2.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/pprof v0.0.0-20250820193118-f64d9cf942d6 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
@@ -106,7 +106,7 @@ require (
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/sys/atomicwriter v0.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
@@ -115,6 +115,7 @@ require (
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.4.2 // indirect
@@ -129,18 +130,18 @@ require (
github.com/subosito/gotenv v1.6.0 // indirect
github.com/valyala/fastjson v1.6.4 // indirect
github.com/x448/float16 v0.8.4 // indirect
- go.etcd.io/etcd/client/pkg/v3 v3.5.22 // indirect
+ go.etcd.io/etcd/client/pkg/v3 v3.6.4 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
- go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect
+ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
- go.opentelemetry.io/otel v1.34.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect
+ go.opentelemetry.io/otel v1.35.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect
- go.opentelemetry.io/otel/metric v1.34.0 // indirect
+ go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
- go.opentelemetry.io/otel/trace v1.34.0 // indirect
- go.opentelemetry.io/proto/otlp v1.4.0 // indirect
+ go.opentelemetry.io/otel/trace v1.35.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/automaxprocs v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
@@ -156,16 +157,16 @@ require (
golang.org/x/time v0.9.0 // indirect
golang.org/x/tools v0.36.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
- google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb // indirect
google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gotest.tools/v3 v3.4.0 // indirect
- k8s.io/cluster-bootstrap v0.33.4 // indirect
- k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
+ k8s.io/cluster-bootstrap v0.34.0 // indirect
+ k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
- sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
- sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
+ sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
+ sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
)
diff --git a/test/go.sum b/test/go.sum
index d793506b4dc3..d8060668e76f 100644
--- a/test/go.sum
+++ b/test/go.sum
@@ -1,7 +1,7 @@
al.essio.dev/pkg/shellescape v1.5.1 h1:86HrALUujYS/h+GtqoB26SBEdkWfmMI6FubjXlsXyho=
al.essio.dev/pkg/shellescape v1.5.1/go.mod h1:6sIqp7X2P6mThCQ7twERpZTuigpr6KbZWtls1U8I890=
-cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4=
-cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw=
+cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY=
+cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw=
dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
@@ -92,10 +92,10 @@ github.com/flatcar/ignition v0.36.2 h1:xGHgScUe0P4Fkprjqv7L2CE58emiQgP833OCCn9z2
github.com/flatcar/ignition v0.36.2/go.mod h1:uk1tpzLFRXus4RrvzgMI+IqmmB8a/RGFSBlI+tMTbbA=
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
-github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
-github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
-github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
-github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
+github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
+github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
+github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
+github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
@@ -122,20 +122,19 @@ github.com/godbus/dbus v0.0.0-20181025153459-66d97aec3384/go.mod h1:/YcGZj5zSblf
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
-github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
-github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
+github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg=
github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
-github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4=
-github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo=
-github.com/google/gnostic-models v0.6.9 h1:MU/8wDLif2qCXZmzncUQ/BOfxWfthHi63KqpoNbWqVw=
-github.com/google/gnostic-models v0.6.9/go.mod h1:CiWsm0s6BSQd1hRn8/QmxqB6BesYcbSZxsz9b0KuDBw=
+github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI=
+github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM=
+github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
+github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
github.com/google/go-github/v53 v53.2.0 h1:wvz3FyF53v4BK+AsnvCmeNhf8AkTaeh2SoYu/XUvTtI=
@@ -154,21 +153,21 @@ github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
-github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
-github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
+github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA=
+github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU=
+github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0 h1:FbSCl+KggFl+Ocym490i/EyXF4lPgLoUtcSWquBM0Rs=
+github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.3.0/go.mod h1:qOchhhIlmRcqk/O9uCo/puJlyo07YINaIqdZfZG3Jkc=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI=
github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
-github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
-github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc=
+github.com/jonboulle/clockwork v0.5.0 h1:Hyh9A8u51kptdkR+cqRpT1EebBwTn1oK9YfGYbdFz6I=
+github.com/jonboulle/clockwork v0.5.0/go.mod h1:3mZlmanh0g2NDKO5TWZVJAfofYk64M7XN3SzBPjZF60=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
@@ -214,8 +213,9 @@ github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
+github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
@@ -315,46 +315,44 @@ github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chq
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
-go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
-go.etcd.io/etcd/api/v3 v3.5.22 h1:jRqZlcmndfKs1fO9I1Euqk3O5acEyBICyMKunxxhL94=
-go.etcd.io/etcd/api/v3 v3.5.22/go.mod h1:/mQQOEMyP7nAjMKZTJSCtMmlOoNAG5s7IjKZGvMN9Yc=
-go.etcd.io/etcd/client/pkg/v3 v3.5.22 h1:dFVbXCohuH0JKo6X+IznK6aohJSWcU+SF8QZF5EsaOQ=
-go.etcd.io/etcd/client/pkg/v3 v3.5.22/go.mod h1:cSURbmmXBOqyX839SdTbuO2zYtUjcZvKeQ7DEiYVOmU=
-go.etcd.io/etcd/client/v2 v2.305.21 h1:eLiFfexc2mE+pTLz9WwnoEsX5JTTpLCYVivKkmVXIRA=
-go.etcd.io/etcd/client/v2 v2.305.21/go.mod h1:OKkn4hlYNf43hpjEM3Ke3aRdUkhSl8xjKjSf8eCq2J8=
-go.etcd.io/etcd/client/v3 v3.5.22 h1:h+y9ocnclCPLPsoBoKwneZy7gy71VjvJ+8z4IPWxTn8=
-go.etcd.io/etcd/client/v3 v3.5.22/go.mod h1:p4ROLdCiv8gwQtnozOILXkqIjjSI0MR6Ly5F9qpFg+8=
-go.etcd.io/etcd/pkg/v3 v3.5.21 h1:jUItxeKyrDuVuWhdh0HtjUANwyuzcb7/FAeUfABmQsk=
-go.etcd.io/etcd/pkg/v3 v3.5.21/go.mod h1:wpZx8Egv1g4y+N7JAsqi2zoUiBIUWznLjqJbylDjWgU=
-go.etcd.io/etcd/raft/v3 v3.5.21 h1:dOmE0mT55dIUsX77TKBLq+RgyumsQuYeiRQnW/ylugk=
-go.etcd.io/etcd/raft/v3 v3.5.21/go.mod h1:fmcuY5R2SNkklU4+fKVBQi2biVp5vafMrWUEj4TJ4Cs=
-go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU=
-go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo=
+go.etcd.io/bbolt v1.4.2 h1:IrUHp260R8c+zYx/Tm8QZr04CX+qWS5PGfPdevhdm1I=
+go.etcd.io/bbolt v1.4.2/go.mod h1:Is8rSHO/b4f3XigBC0lL0+4FwAQv3HXEEIgFMuKHceM=
+go.etcd.io/etcd/api/v3 v3.6.4 h1:7F6N7toCKcV72QmoUKa23yYLiiljMrT4xCeBL9BmXdo=
+go.etcd.io/etcd/api/v3 v3.6.4/go.mod h1:eFhhvfR8Px1P6SEuLT600v+vrhdDTdcfMzmnxVXXSbk=
+go.etcd.io/etcd/client/pkg/v3 v3.6.4 h1:9HBYrjppeOfFjBjaMTRxT3R7xT0GLK8EJMVC4xg6ok0=
+go.etcd.io/etcd/client/pkg/v3 v3.6.4/go.mod h1:sbdzr2cl3HzVmxNw//PH7aLGVtY4QySjQFuaCgcRFAI=
+go.etcd.io/etcd/client/v3 v3.6.4 h1:YOMrCfMhRzY8NgtzUsHl8hC2EBSnuqbR3dh84Uryl7A=
+go.etcd.io/etcd/client/v3 v3.6.4/go.mod h1:jaNNHCyg2FdALyKWnd7hxZXZxZANb0+KGY+YQaEMISo=
+go.etcd.io/etcd/pkg/v3 v3.6.4 h1:fy8bmXIec1Q35/jRZ0KOes8vuFxbvdN0aAFqmEfJZWA=
+go.etcd.io/etcd/pkg/v3 v3.6.4/go.mod h1:kKcYWP8gHuBRcteyv6MXWSN0+bVMnfgqiHueIZnKMtE=
+go.etcd.io/etcd/server/v3 v3.6.4 h1:LsCA7CzjVt+8WGrdsnh6RhC0XqCsLkBly3ve5rTxMAU=
+go.etcd.io/etcd/server/v3 v3.6.4/go.mod h1:aYCL/h43yiONOv0QIR82kH/2xZ7m+IWYjzRmyQfnCAg=
+go.etcd.io/raft/v3 v3.6.0 h1:5NtvbDVYpnfZWcIHgGRk9DyzkBIXOi8j+DDp1IcnUWQ=
+go.etcd.io/raft/v3 v3.6.0/go.mod h1:nLvLevg6+xrVtHUmVaTcTz603gQPHfh7kUAwV6YpfGo=
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc=
-go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 h1:x7wzEgXfnzJcHDwStJT+mxOz4etr2EcexjqhBvmoakw=
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0/go.mod h1:rg+RlpR5dKwaS95IyyZqj5Wd4E13lk/msnTS0Xl9lJM=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU=
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q=
-go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
-go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM=
-go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA=
+go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
+go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q=
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY=
-go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
-go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
+go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
+go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
-go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
-go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
-go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg=
-go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY=
+go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
+go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
@@ -431,14 +429,12 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0=
gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
-google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk=
-google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc=
-google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422 h1:GVIKPyP/kLIyVOgOnTwFOrvQaQUzOzGMCxgFUOEmm24=
-google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50=
-google.golang.org/grpc v1.71.3 h1:iEhneYTxOruJyZAxdAv8Y0iRZvsc5M6KoW7UA0/7jn0=
-google.golang.org/grpc v1.71.3/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
+google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950=
+google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb h1:TLPQVbx1GJ8VKZxz52VAxl1EBgKXXbTiU9Fc5fZeLn4=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
+google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
+google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
google.golang.org/protobuf v1.36.7 h1:IgrO7UwFQGJdRNXH/sQux4R1Dj1WAKcLElzeeRaXV2A=
google.golang.org/protobuf v1.36.7/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -456,39 +452,37 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o=
gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g=
-k8s.io/api v0.33.4 h1:oTzrFVNPXBjMu0IlpA2eDDIU49jsuEorGHB4cvKupkk=
-k8s.io/api v0.33.4/go.mod h1:VHQZ4cuxQ9sCUMESJV5+Fe8bGnqAARZ08tSTdHWfeAc=
-k8s.io/apiextensions-apiserver v0.33.4 h1:rtq5SeXiDbXmSwxsF0MLe2Mtv3SwprA6wp+5qh/CrOU=
-k8s.io/apiextensions-apiserver v0.33.4/go.mod h1:mWXcZQkQV1GQyxeIjYApuqsn/081hhXPZwZ2URuJeSs=
-k8s.io/apimachinery v0.33.4 h1:SOf/JW33TP0eppJMkIgQ+L6atlDiP/090oaX0y9pd9s=
-k8s.io/apimachinery v0.33.4/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
-k8s.io/apiserver v0.33.4 h1:6N0TEVA6kASUS3owYDIFJjUH6lgN8ogQmzZvaFFj1/Y=
-k8s.io/apiserver v0.33.4/go.mod h1:8ODgXMnOoSPLMUg1aAzMFx+7wTJM+URil+INjbTZCok=
-k8s.io/client-go v0.33.4 h1:TNH+CSu8EmXfitntjUPwaKVPN0AYMbc9F1bBS8/ABpw=
-k8s.io/client-go v0.33.4/go.mod h1:LsA0+hBG2DPwovjd931L/AoaezMPX9CmBgyVyBZmbCY=
-k8s.io/cluster-bootstrap v0.33.4 h1:on2rpd9l+UOhXAeouFn8ROBSo+Ad6U9NELNpmwRxZ44=
-k8s.io/cluster-bootstrap v0.33.4/go.mod h1:SaOAiv+B/RQeUbcmjXKZO62w5BX4oT3ZJ8RFNl3ZoS8=
-k8s.io/component-base v0.33.4 h1:Jvb/aw/tl3pfgnJ0E0qPuYLT0NwdYs1VXXYQmSuxJGY=
-k8s.io/component-base v0.33.4/go.mod h1:567TeSdixWW2Xb1yYUQ7qk5Docp2kNznKL87eygY8Rc=
+k8s.io/api v0.34.0 h1:L+JtP2wDbEYPUeNGbeSa/5GwFtIA662EmT2YSLOkAVE=
+k8s.io/api v0.34.0/go.mod h1:YzgkIzOOlhl9uwWCZNqpw6RJy9L2FK4dlJeayUoydug=
+k8s.io/apiextensions-apiserver v0.34.0 h1:B3hiB32jV7BcyKcMU5fDaDxk882YrJ1KU+ZSkA9Qxoc=
+k8s.io/apiextensions-apiserver v0.34.0/go.mod h1:hLI4GxE1BDBy9adJKxUxCEHBGZtGfIg98Q+JmTD7+g0=
+k8s.io/apimachinery v0.34.0 h1:eR1WO5fo0HyoQZt1wdISpFDffnWOvFLOOeJ7MgIv4z0=
+k8s.io/apimachinery v0.34.0/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
+k8s.io/apiserver v0.34.0 h1:Z51fw1iGMqN7uJ1kEaynf2Aec1Y774PqU+FVWCFV3Jg=
+k8s.io/apiserver v0.34.0/go.mod h1:52ti5YhxAvewmmpVRqlASvaqxt0gKJxvCeW7ZrwgazQ=
+k8s.io/client-go v0.34.0 h1:YoWv5r7bsBfb0Hs2jh8SOvFbKzzxyNo0nSb0zC19KZo=
+k8s.io/client-go v0.34.0/go.mod h1:ozgMnEKXkRjeMvBZdV1AijMHLTh3pbACPvK7zFR+QQY=
+k8s.io/cluster-bootstrap v0.34.0 h1:fWH6cUXbocLYMtWuONVwQ8ayqdEWlyvu25gedMTYTDk=
+k8s.io/cluster-bootstrap v0.34.0/go.mod h1:ZpbQwB+CDTYZIjDKM6Hnt081s0xswcFrlhW7mHVNc7k=
+k8s.io/component-base v0.34.0 h1:bS8Ua3zlJzapklsB1dZgjEJuJEeHjj8yTu1gxE2zQX8=
+k8s.io/component-base v0.34.0/go.mod h1:RSCqUdvIjjrEm81epPcjQ/DS+49fADvGSCkIP3IC6vg=
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff h1:/usPimJzUKKu+m+TE36gUyGcf03XZEP0ZIKgKj35LS4=
-k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff/go.mod h1:5jIi+8yX4RIb8wk3XwBo5Pq2ccx4FP10ohkbSKCZoK8=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
-k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
+k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
+k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM=
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
-sigs.k8s.io/controller-runtime v0.21.0 h1:CYfjpEuicjUecRk+KAeyYh+ouUBn4llGyDYytIGcJS8=
-sigs.k8s.io/controller-runtime v0.21.0/go.mod h1:OSg14+F65eWqIu4DceX7k/+QRAbTTvxeQSNSOQpukWM=
-sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
-sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
+sigs.k8s.io/controller-runtime v0.22.0 h1:mTOfibb8Hxwpx3xEkR56i7xSjB+nH4hZG37SrlCY5e0=
+sigs.k8s.io/controller-runtime v0.22.0/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
+sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
sigs.k8s.io/kind v0.30.0 h1:2Xi1KFEfSMm0XDcvKnUt15ZfgRPCT0OnCBbpgh8DztY=
sigs.k8s.io/kind v0.30.0/go.mod h1:FSqriGaoTPruiXWfRnUXNykF8r2t+fHtK0P0m1AbGF8=
-sigs.k8s.io/randfill v0.0.0-20250304075658-069ef1bbf016/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0 h1:IUA9nvMmnKWcj5jl84xn+T5MnlZKThmUW1TdblaLVAc=
-sigs.k8s.io/structured-merge-diff/v4 v4.6.0/go.mod h1:dDy58f92j70zLsuZVuUX5Wp9vtxXpaZnkPGWeqDfCps=
-sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
+sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
diff --git a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go
index cc436bac5884..c8c0fe56f910 100644
--- a/test/infrastructure/docker/api/v1beta1/dockercluster_types.go
+++ b/test/infrastructure/docker/api/v1beta1/dockercluster_types.go
@@ -116,10 +116,12 @@ type DockerClusterV1Beta2Status struct {
// APIEndpoint represents a reachable Kubernetes API endpoint.
type APIEndpoint struct {
// Host is the hostname on which the API server is serving.
+ // +optional
Host string `json:"host"`
// Port is the port on which the API server is serving.
// Defaults to 6443 if not set.
+ // +optional
Port int `json:"port"`
}
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclusters.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclusters.yaml
index e1e8f8638444..8ed146e52d17 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclusters.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclusters.yaml
@@ -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: devclusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
@@ -137,9 +137,6 @@ spec:
Port is the port on which the API server is serving.
Defaults to 6443 if not set.
type: integer
- required:
- - host
- - port
type: object
required:
- backend
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclustertemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclustertemplates.yaml
index 2eac92c1bfdf..310929e0bc7d 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclustertemplates.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devclustertemplates.yaml
@@ -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: devclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
@@ -167,9 +167,6 @@ spec:
Port is the port on which the API server is serving.
Defaults to 6443 if not set.
type: integer
- required:
- - host
- - port
type: object
required:
- backend
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachines.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachines.yaml
index 52a8518b56c1..eed42e06c802 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachines.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachines.yaml
@@ -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: devmachines.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachinetemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachinetemplates.yaml
index ecdf8b4d13f8..99512f4ccfeb 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachinetemplates.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_devmachinetemplates.yaml
@@ -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: devmachinetemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml
index 5150599aae38..e0aa25dac394 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclusters.yaml
@@ -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: dockerclusters.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
@@ -377,9 +377,6 @@ spec:
Port is the port on which the API server is serving.
Defaults to 6443 if not set.
type: integer
- required:
- - host
- - port
type: object
failureDomains:
additionalProperties:
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml
index 9a441939e328..114bb852437e 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockerclustertemplates.yaml
@@ -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: dockerclustertemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
@@ -198,9 +198,6 @@ spec:
Port is the port on which the API server is serving.
Defaults to 6443 if not set.
type: integer
- required:
- - host
- - port
type: object
failureDomains:
additionalProperties:
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml
index 7dd79dac4e05..e931f456ab2b 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepools.yaml
@@ -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: dockermachinepools.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepooltemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepooltemplates.yaml
index dad1e20a6489..e5636e7e254c 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepooltemplates.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinepooltemplates.yaml
@@ -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: dockermachinepooltemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml
index b878b3b312e2..80fbdfa2bb2a 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachines.yaml
@@ -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: dockermachines.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
diff --git a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml
index 4c9da8025766..2db67d2c625a 100644
--- a/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml
+++ b/test/infrastructure/docker/config/crd/bases/infrastructure.cluster.x-k8s.io_dockermachinetemplates.yaml
@@ -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: dockermachinetemplates.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
diff --git a/util/collections/machine_filters.go b/util/collections/machine_filters.go
index 4f7340622c00..5716d2822ddd 100644
--- a/util/collections/machine_filters.go
+++ b/util/collections/machine_filters.go
@@ -22,6 +22,7 @@ import (
"github.com/blang/semver/v4"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/selection"
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -100,13 +101,13 @@ func InFailureDomains(failureDomains ...string) Func {
}
// OwnedMachines returns a filter to find all machines owned by specified owner.
-// Usage: GetFilteredMachinesForCluster(ctx, client, cluster, OwnedMachines(controlPlane)).
-func OwnedMachines(owner client.Object) func(machine *clusterv1.Machine) bool {
+// Usage: GetFilteredMachinesForCluster(ctx, client, cluster, OwnedMachines(controlPlane, controlPlaneGK)).
+func OwnedMachines(owner client.Object, ownerGK schema.GroupKind) func(machine *clusterv1.Machine) bool {
return func(machine *clusterv1.Machine) bool {
if machine == nil {
return false
}
- return util.IsOwnedByObject(machine, owner)
+ return util.IsOwnedByObject(machine, owner, ownerGK)
}
}
diff --git a/util/deprecated/v1beta1/patch/patch.go b/util/deprecated/v1beta1/patch/patch.go
index 73b32d20bb7e..3e54e565aee5 100644
--- a/util/deprecated/v1beta1/patch/patch.go
+++ b/util/deprecated/v1beta1/patch/patch.go
@@ -143,18 +143,16 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e
return errors.Wrapf(err, "failed to patch %s %s: failed to convert after object to Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
}
- // Determine if the object has status.
- if unstructuredHasStatus(h.after) {
- if options.IncludeStatusObservedGeneration {
- // Set status.observedGeneration if we're asked to do so.
- if err := unstructured.SetNestedField(h.after.Object, h.after.GetGeneration(), "status", "observedGeneration"); err != nil {
- return errors.Wrapf(err, "failed to patch %s %s: failed to set .status.observedGeneration", h.gvk.Kind, klog.KObj(h.beforeObject))
- }
+ // Include .status.observedGeneration if IncludeStatusObservedGeneration is set.
+ if options.IncludeStatusObservedGeneration {
+ // Set status.observedGeneration if we're asked to do so.
+ if err := unstructured.SetNestedField(h.after.Object, h.after.GetGeneration(), "status", "observedGeneration"); err != nil {
+ return errors.Wrapf(err, "failed to patch %s %s: failed to set .status.observedGeneration", h.gvk.Kind, klog.KObj(h.beforeObject))
+ }
- // Restore the changes back to the original object.
- if err := runtime.DefaultUnstructuredConverter.FromUnstructured(h.after.Object, obj); err != nil {
- return errors.Wrapf(err, "failed to patch %s %s: failed to converted object from Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
- }
+ // Restore the changes back to the original object.
+ if err := runtime.DefaultUnstructuredConverter.FromUnstructured(h.after.Object, obj); err != nil {
+ return errors.Wrapf(err, "failed to patch %s %s: failed to converted object from Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
}
}
diff --git a/util/deprecated/v1beta1/patch/utils.go b/util/deprecated/v1beta1/patch/utils.go
index 09b11fe2377d..0e22082ef9f6 100644
--- a/util/deprecated/v1beta1/patch/utils.go
+++ b/util/deprecated/v1beta1/patch/utils.go
@@ -43,11 +43,6 @@ var (
}
)
-func unstructuredHasStatus(u *unstructured.Unstructured) bool {
- _, ok := u.Object["status"]
- return ok
-}
-
// toUnstructured converts an object to Unstructured.
// We have to pass in a gvk as we can't rely on GVK being set in a runtime.Object.
func toUnstructured(obj runtime.Object, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) {
diff --git a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase0obj.yaml b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase0obj.yaml
index b334c4f43003..b4fdd0dcdedf 100644
--- a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase0obj.yaml
+++ b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase0obj.yaml
@@ -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: phase0obj.deprecatedtest.cluster.x-k8s.io
spec:
group: deprecatedtest.cluster.x-k8s.io
diff --git a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase1obj.yaml b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase1obj.yaml
index b90bc0f4bf31..6022fbdf9c35 100644
--- a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase1obj.yaml
+++ b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase1obj.yaml
@@ -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: phase1obj.deprecatedtest.cluster.x-k8s.io
spec:
group: deprecatedtest.cluster.x-k8s.io
diff --git a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase2obj.yaml b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase2obj.yaml
index f2b8c46ad789..b3df3f12d27d 100644
--- a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase2obj.yaml
+++ b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase2obj.yaml
@@ -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: phase2obj.deprecatedtest.cluster.x-k8s.io
spec:
group: deprecatedtest.cluster.x-k8s.io
diff --git a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase3obj.yaml b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase3obj.yaml
index 1334cc89a2e5..ddfee1ca2a91 100644
--- a/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase3obj.yaml
+++ b/util/deprecated/v1beta1/test/builder/crd/deprecatedtest.cluster.x-k8s.io_phase3obj.yaml
@@ -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: phase3obj.deprecatedtest.cluster.x-k8s.io
spec:
group: deprecatedtest.cluster.x-k8s.io
diff --git a/util/patch/patch.go b/util/patch/patch.go
index 1c994e3b88e1..e34b53bcae62 100644
--- a/util/patch/patch.go
+++ b/util/patch/patch.go
@@ -143,18 +143,16 @@ func (h *Helper) Patch(ctx context.Context, obj client.Object, opts ...Option) e
return errors.Wrapf(err, "failed to patch %s %s: failed to convert after object to Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
}
- // Determine if the object has status.
- if unstructuredHasStatus(h.after) {
- if options.IncludeStatusObservedGeneration {
- // Set status.observedGeneration if we're asked to do so.
- if err := unstructured.SetNestedField(h.after.Object, h.after.GetGeneration(), "status", "observedGeneration"); err != nil {
- return errors.Wrapf(err, "failed to patch %s %s: failed to set .status.observedGeneration", h.gvk.Kind, klog.KObj(h.beforeObject))
- }
+ // Include .status.observedGeneration if IncludeStatusObservedGeneration is set.
+ if options.IncludeStatusObservedGeneration {
+ // Set status.observedGeneration if we're asked to do so.
+ if err := unstructured.SetNestedField(h.after.Object, h.after.GetGeneration(), "status", "observedGeneration"); err != nil {
+ return errors.Wrapf(err, "failed to patch %s %s: failed to set .status.observedGeneration", h.gvk.Kind, klog.KObj(h.beforeObject))
+ }
- // Restore the changes back to the original object.
- if err := runtime.DefaultUnstructuredConverter.FromUnstructured(h.after.Object, obj); err != nil {
- return errors.Wrapf(err, "failed to patch %s %s: failed to converted object from Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
- }
+ // Restore the changes back to the original object.
+ if err := runtime.DefaultUnstructuredConverter.FromUnstructured(h.after.Object, obj); err != nil {
+ return errors.Wrapf(err, "failed to patch %s %s: failed to converted object from Unstructured", h.gvk.Kind, klog.KObj(h.beforeObject))
}
}
diff --git a/util/patch/utils.go b/util/patch/utils.go
index 460b95a3c669..5f9ec626c948 100644
--- a/util/patch/utils.go
+++ b/util/patch/utils.go
@@ -43,11 +43,6 @@ var (
}
)
-func unstructuredHasStatus(u *unstructured.Unstructured) bool {
- _, ok := u.Object["status"]
- return ok
-}
-
// toUnstructured converts an object to Unstructured.
// We have to pass in a gvk as we can't rely on GVK being set in a runtime.Object.
func toUnstructured(obj runtime.Object, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) {
diff --git a/util/test/builder/builders.go b/util/test/builder/builders.go
index 042b97511e44..cd3df11864c2 100644
--- a/util/test/builder/builders.go
+++ b/util/test/builder/builders.go
@@ -483,10 +483,6 @@ func (c *ClusterClassBuilder) WithWorkerMachinePoolClasses(mpcs ...clusterv1.Mac
// Build takes the objects and variables in the ClusterClass builder and uses them to create a ClusterClass object.
func (c *ClusterClassBuilder) Build() *clusterv1.ClusterClass {
obj := &clusterv1.ClusterClass{
- TypeMeta: metav1.TypeMeta{
- Kind: "ClusterClass",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: c.name,
Namespace: c.namespace,
@@ -1703,10 +1699,6 @@ func (m *MachinePoolBuilder) WithMinReadySeconds(minReadySeconds int32) *Machine
// Build creates a new MachinePool with the variables and objects passed to the MachinePoolBuilder.
func (m *MachinePoolBuilder) Build() *clusterv1.MachinePool {
obj := &clusterv1.MachinePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "MachinePool",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: m.name,
Namespace: m.namespace,
@@ -1833,10 +1825,6 @@ func (m *MachineDeploymentBuilder) WithMinReadySeconds(minReadySeconds int32) *M
// Build creates a new MachineDeployment with the variables and objects passed to the MachineDeploymentBuilder.
func (m *MachineDeploymentBuilder) Build() *clusterv1.MachineDeployment {
obj := &clusterv1.MachineDeployment{
- TypeMeta: metav1.TypeMeta{
- Kind: "MachineDeployment",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: m.name,
Namespace: m.namespace,
@@ -1940,10 +1928,6 @@ func (m *MachineSetBuilder) WithOwnerReferences(ownerRefs []metav1.OwnerReferenc
// Build creates a new MachineSet with the variables and objects passed to the MachineSetBuilder.
func (m *MachineSetBuilder) Build() *clusterv1.MachineSet {
obj := &clusterv1.MachineSet{
- TypeMeta: metav1.TypeMeta{
- Kind: "MachineSet",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: m.name,
Namespace: m.namespace,
@@ -2015,10 +1999,6 @@ func (m *MachineBuilder) WithLabels(labels map[string]string) *MachineBuilder {
// Build produces a Machine object from the information passed to the MachineBuilder.
func (m *MachineBuilder) Build() *clusterv1.Machine {
machine := &clusterv1.Machine{
- TypeMeta: metav1.TypeMeta{
- Kind: "Machine",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Namespace: m.namespace,
Name: m.name,
@@ -2150,10 +2130,6 @@ func (m *MachineHealthCheckBuilder) WithMaxUnhealthy(maxUnhealthy *intstr.IntOrS
func (m *MachineHealthCheckBuilder) Build() *clusterv1.MachineHealthCheck {
// create a MachineHealthCheck with the spec given in the ClusterClass
mhc := &clusterv1.MachineHealthCheck{
- TypeMeta: metav1.TypeMeta{
- Kind: "MachineHealthCheck",
- APIVersion: clusterv1.GroupVersion.String(),
- },
ObjectMeta: metav1.ObjectMeta{
Name: m.name,
Namespace: m.namespace,
diff --git a/util/test/builder/crd/test.cluster.x-k8s.io_phase0obj.yaml b/util/test/builder/crd/test.cluster.x-k8s.io_phase0obj.yaml
index 58dd86553b2a..01bb3d8a4afa 100644
--- a/util/test/builder/crd/test.cluster.x-k8s.io_phase0obj.yaml
+++ b/util/test/builder/crd/test.cluster.x-k8s.io_phase0obj.yaml
@@ -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: phase0obj.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/util/test/builder/crd/test.cluster.x-k8s.io_phase1obj.yaml b/util/test/builder/crd/test.cluster.x-k8s.io_phase1obj.yaml
index 2b9f8f11939b..efed962d1ed4 100644
--- a/util/test/builder/crd/test.cluster.x-k8s.io_phase1obj.yaml
+++ b/util/test/builder/crd/test.cluster.x-k8s.io_phase1obj.yaml
@@ -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: phase1obj.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/util/test/builder/crd/test.cluster.x-k8s.io_phase2obj.yaml b/util/test/builder/crd/test.cluster.x-k8s.io_phase2obj.yaml
index ae94c8caefc2..3128d94ea5ca 100644
--- a/util/test/builder/crd/test.cluster.x-k8s.io_phase2obj.yaml
+++ b/util/test/builder/crd/test.cluster.x-k8s.io_phase2obj.yaml
@@ -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: phase2obj.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/util/test/builder/crd/test.cluster.x-k8s.io_phase3obj.yaml b/util/test/builder/crd/test.cluster.x-k8s.io_phase3obj.yaml
index d058fb1798d2..3b814b1835f4 100644
--- a/util/test/builder/crd/test.cluster.x-k8s.io_phase3obj.yaml
+++ b/util/test/builder/crd/test.cluster.x-k8s.io_phase3obj.yaml
@@ -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: phase3obj.test.cluster.x-k8s.io
spec:
group: test.cluster.x-k8s.io
diff --git a/util/util.go b/util/util.go
index 6da588595b72..318fef05bed0 100644
--- a/util/util.go
+++ b/util/util.go
@@ -360,9 +360,9 @@ func indexOwnerRef(ownerReferences []metav1.OwnerReference, ref metav1.OwnerRefe
// IsOwnedByObject returns true if any of the owner references point to the given target.
// It matches the object based on the Group, Kind and Name.
-func IsOwnedByObject(obj metav1.Object, target client.Object) bool {
+func IsOwnedByObject(obj metav1.Object, target client.Object, targetGK schema.GroupKind) bool {
for _, ref := range obj.GetOwnerReferences() {
- if refersTo(&ref, target) {
+ if refersTo(&ref, target, targetGK) {
return true
}
}
@@ -370,12 +370,12 @@ func IsOwnedByObject(obj metav1.Object, target client.Object) bool {
}
// IsControlledBy differs from metav1.IsControlledBy. This function matches on Group, Kind and Name. The metav1.IsControlledBy function matches on UID only.
-func IsControlledBy(obj metav1.Object, owner client.Object) bool {
+func IsControlledBy(obj metav1.Object, owner client.Object, ownerGK schema.GroupKind) bool {
controllerRef := metav1.GetControllerOfNoCopy(obj)
if controllerRef == nil {
return false
}
- return refersTo(controllerRef, owner)
+ return refersTo(controllerRef, owner, ownerGK)
}
// Returns true if a and b point to the same object based on Group, Kind and Name.
@@ -394,14 +394,13 @@ func referSameObject(a, b metav1.OwnerReference) bool {
}
// Returns true if ref refers to obj based on Group, Kind and Name.
-func refersTo(ref *metav1.OwnerReference, obj client.Object) bool {
+func refersTo(ref *metav1.OwnerReference, obj client.Object, objGK schema.GroupKind) bool {
refGv, err := schema.ParseGroupVersion(ref.APIVersion)
if err != nil {
return false
}
- gvk := obj.GetObjectKind().GroupVersionKind()
- return refGv.Group == gvk.Group && ref.Kind == gvk.Kind && ref.Name == obj.GetName()
+ return refGv.Group == objGK.Group && ref.Kind == objGK.Kind && ref.Name == obj.GetName()
}
// UnstructuredUnmarshalField is a wrapper around json and unstructured objects to decode and copy a specific field
diff --git a/util/util_test.go b/util/util_test.go
index 68470131fd6e..6837c13cdcc9 100644
--- a/util/util_test.go
+++ b/util/util_test.go
@@ -345,13 +345,9 @@ func TestIsOwnedByObject(t *testing.T) {
targetName := "fri3ndsh1p"
meta := fakeMeta{
- metav1.ObjectMeta{
+ ObjectMeta: metav1.ObjectMeta{
Name: targetName,
},
- metav1.TypeMeta{
- APIVersion: "ponies.info/v1",
- Kind: targetKind,
- },
}
tests := []struct {
@@ -437,7 +433,7 @@ func TestIsOwnedByObject(t *testing.T) {
OwnerReferences: test.refs,
}
- g.Expect(IsOwnedByObject(pointer, &meta)).To(Equal(test.expected), "Could not find a ref to %+v in %+v", meta, test.refs)
+ g.Expect(IsOwnedByObject(pointer, &meta, schema.GroupKind{Group: "ponies.info", Kind: targetKind})).To(Equal(test.expected), "Could not find a ref to %+v in %+v", meta, test.refs)
})
}
}