Bump log level for health check warning for missing components

Default api server manifest whose liveness check looks like:
"/livez?exclude=etcd&exclude=kms-provider-0&exclude=kms-provider-1"

Which causes spurious messages in apiserver logs every 10 mins:
```
W1017 00:03:39.938956       9 healthz.go:256] cannot exclude some health checks, no health checks are installed matching "kms-provider-0","kms-provider-1"
```

Let's not log excessive messages especially at warning level. We should
do this at a higher level (6 instead of 4).

NOTE: we don't change the message returned to the http request, we keep
that as-is (does not change on log level)

Also see:
https://github.com/aws/eks-distro/blob/v1-19-eks-12/projects/kubernetes/kubernetes/1-19/patches/0016-EKS-PATCH-apiserver-healthz-upper-log-verbosity-for-.patch

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
Davanum Srinivas 2022-10-17 09:42:09 -04:00
parent 48608cfe60
commit 20de240d5b
No known key found for this signature in database
GPG Key ID: 80D83A796103BF59

View File

@ -253,7 +253,7 @@ func handleRootHealth(name string, firstTimeHealthy func(), checks ...HealthChec
}
if excluded.Len() > 0 {
fmt.Fprintf(&individualCheckOutput, "warn: some health checks cannot be excluded: no matches for %s\n", formatQuoted(excluded.List()...))
klog.Warningf("cannot exclude some health checks, no health checks are installed matching %s",
klog.V(6).Infof("cannot exclude some health checks, no health checks are installed matching %s",
formatQuoted(excluded.List()...))
}
// always be verbose on failure