gpe-mw-training / rhte2019_E2E_API_Lifecycle_Mgmt_labs

10 stars 9 forks source link

Set up service account roles for using jenkins cicd #4

Closed satyaj closed 4 years ago

satyaj commented 5 years ago

Set up the permissions for "jenkins" service account in "openbanking-cicd" to have edit access to "openbanking-api-dev", "openbanking-api-test" and "openbanking-api-prod" namespaces.

Set up role system:image-puller to the default account in "openbanking-api-test" and "openbanking-api-prod" to the "openbanking-api-dev" namespace.

jbride commented 4 years ago
 oc policy add-role-to-user edit system:serviceaccount:openbanking-cicd:jenkins -n openbanking-api-dev
 oc policy add-role-to-user edit system:serviceaccount:openbanking-cicd:jenkins -n openbanking-api-test
 oc policy add-role-to-user edit system:serviceaccount:openbanking-cicd:jenkins -n openbanking-api-prod
 oc policy add-role-to-user system:image-puller system:serviceaccount:openbanking-api-test:default -n openbanking-api-dev
 oc policy add-role-to-user system:image-puller system:serviceaccount:openbanking-api-prod:default -n openbanking-api-dev
satyaj commented 4 years ago

Working as expected. Closing

jbride commented 4 years ago

In order to support jenkins using Nexus, the following is needed:

oc policy add-role-to-user basic-user system:serviceaccount:openbanking-cicd:jenkins -n openbanking-nexus