Skip to content

Commit

Permalink
Wire-up excluded resource types list to the CRD check and update logg…
Browse files Browse the repository at this point in the history
…ing (istio#12143)

* - Wire-up excluded resource types list to the CRD check.
- Update logging.

* Revert copyright.

* Revert copyright.
  • Loading branch information
ozevren authored and Joshua Blatt committed Feb 28, 2019
1 parent 8a8d46d commit 38caa77
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions galley/pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ func newServer(a *Args, p patchTable) (*Server, error) {
return nil, err
}
if !a.DisableResourceReadyCheck {
if err := p.verifyResourceTypesPresence(k, kubeMeta.Types.All()); err != nil {
if err := p.verifyResourceTypesPresence(k, sourceSchema.All()); err != nil {
return nil, err
}
} else {
found, err := p.findSupportedResources(k, kubeMeta.Types.All())
found, err := p.findSupportedResources(k, sourceSchema.All())
if err != nil {
return nil, err
}
Expand Down
7 changes: 5 additions & 2 deletions galley/pkg/source/kube/schema/check/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ func resourceTypesPresence(cs clientset.Interface, specs []sourceSchema.Resource

if err != nil {
var notFound []string
for plural := range search {
notFound = append(notFound, plural)
for _, spec := range search {
notFound = append(notFound, spec.Kind)
}
log.Scope.Errorf("Expected resources (CRDs) not found: %v", notFound)
log.Scope.Error("To stop Galley from waiting for these resources (CRDs), consider using the --excludedResourceKinds flag")

return fmt.Errorf("%v: the following resource type(s) were not found: %v", err, notFound)
}

Expand Down

0 comments on commit 38caa77

Please sign in to comment.