Skip to content

Commit

Permalink
WIP Improve machine states
Browse files Browse the repository at this point in the history
Signed-off-by: kouki <kouworld0123@gmail.com>
  • Loading branch information
kmdkuk committed Mar 11, 2022
1 parent b0310a9 commit 9df8f62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ var (
reValidLabelName = regexp.MustCompile(`^[a-z0-9A-Z]([a-z0-9A-Z_.-]{0,61}[a-z0-9A-Z])?$`)
reValidLabelVal = regexp.MustCompile(`^[a-z0-9A-Z]([a-z0-9A-Z_.-]{0,61}[a-z0-9A-Z])?$`)
permittedTransitions = map[MachineState][]MachineState{
StateUninitialized: {StateHealthy, StateRetiring},
StateUninitialized: {StateHealthy, StateUnhealthy, StateUnreachable, StateRetiring},
StateHealthy: {StateUnhealthy, StateUnreachable, StateUpdating, StateRetiring},
StateUnhealthy: {StateHealthy, StateUnreachable, StateRetiring},
StateUnreachable: {StateHealthy, StateRetiring},
StateUnhealthy: {StateHealthy, StateUnreachable, StateUpdating, StateRetiring},
StateUnreachable: {StateHealthy, StateUnhealthy, StateUpdating, StateRetiring},
StateUpdating: {StateUninitialized},
StateRetiring: {StateRetired},
StateRetired: {StateUninitialized},
Expand Down

0 comments on commit 9df8f62

Please sign in to comment.