소스 검색

add admin role to developer

Grega Bremec 7 달 전
부모
커밋
633f095d91
1개의 변경된 파일18개의 추가작업 그리고 0개의 파일을 삭제
  1. 18 0
      playbooks/alerts-start.yml

+ 18 - 0
playbooks/alerts-start.yml

@@ -48,6 +48,24 @@
         kind: namespace
         name: "{{ ge_nsp }}"
 
+    - name: Give developer admin role in the project
+      k8s:
+        kubeconfig: tmp/kubeconfig-ocp4
+        validate_certs: no
+        api_version: rbac.authorization.k8s.io/v1
+        kind: rolebinding
+        namespace: "{{ ge_nsp }}"
+        name: dev-admin
+        definition:
+          roleRef:
+            apiGroup: rbac.authorization.k8s.io
+            kind: ClusterRole
+            name: admin
+          subjects:
+          - apiGroup: rbac.authorization.k8s.io
+            kind: User
+            name: developer
+
     - name: Deploy the sample app manifests
       k8s:
         kubeconfig: tmp/kubeconfig-ocp4