Skip to content

Commit b3f6618

Browse files
committed
Precreate the openshift-gitops-cluster-admin-rolebinding CRB
This is to fix an issue on spokes. See validatedpatterns/clustergroup-chart#103 for the full reasoning. TLDR: we need to drop sync-waves in clustergroup from CRBs to avoid an argo bug, but then without those the SA will never have the right permissions to create another service account, so we precreate the CRB via the acm-chart Closes: validatedpatterns/clustergroup-chart#63
1 parent 963caca commit b3f6618

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

templates/policies/application-policies.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,23 @@ spec:
2929
include:
3030
- default
3131
object-templates:
32+
- complianceType: mustonlyhave
33+
objectDefinition:
34+
apiVersion: rbac.authorization.k8s.io/v1
35+
kind: ClusterRoleBinding
36+
metadata:
37+
name: openshift-gitops-cluster-admin-rolebinding
38+
roleRef:
39+
apiGroup: rbac.authorization.k8s.io
40+
kind: ClusterRole
41+
name: cluster-admin
42+
subjects:
43+
- kind: ServiceAccount
44+
name: openshift-gitops-argocd-application-controller
45+
namespace: openshift-gitops
46+
- kind: ServiceAccount
47+
name: openshift-gitops-argocd-server
48+
namespace: openshift-gitops
3249
- complianceType: mustonlyhave
3350
objectDefinition:
3451
apiVersion: argoproj.io/v1alpha1

0 commit comments

Comments
 (0)