mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 17:50:28 +02:00
Turn ServiceAccount into struct value to avoid race conditon during account creation
This commit is contained in:
@@ -128,7 +128,7 @@ func (c *Controller) initPodServiceAccount() {
|
||||
case groupVersionKind.Kind != "ServiceAccount":
|
||||
panic(fmt.Errorf("pod service account definiton in the operator config map defines another type of resource: %v", groupVersionKind.Kind))
|
||||
default:
|
||||
c.opConfig.PodServiceAccount = obj.(*v1.ServiceAccount)
|
||||
c.opConfig.PodServiceAccount = *obj.(*v1.ServiceAccount)
|
||||
// ensure consistent naming of the account
|
||||
c.opConfig.PodServiceAccount.Name = c.opConfig.PodServiceAccountName
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user