diff --git a/src/operator/controllers/otterizeclient/client.go b/src/operator/controllers/otterizeclient/client.go index 814011c..ed1b8a4 100644 --- a/src/operator/controllers/otterizeclient/client.go +++ b/src/operator/controllers/otterizeclient/client.go @@ -45,7 +45,7 @@ func (c *CloudClient) RegisterK8SPod(ctx context.Context, namespace string, _ st return res.RegisterKubernetesPodOwnerCertificateRequest.Id, nil } -func (c *CloudClient) AcquireServicePostgresUserAndPassword(ctx context.Context, serviceName, namespace string) (*otterizegraphql.UserPasswordCredentials, error) { +func (c *CloudClient) AcquireServiceUserAndPassword(ctx context.Context, serviceName, namespace string) (*otterizegraphql.UserPasswordCredentials, error) { userAndPasswordResponse, err := otterizegraphql.RequestUserAndPassword(ctx, c.graphqlClient, serviceName, namespace) if err != nil { return nil, err diff --git a/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go b/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go index a6cbca7..e47fcb8 100644 --- a/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go +++ b/src/operator/controllers/poduserpassword/db_credentials_pod_reconciler.go @@ -25,7 +25,7 @@ const ( ) type CloudUserAndPasswordAcquirer interface { - AcquireServicePostgresUserAndPassword(ctx context.Context, serviceName, namespace string) (*otterizegraphql.UserPasswordCredentials, error) + AcquireServiceUserAndPassword(ctx context.Context, serviceName, namespace string) (*otterizegraphql.UserPasswordCredentials, error) } type Reconciler struct { @@ -99,7 +99,7 @@ func (e *Reconciler) ensurePodUserAndPasswordPostgresSecret(ctx context.Context, err := e.client.Get(ctx, types.NamespacedName{Namespace: pod.Namespace, Name: secretName}, &v1.Secret{}) if apierrors.IsNotFound(err) { log.Debug("Creating user-password credentials secret for pod") - creds, err := e.userAndPasswordAcquirer.AcquireServicePostgresUserAndPassword(ctx, serviceName, pod.Namespace) + creds, err := e.userAndPasswordAcquirer.AcquireServiceUserAndPassword(ctx, serviceName, pod.Namespace) if err != nil { return err }