Commit 4805252e authored by xiangpengzhao's avatar xiangpengzhao

Do not log the content of pod manifest if parsing fails.

parent d0dfd8c4
...@@ -189,8 +189,7 @@ func (s *sourceFile) extractFromFile(filename string) (pod *v1.Pod, err error) { ...@@ -189,8 +189,7 @@ func (s *sourceFile) extractFromFile(filename string) (pod *v1.Pod, err error) {
return pod, nil return pod, nil
} }
return pod, fmt.Errorf("%v: read '%v', but couldn't parse as pod(%v).\n", return pod, fmt.Errorf("%v: couldn't parse as pod(%v), please check config file.\n", filename, podErr)
filename, string(data), podErr)
} }
func (s *sourceFile) replaceStore(pods ...*v1.Pod) (err error) { func (s *sourceFile) replaceStore(pods ...*v1.Pod) (err error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment