k8s

package
v1.0.0-alpha.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const IngressNGINXController = "k8s.io/ingress-nginx"

IngressNGINXController defines the valid value of IngressClass Controller field for ingress-nginx

Variables

IngressClass indicates the class of the Ingress to use as filter

View Source
var IsIngressV1Ready bool

IsIngressV1Ready indicates if the running Kubernetes version is at least v1.19.0

Functions

func GetIngressPod

func GetIngressPod(kubeClient clientset.Interface) error

GetIngressPod load the ingress-nginx pod

func GetNodeIPOrName

func GetNodeIPOrName(kubeClient clientset.Interface, name string, useInternalIP bool) string

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

func NetworkingIngressAvailable(client clientset.Interface) bool

NetworkingIngressAvailable checks if the package "k8s.io/api/networking/v1" is available or not and if Ingress V1 is supported (k8s >= v1.19.0)

func ParseNameNS

func ParseNameNS(input string) (string, string, error)

ParseNameNS parses a string searching a namespace and name

func SetDefaultNGINXPathType

func SetDefaultNGINXPathType(ing *networkingv1.Ingress)

SetDefaultNGINXPathType sets a default PathType when is not defined.

Types

type PodInfo

type PodInfo struct {
	metav1.TypeMeta
	metav1.ObjectMeta
}

PodInfo contains runtime information about the pod running the Ingres controller +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

var (
	// IngressPodDetails hold information about the ingress-nginx pod
	IngressPodDetails *PodInfo
)

func (*PodInfo) DeepCopyInto

func (in *PodInfo) DeepCopyInto(out *PodInfo)

func (*PodInfo) DeepCopyObject

func (in *PodInfo) DeepCopyObject() runtime.Object

DeepCopyObject returns a generically typed copy of an object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL