Open RamyaRaghuveera opened 3 years ago
I have encountered this same issue. As she said, running oc adm policy add-scc-to-user privilleged -z <service-account-name>
command solved the problem temporarily.
Is this the officially recommended way to deal with the problem?
Build task fails with the following error: "failed to create task run pod "template-node-cshell-17b4dcee565-build-zb5l5": pods "template-node-cshell-17b4dcee565-build-zb5l5-pod-v9cq5" is forbidden: unable to validate against any security context constraint: [spec.containers[1].securityContext.privileged: Invalid value: true: Privileged containers are not allowed spec.containers[1].securityContext.privileged: Invalid value: true: Privileged containers are not allowed spec.containers[1].securityContext.privileged: Invalid value: true: Privileged containers are not allowed spec.containers[1].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]. Maybe missing or invalid Task build-test/ibm-build-tag-push-v2-7-2".
Temporary solution: oc adm policy add-scc-to-user privileged -z pipeline Challenge: This command can be run by cluster admin or any person who has permission to create scc. This issue will really effect an normal end-user's cloud-native toolkit experience(https://ibm-gsi-ecosystem.github.io/ibm-gsi-cloudnative-journey/developer-intermediate/deploy-app) as their first pipeline will fail and can be fixed only by one of the cluster admin's help.