From 0cf45f3ac736dc7ab4981d7968af21c8100ad24b Mon Sep 17 00:00:00 2001 From: Fabian Wiesel Date: Mon, 9 Nov 2026 14:55:30 +0100 Subject: [PATCH 1/2] Fix make generate for the Helm-templated RBAC role name A go-makefile-maker run dropped the quoting around the release-scoped ClusterRole name, breaking make generate and the pre-commit make check hook. The quoting now lives in the configured value itself, so future regenerations keep a working Makefile. Signed-off-by: Fabian Wiesel --- Makefile | 2 +- Makefile.maker.yaml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 089980fa..da284c32 100644 --- a/Makefile +++ b/Makefile @@ -114,7 +114,7 @@ check: FORCE static-check build/cover.html build-all generate: install-controller-gen @printf "\e[1;36m>> controller-gen\e[0m\n" - @controller-gen crd:allowDangerousTypes=true rbac:roleName={{ include "openstack-hypervisor-operator.fullname" . }}-manager-role webhook paths="./..." output:crd:artifacts:config=charts/openstack-hypervisor-operator/crds output:rbac:artifacts:config=charts/openstack-hypervisor-operator/templates + @controller-gen crd:allowDangerousTypes=true rbac:roleName='"{{ include \"openstack-hypervisor-operator.fullname\" . }}-manager-role"' webhook paths="./..." output:crd:artifacts:config=charts/openstack-hypervisor-operator/crds output:rbac:artifacts:config=charts/openstack-hypervisor-operator/templates @controller-gen object:headerFile="hack/boilerplate.go.txt",year=$(YEAR) paths="./..." @controller-gen applyconfiguration paths="./..." diff --git a/Makefile.maker.yaml b/Makefile.maker.yaml index 8f19fbe7..8930799b 100644 --- a/Makefile.maker.yaml +++ b/Makefile.maker.yaml @@ -11,7 +11,9 @@ controllerGen: objectHeaderFile: hack/boilerplate.go.txt # Release-scoped ClusterRole name (Helm template): multiple instances of # this operator must not share RBAC objects in the same cluster. - rbacRoleName: '{{ include "openstack-hypervisor-operator.fullname" . }}-manager-role' + # Embedded verbatim into the Makefile, so the value must carry the + # quoting itself. + rbacRoleName: '''"{{ include \"openstack-hypervisor-operator.fullname\" . }}-manager-role"''' rbacOutputPath: charts/openstack-hypervisor-operator/templates allowDangerousTypes: true From c85922970e848776d2e3878588f0ae4ae14c4c72 Mon Sep 17 00:00:00 2001 From: Fabian Wiesel Date: Mon, 9 Nov 2026 15:04:58 +0100 Subject: [PATCH 2/2] Run go-makefile-maker Signed-off-by: Fabian Wiesel --- .github/workflows/codeql.yaml | 6 +++--- .github/workflows/container-registry-ghcr.yaml | 2 +- .github/workflows/helm-oci-package-ghcr.yaml | 2 +- .github/workflows/run-go-makefile-maker.yaml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index d4d41ec3..a0cfbc9c 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -36,11 +36,11 @@ jobs: check-latest: true go-version: 1.27.3 - name: Initialize CodeQL - uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4 + uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4 with: languages: go queries: security-extended - name: Autobuild - uses: github/codeql-action/autobuild@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4 + uses: github/codeql-action/autobuild@33d7b85da1a04171e211befe2c739303b9a4c066 # v4 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4 + uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4 diff --git a/.github/workflows/container-registry-ghcr.yaml b/.github/workflows/container-registry-ghcr.yaml index 6b197939..645638e0 100644 --- a/.github/workflows/container-registry-ghcr.yaml +++ b/.github/workflows/container-registry-ghcr.yaml @@ -25,7 +25,7 @@ jobs: with: persist-credentials: false - name: Log in to the Container registry - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4 with: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io diff --git a/.github/workflows/helm-oci-package-ghcr.yaml b/.github/workflows/helm-oci-package-ghcr.yaml index 6d212538..d3abf291 100644 --- a/.github/workflows/helm-oci-package-ghcr.yaml +++ b/.github/workflows/helm-oci-package-ghcr.yaml @@ -65,7 +65,7 @@ jobs: echo "Running helm package with $HELM_ARGS" helm package charts/openstack-hypervisor-operator --destination ./chart $HELM_ARGS - name: Log in to the Container registry - uses: docker/login-action@81c6f93d4bc991e510b342a00b419b3bb4efc5c6 # v4 + uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4 with: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io diff --git a/.github/workflows/run-go-makefile-maker.yaml b/.github/workflows/run-go-makefile-maker.yaml index 019122f1..2d25997b 100644 --- a/.github/workflows/run-go-makefile-maker.yaml +++ b/.github/workflows/run-go-makefile-maker.yaml @@ -45,7 +45,7 @@ jobs: - name: Run go-makefile-maker run: go run github.com/sapcc/go-makefile-maker@latest - name: Report generated changes - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 with: script: |- const { execFileSync } = require('node:child_process')