Skip to content

LOW-530: remove refs to non-existent "jobs" resource in "" and "apps" apiGroups

Alex Hill requested to merge low-530-jobs-perms-fix into master

This allows deployment to work with only the admin role in the current namespace, as opposed to cluster-admin.

Currently ska-tango-util creates a Role with permissions for the "jobs" resource in the "" and "apps" API groups. There is no "jobs" resource in those API groups. cluster-admin grants wildcard permissions for all resources in all namespaces, so when using that role to deploy, there are no problems. But admin grants a specific set of permissions, with no wildcard. These non-existent resources are not among them, and so because you need to have a permission to create a Role with that permission, creating the Role fails.

This commit fixes the Role to only create permissions for "jobs" in the "batch" API group.

Merge request reports