Skip to content

Commit

Permalink
fix(pg) Psql credential secret NOT FOUND error
Browse files Browse the repository at this point in the history
Psql credential secret NOT FOUND error

Signed-off-by: zhuhuijun <zhuhuijunzhj@gmail.com>
  • Loading branch information
Ghostbaby committed Apr 5, 2021
1 parent 09e979a commit 9207c54
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/cluster/controllers/database/readiness.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ func (p *PostgreSQLController) Readiness(ctx context.Context, harborcluster *goh

name := harborcluster.Name

conn, err = p.GetInClusterDatabaseInfo(ctx, harborcluster)
if err != nil {
return nil, err
}

var pg api.Postgresql
if err := runtime.DefaultUnstructuredConverter.
FromUnstructured(curUnstructured.UnstructuredContent(), &pg); err != nil {
Expand All @@ -59,6 +54,11 @@ func (p *PostgreSQLController) Readiness(ctx context.Context, harborcluster *goh
), nil
}

conn, err = p.GetInClusterDatabaseInfo(ctx, harborcluster)
if err != nil {
return nil, err
}

secret, err := p.DeployComponentSecret(ctx, conn, harborcluster.Namespace, getDatabasePasswordRefName(name))
if err != nil {
return nil, err
Expand Down

0 comments on commit 9207c54

Please sign in to comment.