Skip to content

Commit

Permalink
fix: add rolling restart chaos to dashboard collector and schedule co…
Browse files Browse the repository at this point in the history
…llector
  • Loading branch information
jeroenmol-form3 committed Dec 11, 2023
1 parent c270746 commit 6f709a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/dashboard/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ func convertInnerObjectToExperiment(obj v1alpha1.InnerObject) (*core.Experiment,
archive.Action = string(chaos.Spec.Action)
case *v1alpha1.BlockChaos:
archive.Action = string(chaos.Spec.Action)
case *v1alpha1.RollingRestartChaos:
archive.Action = ""
default:
return nil, errors.New("unsupported chaos type " + archive.Kind)
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/dashboard/collector/schedule_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ func (r *ScheduleCollector) setUnarchivedSchedule(req ctrl.Request, schedule v1a
archive.Action = string(schedule.Spec.ScheduleItem.JVMChaos.Action)
case v1alpha1.ScheduleTypePhysicalMachineChaos:
archive.Action = string(schedule.Spec.ScheduleItem.PhysicalMachineChaos.Action)
case v1alpha1.ScheduleTypeRollingRestartChaos:
archive.Action = ""
default:
return errors.New("unsupported chaos type " + string(schedule.Spec.Type))
}
Expand Down

0 comments on commit 6f709a8

Please sign in to comment.