module Kube::Helper

Overview

TODO Write documentation for Kube::Helper

Defined in:

kube/helper.cr

Constant Summary

POD_PHASES = {pending: "Pending", running: "Running", succeeded: "Succeeded", failed: "Failed", unkown: "Unknown", completed: "Completed", crash_loop: "CrashLoopBackOff"}

Hash containing the possible phases of the kubernetes pod

Class Method Summary

Instance Method Summary

Class Method Detail

def self.logger #

[View source]

Instance Method Detail

def client : Kube::Client #

Kubernetes API Client


[View source]
def gather_nodes : Array(JSON::Any) #

Gather all nodes in the cluster


[View source]
def logger #

[View source]
def node_ip(node : Hash(String, JSON::Any) | JSON::Any) : String | Nil #

Helper method to return the ip of the node


[View source]
def node_name(node : JSON::Any) : String | Nil #

Helper method to return the name of the node


[View source]
def node_ready?(node : JSON::Any) : Bool #

Helper method to return if the node is considered "ready"


[View source]
def node_schedulable?(node : JSON::Any) : Bool #

Helper method to return if the node is schedulable


[View source]
def node_unschedulable?(node : JSON::Any) : Bool #

Helper method to return if the node is unschedulable


[View source]
def pod_cluster_ip(pod : JSON::Any) : String | Nil #

Helper method to return the cluster ip of the pod


[View source]
def pod_ip(pod : JSON::Any) : String | Nil #

Helper method to return the ip address of the pod


[View source]
def pod_labels(pod : JSON::Any) : Hash(String, String) | Nil #

Helper method to return the labels of the pod


[View source]
def pod_name(pod : JSON::Any) : String | Nil #

Helper method to return the name of the pod


[View source]
def pod_status(pod : JSON::Any) : String #

Helper method to return the status phase of the pod


[View source]