kubernetes

package
v0.0.0-...-593a473 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 34 Imported by: 1

Documentation

Index

Constants

View Source
const EchoContainer = "local/echoserver:0.0.1"

EchoContainer container image name

View Source
const EchoService = "echo"

EchoService name of the deployment for the echo app

Variables

View Source
var (
	BfeAnnotationPrefix = "bfe.ingress.kubernetes.io/"
	StatusAnnotationKey = fmt.Sprintf("%s%s", BfeAnnotationPrefix, "bfe-ingress-status")
)
View Source
var (
	// WaitForIngressAddressTimeout maximum wait time for valid ingress status value
	WaitForIngressAddressTimeout = 3 * time.Minute
	// WaitForEndpointsTimeout maximum wait time for ready endpoints
	WaitForEndpointsTimeout = 3 * time.Minute

	// EnableOutputYamlDefinitions display yaml definitions of Kubernetes objects before creation
	EnableOutputYamlDefinitions = false

	// IngressControllerNameSpace the namespace of the ingress controller
	IngressControllerNameSpace = "ingress-bfe"
	// IngressControllerServiceName the service name of the ingress controller
	IngressControllerServiceName = "bfe-controller-service"
)
View Source
var IngressClassValue string

IngressClassValue sets the value of the class of Ingresses

View Source
var K8sNodeAddr string

K8sNodeAddr sets ip addr of a k8s node

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 DeleteNamespaceBlocking

func DeleteNamespaceBlocking(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 DeploymentsFromIngressForBalance

func DeploymentsFromIngressForBalance(kubeClientSet kubernetes.Interface, ingress *networking.Ingress, serviceInfo string) error

DeploymentsFromIngressForBalance creates the required deployments for the services defined in the ingress object or in the param of service info

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 UpdateIngress

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

UpdateIngress updates an existing ingress

func WaitForIngressAddress

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

WaitForIngressAddress waits for the Ingress to acquire an address.

Types

type StatusMsg

type StatusMsg struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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