mirror of
https://github.com/yannh/kubeconform.git
synced 2026-02-20 10:27:02 +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)
|
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 r.cache != nil {
|
||||||
if err := r.cache.Set(resourceKind, resourceAPIVersion, k8sVersion, body); err != 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
|
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
|
return content, nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue