Files
kubernetes/pkg
Carlos Eduardo Arango Gutierrez 541ff7cd16 DRA: Add configurable health check timeout per device
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>
2025-08-28 16:34:34 +02:00
..
2025-07-24 08:33:45 +02:00
2025-07-24 08:33:45 +02:00