2026-02-08 21:29:17 +01:00
|
|
|
// Allow unused assignments for diagnostic fields - they're used by the thiserror/miette macros
|
|
|
|
|
#![allow(unused_assignments)]
|
|
|
|
|
|
2026-02-08 22:53:18 +01:00
|
|
|
pub mod api_client;
|
2026-02-08 21:29:17 +01:00
|
|
|
pub mod brand;
|
|
|
|
|
pub mod command;
|
2026-02-08 22:53:18 +01:00
|
|
|
pub mod controller;
|
2026-02-08 21:29:17 +01:00
|
|
|
pub mod error;
|
|
|
|
|
#[cfg(target_os = "illumos")]
|
|
|
|
|
pub mod illumos;
|
|
|
|
|
pub mod mock;
|
|
|
|
|
pub mod network;
|
2026-02-08 22:53:18 +01:00
|
|
|
pub mod node_agent;
|
Add health probes (liveness/readiness/startup) with exec, HTTP, and TCP checks
Implement Kubernetes-style health probes that run during the reconcile loop
to detect unhealthy applications inside running zones. Previously the pod
controller only checked zone liveness via get_zone_state(), missing cases
where the zone is running but the application inside has crashed.
- Add exec_in_zone() to ZoneRuntime trait, implemented via zlogin on illumos
and with configurable mock results for testing
- Add probe type system (ProbeKind, ProbeAction, ContainerProbeConfig) that
decouples from k8s_openapi and extracts probes from pod container specs
with proper k8s defaults (period=10s, timeout=1s, failure=3, success=1)
- Add ProbeExecutor for exec/HTTP/TCP checks with tokio timeout support
(HTTPS falls back to TCP-only with warning)
- Add ProbeTracker state machine that tracks per-pod/container/probe-kind
state, respects initial delays and periods, gates liveness on startup
probes, and aggregates results into PodProbeStatus
- Integrate into PodController reconcile loop: on liveness failure set
phase=Failed with reason LivenessProbeFailure; on readiness failure set
Ready=False; on all-pass restore Ready=True
- Add ProbeFailed error variant with miette diagnostic
Known v1 limitation: probes execute at reconcile cadence (~30s), not at
their configured periodSeconds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:41:30 +01:00
|
|
|
pub mod probes;
|
2026-02-14 20:39:36 +01:00
|
|
|
pub mod node_health;
|
2026-02-09 00:47:28 +01:00
|
|
|
pub mod storage;
|
2026-02-14 21:17:43 +01:00
|
|
|
pub mod sysinfo;
|
2026-02-08 21:29:17 +01:00
|
|
|
pub mod traits;
|
|
|
|
|
pub mod types;
|
|
|
|
|
pub mod zone;
|
|
|
|
|
|
|
|
|
|
// Re-export primary types
|
|
|
|
|
pub use error::{Result, RuntimeError};
|
|
|
|
|
pub use mock::MockRuntime;
|
2026-02-09 00:17:45 +01:00
|
|
|
pub use network::{CidrConfig, IpAllocation, Ipam};
|
2026-02-08 21:29:17 +01:00
|
|
|
pub use traits::ZoneRuntime;
|
|
|
|
|
pub use types::{
|
2026-02-09 00:47:28 +01:00
|
|
|
ContainerProcess, DirectNicConfig, EtherstubConfig, FsMount, NetworkMode, StoragePoolConfig,
|
|
|
|
|
ZoneBrand, ZoneConfig, ZoneInfo, ZoneState, ZoneStorageOpts,
|
2026-02-08 21:29:17 +01:00
|
|
|
};
|
|
|
|
|
|
2026-02-09 00:47:28 +01:00
|
|
|
// Re-export storage types
|
|
|
|
|
#[cfg(target_os = "illumos")]
|
|
|
|
|
pub use storage::ZfsStorageEngine;
|
|
|
|
|
pub use storage::{MockStorageEngine, StorageEngine, VolumeInfo};
|
|
|
|
|
|
2026-02-08 22:53:18 +01:00
|
|
|
// Re-export controller and agent types
|
|
|
|
|
pub use api_client::ApiClient;
|
|
|
|
|
pub use controller::{PodController, PodControllerConfig};
|
|
|
|
|
pub use node_agent::{NodeAgent, NodeAgentConfig};
|
2026-02-14 20:39:36 +01:00
|
|
|
pub use node_health::{NodeHealthChecker, NodeHealthCheckerConfig};
|
Add health probes (liveness/readiness/startup) with exec, HTTP, and TCP checks
Implement Kubernetes-style health probes that run during the reconcile loop
to detect unhealthy applications inside running zones. Previously the pod
controller only checked zone liveness via get_zone_state(), missing cases
where the zone is running but the application inside has crashed.
- Add exec_in_zone() to ZoneRuntime trait, implemented via zlogin on illumos
and with configurable mock results for testing
- Add probe type system (ProbeKind, ProbeAction, ContainerProbeConfig) that
decouples from k8s_openapi and extracts probes from pod container specs
with proper k8s defaults (period=10s, timeout=1s, failure=3, success=1)
- Add ProbeExecutor for exec/HTTP/TCP checks with tokio timeout support
(HTTPS falls back to TCP-only with warning)
- Add ProbeTracker state machine that tracks per-pod/container/probe-kind
state, respects initial delays and periods, gates liveness on startup
probes, and aggregates results into PodProbeStatus
- Integrate into PodController reconcile loop: on liveness failure set
phase=Failed with reason LivenessProbeFailure; on readiness failure set
Ready=False; on all-pass restore Ready=True
- Add ProbeFailed error variant with miette diagnostic
Known v1 limitation: probes execute at reconcile cadence (~30s), not at
their configured periodSeconds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 22:41:30 +01:00
|
|
|
pub use probes::{ProbeExecutor, ProbeTracker};
|
2026-02-08 22:53:18 +01:00
|
|
|
|
2026-02-08 21:29:17 +01:00
|
|
|
// Conditionally re-export illumos runtime
|
|
|
|
|
#[cfg(target_os = "illumos")]
|
|
|
|
|
pub use illumos::IllumosRuntime;
|