Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
omris94 committed Dec 5, 2023
1 parent 139215c commit 550d736
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/operator/controllers/otterizeclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 550d736

Please sign in to comment.