pod

package
v0.0.0-...-5620f93 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is the builder object for Pod

func NewBuilder

func NewBuilder() *Builder

NewBuilder returns new instance of Builder

func (*Builder) Build

func (b *Builder) Build() (*corev1.Pod, error)

Build returns the Pod API instance

func (*Builder) WithAnnotations

func (b *Builder) WithAnnotations(annotations map[string]string) *Builder

WithAnnotations merges existing annotations if any with the ones that are provided here

func (*Builder) WithAnnotationsNew

func (b *Builder) WithAnnotationsNew(annotations map[string]string) *Builder

WithAnnotationsNew resets the annotation field of pod obj with provided arguments

func (*Builder) WithContainerBuilder

func (b *Builder) WithContainerBuilder(
	containerBuilder *container.Builder,
) *Builder

WithContainerBuilder adds a container to this pod object.

NOTE:

container details are present in the provided container

builder object

func (*Builder) WithImagePullSecrets

func (b *Builder) WithImagePullSecrets(secrets []corev1.LocalObjectReference) *Builder

WithImagePullSecrets sets the image pull secret for the container

func (*Builder) WithLabels

func (b *Builder) WithLabels(labels map[string]string) *Builder

WithLabels sets the labels field of Pod with provided value

func (*Builder) WithName

func (b *Builder) WithName(name string) *Builder

WithName sets the Name field of Pod with provided value.

func (*Builder) WithNamespace

func (b *Builder) WithNamespace(namespace string) *Builder

WithNamespace sets the Namespace field of Pod with provided value.

func (*Builder) WithNodeSelector

func (b *Builder) WithNodeSelector(nodeselectors map[string]string) *Builder

WithNodeSelector merges the nodeselectors if present with the provided arguments

func (*Builder) WithNodeSelectorNew

func (b *Builder) WithNodeSelectorNew(nodeselectors map[string]string) *Builder

WithNodeSelectorNew resets the nodeselector field of pod with provided arguments

func (*Builder) WithRestartPolicy

func (b *Builder) WithRestartPolicy(restartpolicy corev1.RestartPolicy) *Builder

WithRestartPolicy sets the restartpolicy field of Pod spec with provided value

func (*Builder) WithServiceAccountName

func (b *Builder) WithServiceAccountName(serviceaccountname string) *Builder

WithServiceAccountName sets the serviceaccountname field of Pod with provided value

func (*Builder) WithTerminationGracePeriodSeconds

func (b *Builder) WithTerminationGracePeriodSeconds(gracePeriod int64) *Builder

WithTerminationGracePeriodSeconds sets the termination grace period seconds to pod

func (*Builder) WithTolerations

func (b *Builder) WithTolerations(tolerations ...corev1.Toleration) *Builder

WithTolerations merges the existing tolerations with the provided arguments

func (*Builder) WithTolerationsNew

func (b *Builder) WithTolerationsNew(tolerations ...corev1.Toleration) *Builder

WithTolerationsNew sets the tolerations field of pod spec

func (*Builder) WithVolumeBuilders

func (b *Builder) WithVolumeBuilders(volumeBuilderList []*volume.Builder) *Builder

WithVolumeBuilders builds the list of volumebuilders provided and merges it to the volumes field of pod spec.

type Pod

type Pod struct {
	// contains filtered or unexported fields
}

Pod holds the api's pod objects

Jump to

Keyboard shortcuts

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