File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 ttlSecondsAfterFinished : {{ .Values.global.nexusSnapshotTTL }}
1313 template :
1414 spec :
15- serviceAccountName : jenkins
15+ serviceAccountName : ods-edit
1616 containers :
1717 - name : snapshot-creator
1818 image : image-registry.openshift-image-registry.svc:5000/openshift/ose-cli:latest
Original file line number Diff line number Diff line change 5555# Allow system:authenticated group to view resources in central namespace
5656oc adm policy add-role-to-group view system:authenticated -n ${NAMESPACE}
5757
58+ # Create ods-edit service account and grant edit permissions
59+ if ! oc get serviceaccount ods-edit -n ${NAMESPACE} > /dev/null 2>&1 ; then
60+ echo " Creating service account 'ods-edit' ..."
61+ oc create serviceaccount ods-edit -n ${NAMESPACE}
62+ oc adm policy add-role-to-user edit system:serviceaccount:${NAMESPACE} :ods-edit -n ${NAMESPACE}
63+ else
64+ echo " Service account 'ods-edit' already exists"
65+ fi
66+
5867# Allow system:authenticated group to pull images from central namespace
5968if ! oc adm policy add-cluster-role-to-group system:image-puller system:authenticated -n ${NAMESPACE} ; then
6069 echo " You might not have enough rights to assign 'system:image-puller' to 'system:authenticated'."
You can’t perform that action at this time.
0 commit comments