diff --git a/.github/workflows/pr-dependabot.yaml b/.github/workflows/pr-dependabot.yaml index aec5a0b51f..379cd2cffd 100644 --- a/.github/workflows/pr-dependabot.yaml +++ b/.github/workflows/pr-dependabot.yaml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # tag=v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2 - name: Calculate go version id: vars run: echo "go_version=$(make go-version)" >> $GITHUB_OUTPUT diff --git a/.github/workflows/pr-link-check.yaml b/.github/workflows/pr-link-check.yaml index 543cb36421..a3aab4dc78 100644 --- a/.github/workflows/pr-link-check.yaml +++ b/.github/workflows/pr-link-check.yaml @@ -16,7 +16,7 @@ jobs: steps: - name: Clone repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 ref: ${{github.event.pull_request.head.ref}} diff --git a/.github/workflows/pr-verifer.yml b/.github/workflows/pr-verifer.yml index e91e4d52e0..b209b1daa3 100644 --- a/.github/workflows/pr-verifer.yml +++ b/.github/workflows/pr-verifer.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Validate PR Title env: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9b58c49d83..cb69829b95 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: if: github.repository == 'kubernetes-sigs/cluster-api-provider-openstack' steps: - name: Checkout code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # tag=v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2 with: fetch-depth: 0 - name: Get changed files @@ -90,7 +90,7 @@ jobs: env: RELEASE_TAG: ${{needs.push_release_tags.outputs.release_tag}} - name: checkout code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # tag=v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2 with: fetch-depth: 0 ref: ${{ env.RELEASE_TAG }} diff --git a/.github/workflows/security-scan.yaml b/.github/workflows/security-scan.yaml index c9ea8b9cba..07a5f99ec4 100644 --- a/.github/workflows/security-scan.yaml +++ b/.github/workflows/security-scan.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # tag=v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag=v6.0.2 with: ref: ${{ matrix.branch }} - name: Calculate go version diff --git a/.github/workflows/update-golangci-lint.yaml b/.github/workflows/update-golangci-lint.yaml index ed32d074a0..4110ea1169 100644 --- a/.github/workflows/update-golangci-lint.yaml +++ b/.github/workflows/update-golangci-lint.yaml @@ -18,7 +18,7 @@ jobs: current_version: ${{ steps.check_version.outputs.current_version }} steps: - name: Checkout repository - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Get latest golangci-lint version @@ -39,7 +39,7 @@ jobs: sed -i "s/GOLANGCI_LINT_VERSION ?= .*/GOLANGCI_LINT_VERSION ?= ${{ steps.get_version.outputs.latest_version }}/" hack/tools/Makefile - name: Create Pull Request if: ${{ steps.check_version.outputs.current_version != steps.get_version.outputs.latest_version }} - uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # tag=v8.0.0 + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # tag=v8.1.0 with: commit-message: "This commit updates golangci-lint to version v${{ steps.get_version.outputs.latest_version }}." title: ":seedling: chore: bump golangci-lint to v${{ steps.get_version.outputs.latest_version }}" diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml index 20130a7ebf..9ecf6e1658 100644 --- a/.github/workflows/yamllint.yaml +++ b/.github/workflows/yamllint.yaml @@ -14,7 +14,7 @@ jobs: - name: Install yamllint run: sudo apt-get update && sudo apt-get install -y yamllint - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: yaml-lint run: yamllint -c .yamllint.yaml . diff --git a/go.mod b/go.mod index c9c1a08bd5..eacad0e1f5 100644 --- a/go.mod +++ b/go.mod @@ -29,8 +29,8 @@ require ( k8s.io/klog/v2 v2.130.1 k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 - sigs.k8s.io/cluster-api v1.12.1 - sigs.k8s.io/cluster-api/test v1.12.1 + sigs.k8s.io/cluster-api v1.12.2 + sigs.k8s.io/cluster-api/test v1.12.2 sigs.k8s.io/controller-runtime v0.22.5 sigs.k8s.io/structured-merge-diff/v6 v6.3.1 sigs.k8s.io/yaml v1.6.0 diff --git a/go.sum b/go.sum index 43cca86d9a..5e722d61c6 100644 --- a/go.sum +++ b/go.sum @@ -454,10 +454,10 @@ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8 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/cluster-api v1.12.1 h1:s3DivSZjXdu2HPyOtV/n6XwSZBaIycZdKNs4y8X+3lY= -sigs.k8s.io/cluster-api v1.12.1/go.mod h1:+S6WJdi8UPdqv5q9nka5al3ed/Qa0zAcSBgzTaa9VKA= -sigs.k8s.io/cluster-api/test v1.12.1 h1:GGMBW7Nc5LxwrvgVSXiiMWFSOTKSqa0Dgo6V2LVysdM= -sigs.k8s.io/cluster-api/test v1.12.1/go.mod h1:CQxT0fp1fFJjD8zlSUZBUU66UmgIJSv+2U09zenoXOI= +sigs.k8s.io/cluster-api v1.12.2 h1:+b+M2IygfvFZJq7bsaloNakimMEVNf81zkGR1IiuxXs= +sigs.k8s.io/cluster-api v1.12.2/go.mod h1:2XuF/dmN3c/1VITb6DB44N5+Ecvsvd5KOWqrY9Q53nU= +sigs.k8s.io/cluster-api/test v1.12.2 h1:gYApF1BJRt0fCxmgaTeqm+rreNhLHcwQw7Z6pFCtr60= +sigs.k8s.io/cluster-api/test v1.12.2/go.mod h1:E6ID6xgLy6rkpm09yQW2DT8Cf2/7nLX1o3sDHv4pFsY= sigs.k8s.io/controller-runtime v0.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE= sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI= sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE= diff --git a/hack/tools/go.mod b/hack/tools/go.mod index 3741339cbf..abd347ef65 100644 --- a/hack/tools/go.mod +++ b/hack/tools/go.mod @@ -156,7 +156,7 @@ require ( k8s.io/release v0.16.9 // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect - sigs.k8s.io/cluster-api v1.12.1 // indirect + sigs.k8s.io/cluster-api v1.12.2 // indirect sigs.k8s.io/controller-runtime v0.22.5 // indirect sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect sigs.k8s.io/kubebuilder/docs/book/utils v0.0.0-20211028165026-57688c578b5d // indirect diff --git a/hack/tools/go.sum b/hack/tools/go.sum index e67479c5ed..17e873a542 100644 --- a/hack/tools/go.sum +++ b/hack/tools/go.sum @@ -506,12 +506,12 @@ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8 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/cluster-api v1.12.1 h1:s3DivSZjXdu2HPyOtV/n6XwSZBaIycZdKNs4y8X+3lY= -sigs.k8s.io/cluster-api v1.12.1/go.mod h1:+S6WJdi8UPdqv5q9nka5al3ed/Qa0zAcSBgzTaa9VKA= +sigs.k8s.io/cluster-api v1.12.2 h1:+b+M2IygfvFZJq7bsaloNakimMEVNf81zkGR1IiuxXs= +sigs.k8s.io/cluster-api v1.12.2/go.mod h1:2XuF/dmN3c/1VITb6DB44N5+Ecvsvd5KOWqrY9Q53nU= sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250805173327-a7b9f27af519 h1:WkOO6Fg3tmbuFXqTMFfs80mapaQyBbdIC5p86LIVlBI= sigs.k8s.io/cluster-api/hack/tools v0.0.0-20250805173327-a7b9f27af519/go.mod h1:/Zjkh19AmjuI4piKJ1fAZW7k0cDZsSoAAcGHKGZJTZU= -sigs.k8s.io/cluster-api/test v1.12.1 h1:GGMBW7Nc5LxwrvgVSXiiMWFSOTKSqa0Dgo6V2LVysdM= -sigs.k8s.io/cluster-api/test v1.12.1/go.mod h1:CQxT0fp1fFJjD8zlSUZBUU66UmgIJSv+2U09zenoXOI= +sigs.k8s.io/cluster-api/test v1.12.2 h1:gYApF1BJRt0fCxmgaTeqm+rreNhLHcwQw7Z6pFCtr60= +sigs.k8s.io/cluster-api/test v1.12.2/go.mod h1:E6ID6xgLy6rkpm09yQW2DT8Cf2/7nLX1o3sDHv4pFsY= sigs.k8s.io/controller-runtime v0.22.5 h1:v3nfSUMowX/2WMp27J9slwGFyAt7IV0YwBxAkrUr0GE= sigs.k8s.io/controller-runtime v0.22.5/go.mod h1:pc5SoYWnWI6I+cBHYYdZ7B6YHZVY5xNfll88JB+vniI= sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20250620151452-b9a9ca01fd37 h1:NSnbH7C6/fYc5L3FxMQiSlFBqYi+32LnFsXwArzOlIM= diff --git a/vendor/modules.txt b/vendor/modules.txt index a5c2c0f258..5e36530eb1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1483,7 +1483,7 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client -# sigs.k8s.io/cluster-api v1.12.1 +# sigs.k8s.io/cluster-api v1.12.2 ## explicit; go 1.24.0 sigs.k8s.io/cluster-api/api/addons/v1beta2 sigs.k8s.io/cluster-api/api/bootstrap/kubeadm/v1beta2 @@ -1563,7 +1563,7 @@ sigs.k8s.io/cluster-api/util/topology sigs.k8s.io/cluster-api/util/version sigs.k8s.io/cluster-api/util/yaml sigs.k8s.io/cluster-api/version -# sigs.k8s.io/cluster-api/test v1.12.1 +# sigs.k8s.io/cluster-api/test v1.12.2 ## explicit; go 1.24.0 sigs.k8s.io/cluster-api/test/e2e sigs.k8s.io/cluster-api/test/e2e/internal/log diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go index 9665953dd4..5a37f75427 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta1/machine_types.go @@ -66,10 +66,10 @@ const ( // * 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. + // ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is done + // for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31 (graduated to GA in 1.36). + // 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. PreTerminateDeleteHookAnnotationPrefix = "pre-terminate.delete.hook.machine.cluster.x-k8s.io" // MachineCertificatesExpiryDateAnnotation annotation specifies the expiry date of the machine certificates in RFC3339 format. diff --git a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go index 399d3971ce..16f4bf07a7 100644 --- a/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go +++ b/vendor/sigs.k8s.io/cluster-api/api/core/v1beta2/machine_types.go @@ -66,10 +66,10 @@ const ( // * 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. + // ensure it runs last (thus ensuring that kubelet is still working while other pre-terminate hooks run). This is done + // for v1.31 or above because the kubeadm ControlPlaneKubeletLocalMode was introduced with kubeadm 1.31 (graduated to GA in 1.36). + // 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. PreTerminateDeleteHookAnnotationPrefix = "pre-terminate.delete.hook.machine.cluster.x-k8s.io" // MachineCertificatesExpiryDateAnnotation annotation specifies the expiry date of the machine certificates in RFC3339 format. diff --git a/vendor/sigs.k8s.io/cluster-api/internal/contract/controlplane.go b/vendor/sigs.k8s.io/cluster-api/internal/contract/controlplane.go index e980925475..3d08159b77 100644 --- a/vendor/sigs.k8s.io/cluster-api/internal/contract/controlplane.go +++ b/vendor/sigs.k8s.io/cluster-api/internal/contract/controlplane.go @@ -102,7 +102,7 @@ func (c *ControlPlaneContract) StatusVersion() *String { func (c *ControlPlaneContract) Initialized(contractVersion string) *Bool { if contractVersion == "v1beta1" { return &Bool{ - path: []string{"status", "ready"}, + path: []string{"status", "initialized"}, } } diff --git a/vendor/sigs.k8s.io/cluster-api/internal/webhooks/patch_validation.go b/vendor/sigs.k8s.io/cluster-api/internal/webhooks/patch_validation.go index 56af76c6d4..a1d447bbb7 100644 --- a/vendor/sigs.k8s.io/cluster-api/internal/webhooks/patch_validation.go +++ b/vendor/sigs.k8s.io/cluster-api/internal/webhooks/patch_validation.go @@ -331,12 +331,12 @@ func validateJSONPatches(jsonPatches []clusterv1.JSONPatch, variables []clusterv )) } - if !strings.HasPrefix(jsonPatch.Path, "/spec/") { + if !strings.HasPrefix(jsonPatch.Path, "/spec") { allErrs = append(allErrs, field.Invalid( path.Index(i).Child("path"), prettyPrint(jsonPatch), - "jsonPatch path must start with \"/spec/\"", + "jsonPatch path must start with \"/spec\"", )) } diff --git a/vendor/sigs.k8s.io/cluster-api/test/e2e/kcp_adoption.go b/vendor/sigs.k8s.io/cluster-api/test/e2e/kcp_adoption.go index d5170c5c4b..b2222373b0 100644 --- a/vendor/sigs.k8s.io/cluster-api/test/e2e/kcp_adoption.go +++ b/vendor/sigs.k8s.io/cluster-api/test/e2e/kcp_adoption.go @@ -17,6 +17,7 @@ limitations under the License. package e2e import ( + "bytes" "context" "fmt" "os" @@ -24,6 +25,7 @@ import ( "strings" "time" + "github.com/blang/semver/v4" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" corev1 "k8s.io/api/core/v1" @@ -38,6 +40,7 @@ import ( "sigs.k8s.io/cluster-api/test/framework" "sigs.k8s.io/cluster-api/test/framework/clusterctl" "sigs.k8s.io/cluster-api/util" + "sigs.k8s.io/cluster-api/util/version" ) // KCPAdoptionSpecInput is the input for KCPAdoptionSpec. @@ -142,6 +145,13 @@ func KCPAdoptionSpec(ctx context.Context, inputGetter func() KCPAdoptionSpecInpu }) Expect(workloadClusterTemplate).ToNot(BeNil(), "Failed to get the cluster template") + // Remove ControlPlaneKubeletLocalMode for Kubernetes >= v1.36 because the fg has been removed with v1.36. + v, err := semver.ParseTolerant(input.E2EConfig.MustGetVariable(KubernetesVersion)) + Expect(err).ToNot(HaveOccurred()) + if version.Compare(v, semver.MustParse("1.36.0"), version.WithoutPreReleases()) >= 0 { + workloadClusterTemplate = bytes.Replace(workloadClusterTemplate, []byte("featureGates:\n ControlPlaneKubeletLocalMode: true"), []byte(""), 1) + } + By("Applying the cluster template yaml to the cluster with the 'initial' selector") selector := labels.NewSelector().Add(must(labels.NewRequirement("kcp-adoption.step1", selection.Exists, nil))) Expect(input.BootstrapClusterProxy.CreateOrUpdate(ctx, workloadClusterTemplate, framework.WithLabelSelector(selector))).ShouldNot(HaveOccurred()) diff --git a/vendor/sigs.k8s.io/cluster-api/util/cache/cache.go b/vendor/sigs.k8s.io/cluster-api/util/cache/cache.go index f26839c0d3..fca15809d0 100644 --- a/vendor/sigs.k8s.io/cluster-api/util/cache/cache.go +++ b/vendor/sigs.k8s.io/cluster-api/util/cache/cache.go @@ -57,6 +57,9 @@ type Cache[E Entry] interface { // Len returns the number of entries in the cache. Len() int + + // DeleteAll deletes all entries from the cache. + DeleteAll() } // New creates a new cache. @@ -108,6 +111,11 @@ func (r *cache[E]) Len() int { return len(r.ListKeys()) } +func (r *cache[E]) DeleteAll() { + // Note: We are intentionally using Replace instead of List + Delete because the latter would be racy. + _ = r.Store.Replace(nil, "") +} + // HookEntry is an Entry for the hook Cache. type HookEntry struct { ObjectKey client.ObjectKey