diff --git a/status/status.go b/status/status.go index 508385cb..4fed6ea2 100644 --- a/status/status.go +++ b/status/status.go @@ -24,91 +24,25 @@ type condition struct { } var conditionMappings = []conditionMapping{ - { - Name: "Initialized", - Transition: true, - State: "initializing", - }, - { - Name: "Available", - Transition: true, - State: "activating", - }, - { - Name: "Progressing", - Transition: true, - State: "updating", - }, - { - Name: "Provisioned", - Transition: true, - State: "provisioning", - }, - { - Name: "Updating", - Transition: true, - FalseIsGood: true, - State: "updating", - }, - { - Name: "ConfigOK", - Transition: true, - State: "configuring", - }, - { - Name: "PodScheduled", - Transition: true, - State: "scheduling", - }, - { - Name: "Completed", - State: "completed", - }, - { - Name: "Failed", - Error: true, - State: "error", - }, - { - Name: "OutOfDisk", - Error: true, - FalseIsGood: true, - }, - { - Name: "MemoryPressure", - Error: true, - FalseIsGood: true, - }, - { - Name: "DiskPressure", - Error: true, - FalseIsGood: true, - }, - { - Name: "NetworkUnavailable", - FalseIsGood: true, - Error: true, - }, - { - Name: "KernelHasNoDeadlock", - FalseIsGood: true, - Error: true, - }, - { - Name: "Unschedulable", - Error: true, - FalseIsGood: true, - }, - { - Name: "ReplicaFailure", - Error: true, - FalseIsGood: true, - }, - { - Name: "Ready", - Transition: false, - State: "unavailable", - }, + {Name: "Initialized", Transition: true, State: "initializing"}, + {Name: "Available", Transition: true, State: "activating"}, + {Name: "Progressing", Transition: true, State: "updating"}, + {Name: "Provisioned", Transition: true, State: "provisioning"}, + {Name: "Saved", Transition: true, State: "saving"}, + {Name: "AgentInstalled", Transition: true, State: "installing"}, + {Name: "Updating", Transition: true, FalseIsGood: true, State: "updating"}, + {Name: "ConfigOK", Transition: true, State: "configuring"}, + {Name: "PodScheduled", Transition: true, State: "scheduling"}, + {Name: "Completed", State: "completed"}, + {Name: "Failed", Error: true, State: "error"}, + {Name: "OutOfDisk", Error: true, FalseIsGood: true}, + {Name: "MemoryPressure", Error: true, FalseIsGood: true}, + {Name: "DiskPressure", Error: true, FalseIsGood: true}, + {Name: "NetworkUnavailable", Error: true, FalseIsGood: true}, + {Name: "KernelHasNoDeadlock", Error: true, FalseIsGood: true}, + {Name: "Unschedulable", Error: true, FalseIsGood: true}, + {Name: "ReplicaFailure", Error: true, FalseIsGood: true}, + {Name: "Ready", Transition: false, State: "unavailable"}, } func Set(data map[string]interface{}) {