deployment

package
v0.0.0-...-f5de34e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment interface {
	// Builder
	Getter
	Setter
}

Deployment interface contains setter and getter

func NewDeploymentClient

func NewDeploymentClient(c client.Client) Deployment

NewDeploymentClient creates a new Deployment

type DeploymentBuilder

type DeploymentBuilder interface {
	metadata.MetadataBuilder
	pod.PodSpecBuilder

	SetSelectors(selectors *metav1.LabelSelector) DeploymentBuilder
	SetReplicas(r *int32) DeploymentBuilder
	SetRollingUpdateStrategy(maxUnavailable, maxSurge int) DeploymentBuilder

	SetPodTemplateMetadata(obj *metav1.ObjectMeta) DeploymentBuilder
	SetPodTemplateSpec(tpl *corev1.PodTemplateSpec) DeploymentBuilder

	BuildDeployment() *appsv1.Deployment
}

DeploymentBuilder returns a deployment builder

func NewDeploymentBuilder

func NewDeploymentBuilder() DeploymentBuilder

NewDeploymentBuilder creates a new DeploymentBuilder

type Getter

type Getter interface {
	GetByNamespacedName(context.Context, types.NamespacedName) (*appsv1.Deployment, error)
}

Getter get Deployment from different parameters

type Setter

type Setter interface {
	Create(context.Context, *appsv1.Deployment) error
	Update(context.Context, *appsv1.Deployment) error
}

Setter get Deployment from different parameters

type SharedVolumeAndMountBuilder

type SharedVolumeAndMountBuilder interface {
	SetName(name string) SharedVolumeAndMountBuilder
	SetMountPath(idx int, path string) SharedVolumeAndMountBuilder
	SetSubPath(idx int, subpath string) SharedVolumeAndMountBuilder
	SetVolumeMountSize(size int) SharedVolumeAndMountBuilder
	SetVolumeSourceEmptyDir() SharedVolumeAndMountBuilder
	SetVolumeSourceConfigMap(name string, kps ...corev1.KeyToPath) SharedVolumeAndMountBuilder
	Build() (*corev1.Volume, []*corev1.VolumeMount)
}

SharedVolumeAndMountBuilder build a Volume which could be mounted by different containers

func NewSharedVolumeAndMountBuilder

func NewSharedVolumeAndMountBuilder() SharedVolumeAndMountBuilder

NewSharedVolumeAndMountBuilder returns a new SharedVolumeAndMountBuilder

type VolumeAndMountBuilder

type VolumeAndMountBuilder interface {
	SetName(string) VolumeAndMountBuilder
	Build() (*corev1.Volume, *corev1.VolumeMount)
}

VolumeAndMountBuilder build a Volume and related VolumeMount

func NewVolumeAndMountBuilder

func NewVolumeAndMountBuilder() VolumeAndMountBuilder

NewVolumeAndMountBuilder returns a VolumeAndMountBuilder

Jump to

Keyboard shortcuts

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