diff --git a/cmd/k8s-operator/deploy/chart/templates/operator-rbac.yaml b/cmd/k8s-operator/deploy/chart/templates/operator-rbac.yaml index a4463597d..9fd0658e4 100644 --- a/cmd/k8s-operator/deploy/chart/templates/operator-rbac.yaml +++ b/cmd/k8s-operator/deploy/chart/templates/operator-rbac.yaml @@ -41,6 +41,17 @@ rules: - apiGroups: ["tailscale.com"] resources: ["dnsconfigs", "dnsconfigs/status"] verbs: ["get", "list", "watch", "update"] +# Child resources are created with an ownerReference to their owner and +# blockOwnerDeletion: true. Clusters that enable the OwnerReferencesPermissionEnforcement +# admission plugin (OpenShift does by default) then require update on the owner's +# finalizers subresource, otherwise every such create is rejected and the owner never +# reconciles. Inert where the plugin is not enabled. +- apiGroups: ["tailscale.com"] + resources: ["dnsconfigs/finalizers", "proxygroups/finalizers", "recorders/finalizers"] + verbs: ["update"] +- apiGroups: [""] + resources: ["services/finalizers"] + verbs: ["update"] - apiGroups: ["tailscale.com"] resources: ["tailnets", "tailnets/status"] verbs: ["get", "list", "watch", "update"] diff --git a/cmd/k8s-operator/deploy/manifests/operator.yaml b/cmd/k8s-operator/deploy/manifests/operator.yaml index de7bf6053..dd3d9c451 100644 --- a/cmd/k8s-operator/deploy/manifests/operator.yaml +++ b/cmd/k8s-operator/deploy/manifests/operator.yaml @@ -6663,6 +6663,20 @@ rules: - list - watch - update + - apiGroups: + - tailscale.com + resources: + - dnsconfigs/finalizers + - proxygroups/finalizers + - recorders/finalizers + verbs: + - update + - apiGroups: + - "" + resources: + - services/finalizers + verbs: + - update - apiGroups: - tailscale.com resources: