Skip to content

Commit

Permalink
fix: Resource pluralization for Postgres (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
rashedkvm authored Mar 8, 2022
1 parent d1ceefa commit 025d32f
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 025d32f

Please sign in to comment.