diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a1ce6d2a8ff1..5fe944736cee 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - name: Get changed files id: changed-files - uses: tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c # tag=v44.5.7 + uses: tj-actions/changed-files@40853de9f8ce2d6cfdc73c1b96f14e22ba44aec4 # tag=v45.0.0 - name: Get release version id: release-version run: | diff --git a/api/v1beta1/condition_types.go b/api/v1beta1/condition_types.go index 7f0983e4beeb..a66cf9bc838c 100644 --- a/api/v1beta1/condition_types.go +++ b/api/v1beta1/condition_types.go @@ -74,7 +74,7 @@ type Condition struct { // The reason for the condition's last transition in CamelCase. // The specific API may choose whether or not this field is considered a guaranteed API. - // This field may not be empty. + // This field may be empty. // +optional Reason string `json:"reason,omitempty"` diff --git a/api/v1beta1/zz_generated.openapi.go b/api/v1beta1/zz_generated.openapi.go index 6e5427eef548..4e1017dec6d6 100644 --- a/api/v1beta1/zz_generated.openapi.go +++ b/api/v1beta1/zz_generated.openapi.go @@ -968,7 +968,7 @@ func schema_sigsk8sio_cluster_api_api_v1beta1_Condition(ref common.ReferenceCall }, "reason": { SchemaProps: spec.SchemaProps{ - Description: "The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty.", + Description: "The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may be empty.", Type: []string{"string"}, Format: "", }, 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 aded538ea067..07d4fbdee075 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 @@ -3723,7 +3723,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go index af698cad812f..b67c3f020370 100644 --- a/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go +++ b/bootstrap/kubeadm/internal/controllers/kubeadmconfig_controller.go @@ -157,11 +157,11 @@ func (r *KubeadmConfigReconciler) Reconcile(ctx context.Context, req ctrl.Reques // Look up the owner of this kubeadm config if there is one configOwner, err := bsutil.GetTypedConfigOwner(ctx, r.Client, config) - if apierrors.IsNotFound(err) { - // Could not find the owner yet, this is not an error and will rereconcile when the owner gets set. - return ctrl.Result{}, nil - } if err != nil { + if apierrors.IsNotFound(err) { + // Could not find the owner yet, this is not an error and will rereconcile when the owner gets set. + return ctrl.Result{}, nil + } return ctrl.Result{}, errors.Wrapf(err, "failed to get owner") } if configOwner == nil { diff --git a/cmd/clusterctl/client/config/cert_manager_client.go b/cmd/clusterctl/client/config/cert_manager_client.go index c80f85b669ed..66785599e987 100644 --- a/cmd/clusterctl/client/config/cert_manager_client.go +++ b/cmd/clusterctl/client/config/cert_manager_client.go @@ -29,7 +29,7 @@ const ( CertManagerConfigKey = "cert-manager" // CertManagerDefaultVersion defines the default cert-manager version to be used by clusterctl. - CertManagerDefaultVersion = "v1.15.2" + CertManagerDefaultVersion = "v1.15.3" // CertManagerDefaultURL defines the default cert-manager repository url to be used by clusterctl. // NOTE: At runtime CertManagerDefaultVersion may be replaced with the 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 b16b67e35013..889a31ed0739 100644 --- a/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml +++ b/config/crd/bases/addons.cluster.x-k8s.io_clusterresourcesets.yaml @@ -497,7 +497,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml index 7af8daf7b424..80cd56ba7d17 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusterclasses.yaml @@ -1974,7 +1974,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_clusters.yaml b/config/crd/bases/cluster.x-k8s.io_clusters.yaml index c265e4b5bedd..cc62b73a7dd9 100644 --- a/config/crd/bases/cluster.x-k8s.io_clusters.yaml +++ b/config/crd/bases/cluster.x-k8s.io_clusters.yaml @@ -1686,7 +1686,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml index 55a0dfd736f4..96b88497ba05 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinedeployments.yaml @@ -1542,7 +1542,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml index 014c74c17737..e8deecb8ed2c 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinehealthchecks.yaml @@ -816,7 +816,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml index 941e3bbdce10..801658b64dda 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinepools.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinepools.yaml @@ -1308,7 +1308,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_machines.yaml b/config/crd/bases/cluster.x-k8s.io_machines.yaml index f4ab78688104..493d6aca6646 100644 --- a/config/crd/bases/cluster.x-k8s.io_machines.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machines.yaml @@ -1090,7 +1090,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml index 4922987566d6..a1ddfd4ebe8e 100644 --- a/config/crd/bases/cluster.x-k8s.io_machinesets.yaml +++ b/config/crd/bases/cluster.x-k8s.io_machinesets.yaml @@ -1280,7 +1280,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- 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 a320e57ce58a..f05f04474d99 100644 --- a/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml +++ b/config/crd/bases/ipam.cluster.x-k8s.io_ipaddressclaims.yaml @@ -118,7 +118,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- @@ -253,7 +253,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- 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 5b0f2a4f2dc9..b66fbce4ac04 100644 --- a/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml +++ b/config/crd/bases/runtime.cluster.x-k8s.io_extensionconfigs.yaml @@ -190,7 +190,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/config/metrics/crd-metrics-config.yaml b/config/metrics/crd-metrics-config.yaml index 718af5a9bd9f..907df17aa0d2 100644 --- a/config/metrics/crd-metrics-config.yaml +++ b/config/metrics/crd-metrics-config.yaml @@ -64,6 +64,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a clusterclass. @@ -79,6 +80,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -175,6 +177,7 @@ spec: path: - status - phase + nilIsZero: true type: StateSet - name: created help: Unix creation timestamp. @@ -212,6 +215,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a cluster. @@ -227,6 +231,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - groupVersionKind: group: controlplane.cluster.x-k8s.io @@ -348,6 +353,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a kubeadmcontrolplane. @@ -363,6 +369,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -447,6 +454,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a kubeadmconfig. @@ -462,6 +470,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -609,6 +618,7 @@ spec: path: - status - phase + nilIsZero: true type: StateSet - name: created help: Unix creation timestamp. @@ -646,6 +656,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machine. @@ -661,6 +672,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -868,6 +880,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machinedeployment. @@ -883,6 +896,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -937,6 +951,7 @@ spec: path: - status - currentHealthy + nilIsZero: true type: Gauge - name: status_expected_machines help: Total number of pods counted by this machinehealthcheck. @@ -945,6 +960,7 @@ spec: path: - status - expectedMachines + nilIsZero: true type: Gauge - name: status_remediations_allowed help: Number of machine remediations that are currently allowed. @@ -953,6 +969,7 @@ spec: path: - status - remediationsAllowed + nilIsZero: true type: Gauge - name: created help: Unix creation timestamp. @@ -990,6 +1007,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machinehealthcheck. @@ -1005,6 +1023,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -1104,6 +1123,7 @@ spec: path: - status - fullyLabeledReplicas + nilIsZero: true type: Gauge - name: status_replicas_ready help: The number of ready replicas per machineset. @@ -1159,6 +1179,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machineset. @@ -1174,6 +1195,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. @@ -1310,6 +1332,7 @@ spec: path: - status - phase + nilIsZero: true type: StateSet - name: created help: Unix creation timestamp. @@ -1347,6 +1370,7 @@ spec: - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a machinepool. @@ -1362,6 +1386,7 @@ spec: - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge - name: owner help: Owner references. diff --git a/config/metrics/templates/cluster.yaml b/config/metrics/templates/cluster.yaml index f1e91daa6b57..137ac88178ef 100644 --- a/config/metrics/templates/cluster.yaml +++ b/config/metrics/templates/cluster.yaml @@ -76,4 +76,5 @@ path: - status - phase + nilIsZero: true type: StateSet diff --git a/config/metrics/templates/common_metrics.yaml b/config/metrics/templates/common_metrics.yaml index 073631b9c88b..feb17f969d09 100644 --- a/config/metrics/templates/common_metrics.yaml +++ b/config/metrics/templates/common_metrics.yaml @@ -34,6 +34,7 @@ - conditions valueFrom: - status + nilIsZero: true type: StateSet - name: status_condition_last_transition_time help: The condition last transition time of a ${RESOURCE}. @@ -49,4 +50,5 @@ - conditions valueFrom: - lastTransitionTime + nilIsZero: true type: Gauge diff --git a/config/metrics/templates/machine.yaml b/config/metrics/templates/machine.yaml index b49b1d3b7c7e..fe8d012d4880 100644 --- a/config/metrics/templates/machine.yaml +++ b/config/metrics/templates/machine.yaml @@ -127,4 +127,5 @@ path: - status - phase + nilIsZero: true type: StateSet diff --git a/config/metrics/templates/machinehealthcheck.yaml b/config/metrics/templates/machinehealthcheck.yaml index a14a164be72b..22c7d4e49a98 100644 --- a/config/metrics/templates/machinehealthcheck.yaml +++ b/config/metrics/templates/machinehealthcheck.yaml @@ -34,6 +34,7 @@ path: - status - currentHealthy + nilIsZero: true type: Gauge - name: status_expected_machines help: Total number of pods counted by this machinehealthcheck. @@ -42,6 +43,7 @@ path: - status - expectedMachines + nilIsZero: true type: Gauge - name: status_remediations_allowed help: Number of machine remediations that are currently allowed. @@ -50,4 +52,5 @@ path: - status - remediationsAllowed + nilIsZero: true type: Gauge diff --git a/config/metrics/templates/machinepool.yaml b/config/metrics/templates/machinepool.yaml index a4dbb4aa7254..83c56fe6a8d5 100644 --- a/config/metrics/templates/machinepool.yaml +++ b/config/metrics/templates/machinepool.yaml @@ -116,4 +116,5 @@ path: - status - phase + nilIsZero: true type: StateSet diff --git a/config/metrics/templates/machineset.yaml b/config/metrics/templates/machineset.yaml index e2bde1ecde6e..fc3b19b5b421 100644 --- a/config/metrics/templates/machineset.yaml +++ b/config/metrics/templates/machineset.yaml @@ -79,6 +79,7 @@ path: - status - fullyLabeledReplicas + nilIsZero: true type: Gauge - name: status_replicas_ready help: The number of ready replicas per machineset. 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 dae1ca24836a..cb4668d56d03 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 @@ -4429,7 +4429,7 @@ spec: description: |- The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. - This field may not be empty. + This field may be empty. type: string severity: description: |- diff --git a/controlplane/kubeadm/internal/controllers/controller.go b/controlplane/kubeadm/internal/controllers/controller.go index a77071841c34..39e5a7bb908d 100644 --- a/controlplane/kubeadm/internal/controllers/controller.go +++ b/controlplane/kubeadm/internal/controllers/controller.go @@ -145,19 +145,21 @@ func (r *KubeadmControlPlaneReconciler) Reconcile(ctx context.Context, req ctrl. if apierrors.IsNotFound(err) { return ctrl.Result{}, nil } - return ctrl.Result{Requeue: true}, nil + return ctrl.Result{}, err } // Fetch the Cluster. cluster, err := util.GetOwnerCluster(ctx, r.Client, kcp.ObjectMeta) if err != nil { - log.Error(err, "Failed to retrieve owner Cluster from the API Server") - return ctrl.Result{}, err + // It should be an issue to be investigated if the controller get the NotFound status. + // So, it should return the error. + return ctrl.Result{}, errors.Wrapf(err, "failed to retrieve owner Cluster") } if cluster == nil { log.Info("Cluster Controller has not yet set OwnerRef") return ctrl.Result{}, nil } + log = log.WithValues("Cluster", klog.KObj(cluster)) ctx = ctrl.LoggerInto(ctx, log) diff --git a/docs/book/src/clusterctl/commands/init.md b/docs/book/src/clusterctl/commands/init.md index 1bccbbaa9814..b2973898f930 100644 --- a/docs/book/src/clusterctl/commands/init.md +++ b/docs/book/src/clusterctl/commands/init.md @@ -194,7 +194,7 @@ If this happens, there are no guarantees about the proper functioning of `cluste Cluster API providers require a cert-manager version supporting the `cert-manager.io/v1` API to be installed in the cluster. While doing init, clusterctl checks if there is a version of cert-manager already installed. If not, clusterctl will -install a default version (currently cert-manager v1.15.2). See [clusterctl configuration](../configuration.md) for +install a default version (currently cert-manager v1.15.3). See [clusterctl configuration](../configuration.md) for available options to customize this operation.