custom-pod-autoscaler-operator
custom-pod-autoscaler-operator copied to clipboard
PLAT-98654 Bug fix to use referenced Service Account.
Hi @garrynigel, it looks like this pull request might have been opened by mistake?
Hi @jthomperoo Yes, I didn't mean to merge to master just yet.
I observed a case that if we set the ProvisionServiceAccount to be false and specify a service account name in the pod spec template, it still tried to reconcile a service account with the same name as the CPA resource.
I feel its because of these lines.
https://github.com/jthomperoo/custom-pod-autoscaler-operator/blob/657d0a3a829e596404e4f5c09e71071237721d35/controllers/custompodautoscaler_controller.go#L232
https://github.com/jthomperoo/custom-pod-autoscaler-operator/blob/657d0a3a829e596404e4f5c09e71071237721d35/reconcile/reconcile.go#L62
I am trying to fix/test this locally in our cluster.