Commit ebb4b0f7 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #46494 from xiangpengzhao/fix-pod-manifest

Automatic merge from submit-queue (batch tested with PRs 46782, 46719, 46339, 46609, 46494) Do not log the content of pod manifest if parsing fails. **What this PR does / why we need it**: - ~~only accepts text/plain config file~~ - ~~not log config file content when it's invalid~~ Do not log the content of pod manifest if parsing fails. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #46493 **Special notes for your reviewer**: /cc @yujuhong @sig-node-reviewers **Release note**: ```release-note NONE ```
parents 747b3b1b 4805252e
......@@ -189,8 +189,7 @@ func (s *sourceFile) extractFromFile(filename string) (pod *v1.Pod, err error) {
return pod, nil
}
return pod, fmt.Errorf("%v: read '%v', but couldn't parse as pod(%v).\n",
filename, string(data), podErr)
return pod, fmt.Errorf("%v: couldn't parse as pod(%v), please check config file.\n", filename, podErr)
}
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