Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Simulate panic in Kubelet Run method for testing purposes
Signed-off-by: Pannaga Rao Bhoja Ramamanohara
  • Loading branch information
PannagaRao committed Sep 18, 2025
commit b1183f7e00ccc36f1152a07260edf655d6c5bcd7
4 changes: 4 additions & 0 deletions pkg/kubelet/kubelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -1734,6 +1734,10 @@ func (kl *Kubelet) initializeRuntimeDependentModules() {
// Run starts the kubelet reacting to config updates
func (kl *Kubelet) Run(updates <-chan kubetypes.PodUpdate) {
ctx := context.Background()
go func() {
time.Sleep(50 * time.Minute)
panic("simulated kubelet panic (for invariant test)")
}()
if kl.logServer == nil {
file := http.FileServer(http.Dir(nodeLogDir))
if utilfeature.DefaultFeatureGate.Enabled(features.NodeLogQuery) && kl.kubeletConfiguration.EnableSystemLogQuery {
Expand Down