mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 11:18:16 +00:00
Add init container loading to the kubelet
This commit is contained in:
@@ -92,6 +92,8 @@ func GetPodReadyCondition(status PodStatus) *PodCondition {
|
||||
return condition
|
||||
}
|
||||
|
||||
// GetPodCondition extracts the provided condition from the given status and returns that.
|
||||
// Returns nil and -1 if the condition is not present, and the the index of the located condition.
|
||||
func GetPodCondition(status *PodStatus, conditionType PodConditionType) (int, *PodCondition) {
|
||||
for i, c := range status.Conditions {
|
||||
if c.Type == conditionType {
|
||||
@@ -131,17 +133,6 @@ func UpdatePodCondition(status *PodStatus, condition *PodCondition) bool {
|
||||
}
|
||||
}
|
||||
|
||||
// GetPodCondition extracts the provided condition from the given status and returns that.
|
||||
// Returns nil if the condition is not present.
|
||||
func GetPodCondition(status PodStatus, t PodConditionType) *PodCondition {
|
||||
for i, c := range status.Conditions {
|
||||
if c.Type == t {
|
||||
return &status.Conditions[i]
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsNodeReady returns true if a node is ready; false otherwise.
|
||||
func IsNodeReady(node *Node) bool {
|
||||
for _, c := range node.Status.Conditions {
|
||||
|
||||
Reference in New Issue
Block a user