apps

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package apps contains helpers to interact with various Kubernetes workloads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSimpleApplication

func CreateSimpleApplication(c clientset.Interface, namespace string,
	name, image string, internalPort, exposedPort uint16,
	deplOpts ...DeploymentOption) (*appsv1.Deployment, *corev1.Service)

CreateSimpleApplication is a helper which creates a simple Deployment exposed by a matching Service. `internalPort` is the TCP port number of the container managed by the Deployment. `exposedPort` is the TCP port number exposed by the Service.

func GetLogs

func GetLogs(c clientset.Interface, namespace, deploymentName string) io.ReadCloser

GetLogs returns a stream of the logs of the first container in one of the randomly-chosen Pods managed by the Deployment with the given name. Meant to be used with Deployments that have a single replica and a single container.

func WaitForCompletion added in v1.14.0

func WaitForCompletion(c clientset.Interface, j *batchv1.Job)

WaitForCompletion waits until the given Job completes.

func WaitUntilAvailable

func WaitUntilAvailable(c clientset.Interface, d *appsv1.Deployment)

WaitUntilAvailable waits until the given Deployment becomes available.

func WaitUntilEndpointsPopulated added in v1.24.0

func WaitUntilEndpointsPopulated(c clientset.Interface, s *corev1.Service)

WaitUntilEndpointsPopulated waits until the service's endpoints are populated.

Types

type DeploymentOption

type DeploymentOption func(*appsv1.Deployment)

DeploymentOption is a functional option for building a Deployment object.

func WithStartupProbe

func WithStartupProbe(path string) DeploymentOption

WithStartupProbe sets the HTTP startup probe of a Deployment's first container, targetting this container's first TCP port.

Jump to

Keyboard shortcuts

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