rundeck-plugins / kubernetes

51 stars 59 forks source link

feat(job-delete, job-wait): Change k8s method in job scripts considering RBAC #140

Closed haracejacob closed 1 year ago

haracejacob commented 1 year ago

IMO, when using k8s in the rundeck environment, you probably have limited role. Therefore, you should call k8s API which requires minimal role

read_namespaced_job_status needs role API group "batch", resource "jobs/status", verbs: "get" in its namespace read_namespaced_job needs role API group "batch", resource "jobs", verbs: "get" in its namespace

there is no essential difference

list_pod_for_all_namespaces needs role API group "", resource "pods", verbs: "list" in cluster scope list_namespaced_pod needs role API group "", resource "pods", verbs: "list" in its namespace