mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-18 17:37:03 +00:00
Add debug information to help understand failures finding schemas
This commit is contained in:
parent
7abf19346c
commit
fce54a1b6f
2 changed files with 6 additions and 2 deletions
|
|
@ -108,7 +108,9 @@ func (r SchemaRegistry) DownloadSchema(resourceKind, resourceAPIVersion, k8sVers
|
|||
return nil, errors.New(msg)
|
||||
}
|
||||
|
||||
log.Printf("using schema found at %s", url)
|
||||
if r.debug {
|
||||
log.Printf("using schema found at %s", url)
|
||||
}
|
||||
|
||||
if r.cache != nil {
|
||||
if err := r.cache.Set(resourceKind, resourceAPIVersion, k8sVersion, body); err != nil {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,8 @@ func (r LocalRegistry) DownloadSchema(resourceKind, resourceAPIVersion, k8sVersi
|
|||
return nil, err
|
||||
}
|
||||
|
||||
log.Printf("using schema found at %s", schemaFile)
|
||||
if r.debug {
|
||||
log.Printf("using schema found at %s", schemaFile)
|
||||
}
|
||||
return content, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue