Implements device-specific health check timeouts in the DRA health monitoring
system as defined in KEP-4680. This allows DRA drivers to specify custom
timeout values for individual devices through the gRPC health API.
Changes:
- Add HealthCheckTimeout field to state.DeviceHealth struct to store
device-specific timeout durations
- Add health_check_timeout_seconds field to DeviceHealth proto message
in the DRA health gRPC API (v1alpha1)
- Update manager.go to extract timeout from gRPC responses and apply
DefaultHealthTimeout (30s) when not specified
- Handle negative timeout values defensively by logging a warning and
falling back to the default timeout
- Simplify healthinfo.go by removing redundant fallback logic since
timeouts are now always set at creation time
- Update tests to include HealthCheckTimeout in test fixtures
The timeout behavior is:
- Positive values: Use the specified timeout in seconds
- Zero or unspecified: Use DefaultHealthTimeout (30 seconds)
- Negative values: Log warning and use DefaultHealthTimeout
This implementation provides flexibility for DRA drivers to define
appropriate health check intervals for different device types while
maintaining backward compatibility through sensible defaults.
Ref: KEP-4680 (Add Resource Health to Pod Status)
Ref: kubernetes/enhancements#5476
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
This brings a few fixes, drops github.com/pkg/errors (as a direct
dependency), and bumps many transitive dependencies. The
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp bump to
v0.61.0 breaks "k8s.io/kubernetes/test/integration/apiserver: tracing"
consistently, so it's held back for now.
github.com/containerd/containerd/api pulls in gopkg.in/yaml.v3 so that
needs to be added to the exceptions in unwanted-dependencies.json.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Previously, pod with multiple volumes references one PVC is stuck at
ContainerCreating without any error message.
Fixing this by storing multiple OuterVolumeSpecNames per volume
* cache: do not allocate chan for nothing
The explicit purpose of this channel is to never be closed and nothing
to be sent down on it. Hence, there's no need to allocate a channel - a
nil channel has exactly the desired behaviour.
Additionally, this is more relevant now that testing/synctest gets
unhappy when goroutines are blocked on reading on channels which are
created outside of the synctest bubble. Since this is a package var, that's
hard to avoid when using this package. Synctest is fine with nil
channels though.
Reported-by: Jussi Maki <jussi@isovalent.com>
Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
* handlers: do not allocate chan for nothing
Nil chan has the desired semantics already, and this breaks
testing/synctest because the channel is allocated outside of the bubble.
Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
---------
Signed-off-by: David Bimmler <david.bimmler@isovalent.com>
* feat(apis/batch): PodFailurePolicyOnPodConditionsPattern.Status can be omitted
Signed-off-by: Harry Li <bertram_li@163.com>
* chore: update generated files after API changes
---------
Signed-off-by: Harry Li <bertram_li@163.com>
Co-authored-by: Harry Li <bertram_li@163.com>
* fix using stale pod when evict failed and retry
* simplify pod refresh process
* use activePod at getPodFn
* fix lint check
* add ut
* introduce EvictErrorRetryDelay