mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 20:21:20 +00:00
Rename ConditionFull->ConditionTrue, ConditionNone->ConditionFalse
This commit is contained in:
@@ -437,13 +437,13 @@ type Lifecycle struct {
|
||||
|
||||
type ConditionStatus string
|
||||
|
||||
// These are valid condition statuses. "ConditionFull" means a resource is in the condition;
|
||||
// "ConditionNone" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
||||
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
|
||||
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
||||
// can't decide if a resource is in the condition or not. In the future, we could add other
|
||||
// intermediate conditions, e.g. ConditionDegraded.
|
||||
const (
|
||||
ConditionFull ConditionStatus = "Full"
|
||||
ConditionNone ConditionStatus = "None"
|
||||
ConditionTrue ConditionStatus = "True"
|
||||
ConditionFalse ConditionStatus = "False"
|
||||
ConditionUnknown ConditionStatus = "Unknown"
|
||||
)
|
||||
|
||||
|
@@ -1291,7 +1291,6 @@ func init() {
|
||||
*out = NodeConditionKind(*in)
|
||||
break
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
func(in *NodeConditionKind, out *newer.NodeConditionType, s conversion.Scope) error {
|
||||
@@ -1308,7 +1307,35 @@ func init() {
|
||||
*out = newer.NodeConditionType(*in)
|
||||
break
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
func(in *newer.ConditionStatus, out *ConditionStatus, s conversion.Scope) error {
|
||||
switch *in {
|
||||
case newer.ConditionTrue:
|
||||
*out = ConditionFull
|
||||
break
|
||||
case newer.ConditionFalse:
|
||||
*out = ConditionNone
|
||||
break
|
||||
default:
|
||||
*out = ConditionStatus(*in)
|
||||
break
|
||||
}
|
||||
return nil
|
||||
},
|
||||
func(in *ConditionStatus, out *newer.ConditionStatus, s conversion.Scope) error {
|
||||
switch *in {
|
||||
case ConditionFull:
|
||||
*out = newer.ConditionTrue
|
||||
break
|
||||
case ConditionNone:
|
||||
*out = newer.ConditionFalse
|
||||
break
|
||||
default:
|
||||
*out = newer.ConditionStatus(*in)
|
||||
break
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1359,6 +1386,7 @@ func init() {
|
||||
|
||||
return nil
|
||||
},
|
||||
|
||||
func(in *Binding, out *newer.Binding, s conversion.Scope) error {
|
||||
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
||||
return err
|
||||
|
@@ -1219,7 +1219,6 @@ func init() {
|
||||
*out = NodeConditionKind(*in)
|
||||
break
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
func(in *NodeConditionKind, out *newer.NodeConditionType, s conversion.Scope) error {
|
||||
@@ -1236,7 +1235,35 @@ func init() {
|
||||
*out = newer.NodeConditionType(*in)
|
||||
break
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
func(in *newer.ConditionStatus, out *ConditionStatus, s conversion.Scope) error {
|
||||
switch *in {
|
||||
case newer.ConditionTrue:
|
||||
*out = ConditionFull
|
||||
break
|
||||
case newer.ConditionFalse:
|
||||
*out = ConditionNone
|
||||
break
|
||||
default:
|
||||
*out = ConditionStatus(*in)
|
||||
break
|
||||
}
|
||||
return nil
|
||||
},
|
||||
func(in *ConditionStatus, out *newer.ConditionStatus, s conversion.Scope) error {
|
||||
switch *in {
|
||||
case ConditionFull:
|
||||
*out = newer.ConditionTrue
|
||||
break
|
||||
case ConditionNone:
|
||||
*out = newer.ConditionFalse
|
||||
break
|
||||
default:
|
||||
*out = newer.ConditionStatus(*in)
|
||||
break
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
||||
@@ -1270,7 +1297,6 @@ func init() {
|
||||
*out = PodConditionKind(*in)
|
||||
break
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
func(in *PodConditionKind, out *newer.PodConditionType, s conversion.Scope) error {
|
||||
@@ -1284,9 +1310,9 @@ func init() {
|
||||
*out = newer.PodConditionType(*in)
|
||||
break
|
||||
}
|
||||
|
||||
return nil
|
||||
},
|
||||
|
||||
func(in *Binding, out *newer.Binding, s conversion.Scope) error {
|
||||
if err := s.DefaultConvert(in, out, conversion.IgnoreMissingFields); err != nil {
|
||||
return err
|
||||
|
@@ -451,13 +451,13 @@ type Lifecycle struct {
|
||||
|
||||
type ConditionStatus string
|
||||
|
||||
// These are valid condition statuses. "ConditionFull" means a resource is in the condition;
|
||||
// "ConditionNone" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
||||
// These are valid condition statuses. "ConditionTrue" means a resource is in the condition;
|
||||
// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes
|
||||
// can't decide if a resource is in the condition or not. In the future, we could add other
|
||||
// intermediate conditions, e.g. ConditionDegraded.
|
||||
const (
|
||||
ConditionFull ConditionStatus = "Full"
|
||||
ConditionNone ConditionStatus = "None"
|
||||
ConditionTrue ConditionStatus = "True"
|
||||
ConditionFalse ConditionStatus = "False"
|
||||
ConditionUnknown ConditionStatus = "Unknown"
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user