mirror of https://github.com/kubernetes/kops.git
Log the specific yaml segment that fails. Also remove redundant full manifest logging
This commit is contained in:
parent
928d15b8b0
commit
00f8808ab1
|
|
@ -60,6 +60,7 @@ func LoadObjectsFrom(contents []byte) (ObjectList, error) {
|
|||
data := make(map[string]interface{})
|
||||
err := yaml.Unmarshal(section, &data)
|
||||
if err != nil {
|
||||
klog.Infof("invalid YAML section: %s", string(section))
|
||||
return nil, fmt.Errorf("error parsing yaml: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,6 +22,5 @@ go_library(
|
|||
"//upup/pkg/fi:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/klog/v2:go_default_library",
|
||||
],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ import (
|
|||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
addonsapi "k8s.io/kops/channels/pkg/api"
|
||||
"k8s.io/kops/pkg/assets"
|
||||
"k8s.io/kops/pkg/kubemanifest"
|
||||
|
|
@ -75,8 +73,7 @@ func RemapAddonManifest(addon *addonsapi.AddonSpec, context *model.KopsModelCont
|
|||
{
|
||||
remapped, err := assetBuilder.RemapManifest(manifest)
|
||||
if err != nil {
|
||||
klog.Infof("invalid manifest: %s", string(manifest))
|
||||
return nil, fmt.Errorf("error remapping manifest %s: %v", manifest, err)
|
||||
return nil, fmt.Errorf("error remapping manifest %s: %v", name, err)
|
||||
}
|
||||
manifest = remapped
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue