ansible / awx-resource-operator

41 stars 34 forks source link

Fix ServiceAccount name re: SDK upgrade rename #61

Closed rooftopcellist closed 2 years ago

rooftopcellist commented 2 years ago

The SA name was overlooked during this rename: https://github.com/ansible/awx-resource-operator/pull/57

As a result, permission errors like the following are seen when reconciling AnsibleJob CR's.

kubectl -n almng-test-ns describe job.batch/prehook-test-3-cb456a
...
Warning  FailedCreate  41s (x5 over 3m11s)  job-controller  Error creating: pods "prehook-test-3-cb456a-" is forbidden: error looking up service account almng-test-ns/awx-resource-operator-controller-manager: serviceaccount "awx-resource-operator-controller-manager" not found

This patch corrects the name.

rooftopcellist commented 2 years ago

I tested this out and can confirm that the the ServiceAccount exists and is named consistently now.

$ oc get sa | grep resource
resource-operator-controller-manager   2         16m

To test this end-to-end, I did the following: