Using serviceAccountName

Hi all,

I’m trying to set the serviceAccountName for my pod to use as I can see an issue related to the service account my pod is currently using being default.

I tried PVC Write permissions this structure as well as a few others but it seems no matter where I place the “serviceAccountName” I get:

ops.model.ModelError: b'ERROR json: unknown field "serviceAccountName"\n'

Any help would be appreciated

Peter

The pod’s primary service account name is generated by Juju to be the same as the app name and cannot be set by the charm.

Hey @wallyworld OK I see.

whats the correct way to match up pods with service accounts created in the serviceAccount section of the pod spec?

Can you clarify a little? Each the service account created for the workload pod is named the same as the workload so you can match them up based on name. I think I’m not understanding the question so well…

Hey Wallworld,

I got the figured out in the end - I was manipuling the seriviceAccount on different level not at the top level of the pod spec. I moved this up and it solved the issue,

Thanks for the help!
Peter