constellation/operators/constellation-node-operator/internal/node/node.go
Malte Poll df4e8b2c1e [node operator] node state util function
Signed-off-by: Malte Poll <mp@edgeless.systems>
2022-08-09 10:29:04 +02:00

16 lines
275 B
Go

package node
import corev1 "k8s.io/api/core/v1"
func Ready(node *corev1.Node) bool {
for _, cond := range node.Status.Conditions {
if cond.Type == corev1.NodeReady {
if cond.Status == corev1.ConditionTrue {
return true
}
return false
}
}
return false
}