Skip to content

Commit bfcd297

Browse files
committed
Separate role binding for each namespace
The role-binding needs to be created with unique name given by namespaces. The original hardcoded name caused that different environments always overwrite the bindings and we were loosing roles after each re-deployment. JIRA: ISV-3396
1 parent 5787cc0 commit bfcd297

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ansible/roles/operator-pipeline/tasks/operator-pipeline-service-account.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
apiVersion: rbac.authorization.k8s.io/v1
3636
kind: ClusterRoleBinding
3737
metadata:
38-
name: "{{ service_account_name }}-{{ item }}"
38+
name: "{{ service_account_name }}-{{ oc_namespace }}-{{ item }}"
3939
roleRef:
4040
kind: ClusterRole
4141
name: "{{ item }}"

ansible/roles/operator-pipeline/templates/openshift/openshift-pipeline-sa-scc-role-bindings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
kind: ClusterRoleBinding
33
apiVersion: rbac.authorization.k8s.io/v1
44
metadata:
5-
name: "system:openshift:scc:pipelines-custom-scc"
5+
name: "pipeline-{{ oc_namespace }}-pipelines-custom-scc"
66
subjects:
77
- kind: ServiceAccount
88
name: pipeline

0 commit comments

Comments
 (0)