Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Create a new project and configure SCCs for istio
  4. #
  5. # The privileged SCC is required to ensure changes to the pod’s
  6. # networking configuration is updated successfully with the
  7. # istio-init initialization container and the anyuid SCC is required
  8. # to enable the sidecar container to run with its required user id of 1337.
  9. # (tested against oc 3.11 - might not work with other versions)
  10.  
  11. if [ $# -eq 0 ]
  12. then
  13. echo "What's the name of the project you want to create?"
  14. exit 1
  15. fi
  16.  
  17. oc new-project $1
  18. oc adm policy add-scc-to-user anyuid -z default -n $1
  19. oc adm policy add-scc-to-user privileged -z default -n $1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement