From 51348124cc39841c92ba6bc14d6063d42c8a52f9 Mon Sep 17 00:00:00 2001 From: Josh French Date: Thu, 22 Aug 2024 17:03:07 -0400 Subject: [PATCH 1/2] cluster.status.conditions.reason may indeed be empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit regenerate CRDs 🌱 test: improve autoscale tests for to/from zero and running autoscaler in bootstrap cluster (#11082) * test: allow deploying autoscaler to management cluster * test: make machine pools optional in autoscaler test * test: implement optional scale from/to zero tests for autoscale * test: allow modification of apigroup for infrastructure * test: wait for rollouts to finish in autoscaler tests * test: drop cleaning up autoscaler for machine pools * review fix * add comment about AutoScaleFromZero * remove autoscale from zero test for unsupported MachinePools * review fixes update cert-manager to 1.15.3 Signed-off-by: Troy Connor Collect additional logs with CAPD log collector Signed-off-by: Alexandr Demicev :seedling: Bump tj-actions/changed-files in the all-github-actions group Bumps the all-github-actions group with 1 update: [tj-actions/changed-files](https://github.com/tj-actions/changed-files). Updates `tj-actions/changed-files` from 44.5.7 to 45.0.0 - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](https://github.com/tj-actions/changed-files/compare/c65cd883420fd2eb864698a825fc4162dd94482c...40853de9f8ce2d6cfdc73c1b96f14e22ba44aec4) --- updated-dependencies: - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-github-actions ... Signed-off-by: dependabot[bot] :seedling: Bump google.golang.org/api Bumps the all-go-mod-patch-and-minor group with 1 update in the /hack/tools directory: [google.golang.org/api](https://github.com/googleapis/google-api-go-client). Updates `google.golang.org/api` from 0.193.0 to 0.194.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.193.0...v0.194.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-go-mod-patch-and-minor ... Signed-off-by: dependabot[bot] 🌱 Fix error handling when the resource is not found (#10907) * fix: error handling when the resource is not found Signed-off-by: sivchari * fix: test * fix: owner cluster handling Signed-off-by: sivchari * remove duplicated error Signed-off-by: sivchari * remove log variable Signed-off-by: sivchari * fix error handling when the controller reads the cluster Signed-off-by: sivchari * revert test modification Signed-off-by: sivchari * delete log Signed-off-by: sivchari * remove unnecessary deletion Signed-off-by: sivchari * add detail of error Signed-off-by: sivchari --------- Signed-off-by: sivchari Add nilIsZero to all KSM metric configs where needed Signed-off-by: Tobias Giese sorted labels and annotations in alphabatical order Signed-off-by: hackeramitkumar 📖 Fix CAPZ redirection links in quick-start page Trigger Build Trigger Build Add nilIsZero to all KSM metric configs where needed Signed-off-by: Tobias Giese sorted labels and annotations in alphabatical order Signed-off-by: hackeramitkumar 📖 Fix CAPZ redirection links in quick-start page Trigger Build 📖 Fix CAPZ redirection links in quick-start page --- .github/workflows/release.yaml | 2 +- api/v1beta1/condition_types.go | 2 +- api/v1beta1/zz_generated.openapi.go | 2 +- ...strap.cluster.x-k8s.io_kubeadmconfigs.yaml | 2 +- .../controllers/kubeadmconfig_controller.go | 8 +- .../client/config/cert_manager_client.go | 2 +- ....cluster.x-k8s.io_clusterresourcesets.yaml | 2 +- .../cluster.x-k8s.io_clusterclasses.yaml | 2 +- .../crd/bases/cluster.x-k8s.io_clusters.yaml | 2 +- .../cluster.x-k8s.io_machinedeployments.yaml | 2 +- .../cluster.x-k8s.io_machinehealthchecks.yaml | 2 +- .../bases/cluster.x-k8s.io_machinepools.yaml | 2 +- .../crd/bases/cluster.x-k8s.io_machines.yaml | 2 +- .../bases/cluster.x-k8s.io_machinesets.yaml | 2 +- ...ipam.cluster.x-k8s.io_ipaddressclaims.yaml | 4 +- ...ime.cluster.x-k8s.io_extensionconfigs.yaml | 2 +- config/metrics/crd-metrics-config.yaml | 25 +++ config/metrics/templates/cluster.yaml | 1 + config/metrics/templates/common_metrics.yaml | 2 + config/metrics/templates/machine.yaml | 1 + .../metrics/templates/machinehealthcheck.yaml | 3 + config/metrics/templates/machinepool.yaml | 1 + config/metrics/templates/machineset.yaml | 1 + ...cluster.x-k8s.io_kubeadmcontrolplanes.yaml | 2 +- .../internal/controllers/controller.go | 8 +- docs/book/src/clusterctl/commands/init.md | 2 +- docs/book/src/developer/guide.md | 2 +- .../src/reference/labels_and_annotations.md | 108 ++++----- docs/book/src/user/quick-start.md | 4 +- hack/tools/go.mod | 6 +- hack/tools/go.sum | 12 +- .../machinehealthcheck_controller.go | 1 - scripts/ci-e2e-lib.sh | 6 +- test/e2e/autoscaler.go | 206 ++++++++++++------ test/e2e/config/docker.yaml | 6 +- test/framework/autoscaler_helpers.go | 66 +++++- test/framework/deployment_helpers.go | 2 +- test/framework/docker_logcollector.go | 22 +- test/framework/machinedeployment_helpers.go | 1 + test/framework/machinepool_helpers.go | 1 + ...cture.cluster.x-k8s.io_dockerclusters.yaml | 2 +- ...e.cluster.x-k8s.io_dockermachinepools.yaml | 2 +- ...cture.cluster.x-k8s.io_dockermachines.yaml | 2 +- ...ure.cluster.x-k8s.io_inmemoryclusters.yaml | 2 +- ...ure.cluster.x-k8s.io_inmemorymachines.yaml | 2 +- 45 files changed, 350 insertions(+), 189 deletions(-) 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.