Repository navigation
Done
Labels
needs-triageIssue needs initial triage by a maintainer
Description
Problem
OpenShift enables the OwnerReferencesPermissionEnforcement admission plugin. It rejects creating an object whose ownerReference sets blockOwnerDeletion: true unless the creator can update the owner's <resource>/finalizers. Vanilla kind doesn't enable this plugin, so our e2e never caught #6835 (fixed in #6756). On OpenShift, the proxy-runner failed to create the mcp-<name>-headless Service, which is owned by the StatefulSet.
This was proposed as a follow-up in jhrozek's comment on #6756.
Proposed change
- Enable the plugin in
test/e2e/thv-operator/kind-config.yaml, merging into the existingClusterConfigurationpatch:kubeadmConfigPatches: - | kind: ClusterConfiguration apiServer: extraArgs: service-node-port-range: "30000-30020" enable-admission-plugins: "NodeRestriction,OwnerReferencesPermissionEnforcement"
NodeRestrictionmust stay in the list, because setting this flag replaces kubeadm's defaults. - The Chainsaw job
e2e-tests-operatorin.github/workflows/operator-ci.yml(around lines 225-231) creates its cluster with kind's defaults. Point it at this config, or at a dedicated one, so the check runs on every PR..github/workflows/test-e2e-lifecycle.ymlandtask kind-setup-e2ealready use the config file.
Notes
- Sequencing: this must land after Add /finalizers subresource for OKD/OpenShift installs #6756. Without that PR's
statefulsets/finalizersgrant, every SSE and streamable-http MCPServer in Chainsaw fails. - Other gaps: every operator
SetControllerReferenceowner is atoolhive.stacklok.devCR, which the*update rule covers. vMCP and the remote proxy set no owner references. registry-api is the one unknown, because it runs from an external image. - kind 1.36: once Renovate moves CI to
kindest/node:v1.36, kind uses kubeadm v1beta4, whereextraArgsis a list of{name, value}. Both this patch and the existingservice-node-port-rangepatch will need rewriting, likely withkubeadmConfigPatchesJSON6902andop: addon/apiServer/extraArgs/-. - envtest won't catch this class of bug: its clients run as admin and its API server doesn't run this plugin.
Metadata
Metadata
Assignees
Labels
needs-triageIssue needs initial triage by a maintainer
Activity
Enforce owner reference permissions in kind e2e
ChrisJBurns commentedon Nov 26, 2026
Correction to the kind 1.36 note above: it doesn't hold with kind v0.33.0. rdimitrov built a
kindest/node:v1.36.1cluster from this config, and kind converted the map-formextraArgsto the kubeadm v1beta4 list form itself. Both flags were on the apiserver, so neither patch needs rewriting for the 1.36 bump. See the review on #7334.Enforce owner reference permissions in kind e2e (stacklok#7334)