Skip to content

Commit e1a83ff

Browse files
committed
add resource-policy keep to cluster-scoped RBAC to avoid Helm ownership conflicts
1 parent 18ee300 commit e1a83ff

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

.github/workflows/test-helm-charts.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ jobs:
1616
with:
1717
fetch-depth: 0
1818

19-
- name: Install Taskfile
20-
uses: arduino/setup-task@v1
21-
22-
- name: Generate CRDs
23-
run: task operator-manifests
24-
25-
- name: Debug CRDs in CI
26-
run: |
27-
echo "Listing CRD files in operator-crds/crd-files:"
28-
ls -R deploy/charts/operator-crds/crd-files
29-
30-
3119
- name: Set up Helm
3220
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
3321
with:

deploy/charts/operator/templates/clusterrole/role.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRole
44
metadata:
55
name: toolhive-operator-manager-role
6+
annotations:
7+
"helm.sh/resource-policy": keep
68
rules:
79
- apiGroups:
810
- ""

deploy/charts/operator/templates/clusterrole/rolebinding.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ metadata:
66
name: toolhive-operator-manager-rolebinding
77
labels:
88
{{- include "toolhive.labels" . | nindent 4 }}
9+
annotations:
10+
"helm.sh/resource-policy": keep
911
roleRef:
1012
apiGroup: rbac.authorization.k8s.io
1113
kind: ClusterRole

deploy/charts/operator/templates/registry-api-clusterrole.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
apiVersion: rbac.authorization.k8s.io/v1
22
kind: ClusterRole
33
metadata:
4+
annotations:
5+
"helm.sh/resource-policy": keep
46
name: toolhive-registry-api-role
57
labels:
68
app.kubernetes.io/name: toolhive-registry-api

deploy/charts/operator/templates/registry-api-clusterrolebinding.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ metadata:
66
app.kubernetes.io/name: toolhive-registry-api
77
app.kubernetes.io/component: registry-api
88
app.kubernetes.io/managed-by: toolhive-operator
9+
annotations:
10+
"helm.sh/resource-policy": keep
911
roleRef:
1012
apiGroup: rbac.authorization.k8s.io
1113
kind: ClusterRole

0 commit comments

Comments
 (0)