Skip to content

Commit

Permalink
fix: Resource pluralization for Postgres
Browse files Browse the repository at this point in the history
Signed-off-by: Rashed Kamal <[email protected]>
  • Loading branch information
rashedkvm committed Mar 8, 2022
1 parent d1ceefa commit 0ae7e76
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/resolver/serviceable_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (r *ServiceableResolver) ServiceableFromObjectReference(ctx context.Context
return nil, fmt.Errorf("failed to track %+v: %v", ref, err)
}
gvr, _ := meta.UnsafeGuessKindToResource(ref.GroupVersionKind())

// Tactical fix for Postgres resource pluralization
if gvr.Resource == "postgreses" && gvr.Group == "sql.tanzu.vmware.com" {
gvr.Resource = "postgres"
}
_, lister, err := r.informerFactory.Get(ctx, gvr)
if err != nil {
return nil, err
Expand Down

0 comments on commit 0ae7e76

Please sign in to comment.