Merge pull request #4416 from aledbf/diff

Remove invalid log "Failed to executing diff command: exit status 1"
This commit is contained in:
Kubernetes Prow Robot 2019-08-08 11:31:20 -07:00 committed by GitHub
commit f4678764f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -698,8 +698,13 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error {
diffOutput, err := exec.Command("diff", "-u", cfgPath, tmpfile.Name()).CombinedOutput()
if err != nil {
if exitError, ok := err.(*exec.ExitError); ok {
ws := exitError.Sys().(syscall.WaitStatus)
if ws.ExitStatus() == 2 {
klog.Warningf("Failed to executing diff command: %v", err)
}
}
}
klog.Infof("NGINX configuration diff:\n%v", string(diffOutput))