mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
[node operator] node state util function
Signed-off-by: Malte Poll <mp@edgeless.systems>
This commit is contained in:
parent
d62ae3add3
commit
df4e8b2c1e
1 changed files with 15 additions and 0 deletions
15
operators/constellation-node-operator/internal/node/node.go
Normal file
15
operators/constellation-node-operator/internal/node/node.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue