Without this patch the error message for this example:
```
---
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
containers:
- name: agent
image: debian:latest
tolerations:
- key: pool
operator: Exists
value: build
effect: NoSchedule
```
Looks like:
```
The Pod "test" is invalid: spec.tolerations[0].operator: Invalid value:
core.Toleration{Key:"pool", Operator:"Exists", Value:"build",
Effect:"NoSchedule", TolerationSeconds:(*int64)(nil)}: value must be
empty when `operator` is 'Exists'
```
To clarify that the `Value` field is wrong, we now directly point the
`field.Invalid` to it. Now the error message becomes a more clear and
concise one:
```
The Pod "test" is invalid: spec.tolerations[0].operator: Invalid value:
"build": value must be empty when `operator` is 'Exists'
```
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This is not necessarily a problem, some code might use a timeout and expect it
to trigger. Therefore this should only be an info message, not a
warning. Long-term it might be useful to have an API where the caller decides
whether this gets logged.
The caller should use short messages and leave it to the user of those to
provide more context (no pun intended...). When logging, "canceling context" is
that context.
Before:
scheduler_perf.go:1431: FATAL ERROR: op 7: delete scheduled pods: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
contexthelper.go:69:
WARNING: the operation ran for the configured 2s
After:
scheduler_perf.go:1431: FATAL ERROR: op 7: delete scheduled pods: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
contexthelper.go:69:
INFO: canceling context: the operation ran for the configured 2s
NestedNumberAsFloat64 will convert int64s to float64 only if the int64 value can be represented
exactly by a float64. The original test for this property used a roundtrip conversion from int64 to
float64 and back, and the behavior of these conversions is inconsistent across architectures.
Defer the initialization of label value allow lists until the first invocation of `WithLabelValues` or `With`. This fixes the issue that metrics initialized before flag applied which results in label value allow list is not honored.
As a quick fix for a flake, bceec5a3ff
introduced polling with wait.Poll in all callers of CheckDaemonStatus.
This commit reverts all callers to what they were before (CheckDaemonStatus +
ExpectNoError) and implements polling according to E2E best practices
(https://github.com/kubernetes/community/blob/master/contributors/devel/sig-testing/writing-good-e2e-tests.md#polling-and-timeouts):
- no logging while polling
- support for progress reporting while polling
- last but not least, produce an informative failure message in case of a
timeout, including a dump of the daemon set as YAML
adds exemplar support for counters
* utilizes Prometheus' underlying exemplar machinery
* introduces contextual counters (which were a no-op till now)
* adds testcases
addresses (a part of): #119697
Refactor Healthz with Metrics Address for internal configuration of
kube-proxy adhering to the v1alpha2 version specifications as detailed
in https://kep.k8s.io/784.
Signed-off-by: Daman Arora <aroradaman@gmail.com>