kubernetes

package
v0.0.0-...-d920ed3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const EchoContainer = "k8s.gcr.io/ingressconformance/echoserver:v0.0.1@sha256:9b34b17f391f87fb2155f01da2f2f90b7a4a5c1110ed84cb5379faa4f570dc52"

EchoContainer container image name

View Source
const EchoService = "echo"

EchoService name of the deployment for the echo app

Variables

View Source
var (
	// WaitForIngressAddressTimeout maximum wait time for valid ingress status value
	WaitForIngressAddressTimeout = 5 * time.Minute
	// WaitForEndpointsTimeout maximum wait time for ready endpoints
	WaitForEndpointsTimeout = 5 * time.Minute

	// EnableOutputYamlDefinitions display yaml definitions of Kubernetes objects before creation
	EnableOutputYamlDefinitions = false
)
View Source
var IngressClassValue string

IngressClassValue sets the value of the class of Ingresses

View Source
var KubeClient *kubernetes.Clientset

KubeClient Kubernetes API client

Functions

func CleanupNamespaces

func CleanupNamespaces(c kubernetes.Interface) error

CleanupNamespaces removes namespaces created by conformance tests

func DeleteNamespace

func DeleteNamespace(c kubernetes.Interface, namespace string) error

DeleteNamespace deletes a namespace and all the objects inside

func DeploymentsFromIngress

func DeploymentsFromIngress(kubeClientSet kubernetes.Interface, ingress *networking.Ingress) error

DeploymentsFromIngress creates the required deployments for the services defined in the ingress object

func IngressFromManifest

func IngressFromManifest(namespace, manifest string) (*networking.Ingress, error)

IngressFromManifest deserializes an Ingress definition using an Ingress

func IngressFromSpec

func IngressFromSpec(name, namespace, ingressSpec string) (*networking.Ingress, error)

IngressFromSpec deserializes an Ingress definition using an IngressSpec

func LoadClientset

func LoadClientset() (*clientset.Clientset, error)

LoadClientset returns clientset for connecting to kubernetes clusters.

func NewEchoDeployment

func NewEchoDeployment(kubeClientSet kubernetes.Interface, namespace, name, serviceName, servicePortName string, servicePort int32) error

NewEchoDeployment creates a new deployment of the echoserver image in a particular namespace.

func NewIngress

func NewIngress(c kubernetes.Interface, namespace string, ingress *networking.Ingress) error

NewIngress creates a new ingress

func NewNamespace

func NewNamespace(c kubernetes.Interface) (string, error)

NewNamespace creates a new namespace using ingress-conformance- as prefix.

func NewSelfSignedSecret

func NewSelfSignedSecret(c clientset.Interface, namespace, secretName string, hosts []string) error

NewSelfSignedSecret creates a self signed SSL certificate and store it in a secret

func ScaleIngressBackendDeployment

func ScaleIngressBackendDeployment(kubeClientSet kubernetes.Interface, namespace, name, serviceName string, replicas int) error

ScaleIngressBackendDeployment changes the replicas count of a deployment defined in an ingress service backend

func WaitForIngressAddress

func WaitForIngressAddress(c clientset.Interface, namespace, name string) (string, error)

WaitForIngressAddress waits for the Ingress to acquire an address.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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