Name service account consistenly

This commit is contained in:
Sergey Dudoladov 2018-04-19 16:15:52 +02:00
parent 2f3d63a663
commit a5a65e93f4
1 changed files with 2 additions and 0 deletions

View File

@ -129,6 +129,8 @@ func (c *Controller) initPodServiceAccount() {
panic(fmt.Errorf("pod service account definiton in the operator config map defines another type of resource: %v", groupVersionKind.Kind)) panic(fmt.Errorf("pod service account definiton in the operator config map defines another type of resource: %v", groupVersionKind.Kind))
default: 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
} }
// actual service accounts are deployed at the time of Postgres/Spilo cluster creation // actual service accounts are deployed at the time of Postgres/Spilo cluster creation