1
0
mirror of https://github.com/rancher/types.git synced 2025-08-01 04:57:05 +00:00

Update status mapping

This commit is contained in:
Darren Shepherd 2017-12-16 01:41:55 -07:00
parent 119f89d821
commit 3e9e7cb7d6

View File

@ -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{}) {