4

I am using OKD with Jenkinsx setup and jenkinsx creates a project dynamically based on a Pull Request created by a developer and deploys the services in that project.

But the services in those projects fails with "ImagePullBackOff" error since the pods in those projects are unable to access images from a different project.

I am trying to allow the projects under preview environment to access images from a different project.

Since the projects under preview environment are dynamically generated, I can add the image puller policy after the project has been created.

oc policy add-role-to-user system:image-puller system:serviceaccount:<project-b>:default --namespace=<project-a>

But I need a policy/command to allow pods in projects under preview environment to access images from a different project before the projects got created.

Please let me know the polcy/process to do it. Any suggestions here would be appreciated.

Bhavani Prasad
  • 1,079
  • 1
  • 9
  • 26

1 Answers1

0

I think you need to give a RoleBinding to the group and project you want to deploy. There is sample how to give RoleBinding to specific group on specific Project: project-rolebinding-give-authority-to-project-specific-

fahmifahim
  • 79
  • 1
  • 9