Documentation ¶
Index ¶
- Constants
- Variables
- func GetIngressPod(kubeClient clientset.Interface) error
- func GetNodeIPOrName(kubeClient clientset.Interface, name string, useInternalIP bool) string
- func MetaNamespaceKey(obj interface{}) string
- func NetworkingIngressAvailable(client clientset.Interface) (bool, bool)
- func ParseNameNS(input string) (string, string, error)
- func SetDefaultNGINXPathType(ing *networkingv1beta1.Ingress)
- type PodInfo
Constants ¶
const IngressNGINXController = "github.com/jhowcrof/doodle-ingress-nginx"
IngressNGINXController defines the valid value of IngressClass Controller field for ingress-nginx
Variables ¶
var IngressClass *networkingv1beta1.IngressClass
IngressClass indicates the class of the Ingress to use as filter
var IngressNGINXPod *apiv1.Pod
IngressNGINXPod hold information about the ingress-nginx pod
var IsIngressV1Ready bool
IsIngressV1Ready indicates if the running Kubernetes version is at least v1.18.0
var IsNetworkingIngressAvailable bool
IsNetworkingIngressAvailable indicates if package "k8s.io/api/networking/v1beta1" is available or not
Functions ¶
func GetIngressPod ¶
GetIngressPod load the ingress-nginx pod
func GetNodeIPOrName ¶
GetNodeIPOrName returns the IP address or the name of a node in the cluster
func MetaNamespaceKey ¶
func MetaNamespaceKey(obj interface{}) string
MetaNamespaceKey knows how to make keys for API objects which implement meta.Interface.
func NetworkingIngressAvailable ¶
NetworkingIngressAvailable checks if the package "k8s.io/api/networking/v1beta1" is available or not and if Ingress V1 is supported (k8s >= v1.18.0)
func ParseNameNS ¶
ParseNameNS parses a string searching a namespace and name
func SetDefaultNGINXPathType ¶
func SetDefaultNGINXPathType(ing *networkingv1beta1.Ingress)
SetDefaultNGINXPathType sets a default PathType when is not defined.
Types ¶
type PodInfo ¶
type PodInfo struct { Name string Namespace string // Labels selectors of the running pod // This is used to search for other Ingress controller pods Labels map[string]string }
PodInfo contains runtime information about the pod running the Ingres controller
func GetPodDetails ¶
GetPodDetails returns runtime information about the pod: name, namespace and IP of the node where it is running