builder

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: AGPL-3.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 ConfigBlock

type ConfigBlock map[string]any

func (ConfigBlock) GetFloat

func (c ConfigBlock) GetFloat(key string) (float64, bool)

func (ConfigBlock) GetInt

func (c ConfigBlock) GetInt(key string) (int, bool)

func (ConfigBlock) GetMap

func (c ConfigBlock) GetMap(key string) (ConfigBlock, bool)

func (ConfigBlock) GetSlice

func (c ConfigBlock) GetSlice(key string) ([]any, bool)

func (ConfigBlock) GetString

func (c ConfigBlock) GetString(key string) (string, bool)

func (ConfigBlock) MustFloat

func (c ConfigBlock) MustFloat(key string) float64

func (ConfigBlock) MustInt

func (c ConfigBlock) MustInt(key string) int

func (ConfigBlock) MustMap

func (c ConfigBlock) MustMap(key string) ConfigBlock

func (ConfigBlock) MustSlice

func (c ConfigBlock) MustSlice(key string) []any

func (ConfigBlock) MustString

func (c ConfigBlock) MustString(key string) string

func (ConfigBlock) Set

func (c ConfigBlock) Set(key string, value any)

func (ConfigBlock) YAML

func (c ConfigBlock) YAML() (string, error)

func (ConfigBlock) YAMLBytes

func (c ConfigBlock) YAMLBytes() ([]byte, error)

type ContainerBuilder

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

func Container

func Container(name, image string) *ContainerBuilder

func (*ContainerBuilder) Build

func (b *ContainerBuilder) Build() corev1.Container

func (*ContainerBuilder) WithAWSSecret

func (b *ContainerBuilder) WithAWSSecret(secretName *string) *ContainerBuilder

func (*ContainerBuilder) WithCommand

func (b *ContainerBuilder) WithCommand(cmd ...string) *ContainerBuilder

func (*ContainerBuilder) WithEnvFrom

func (b *ContainerBuilder) WithEnvFrom(envFrom ...corev1.EnvFromSource) *ContainerBuilder

func (*ContainerBuilder) WithEnvFromSecret

func (b *ContainerBuilder) WithEnvFromSecret(secretName string) *ContainerBuilder

func (*ContainerBuilder) WithPorts

func (b *ContainerBuilder) WithPorts(ports ...corev1.ContainerPort) *ContainerBuilder

func (*ContainerBuilder) WithSecurityContext

func (b *ContainerBuilder) WithSecurityContext(sc *corev1.SecurityContext) *ContainerBuilder

func (*ContainerBuilder) WithVolumeMounts

func (b *ContainerBuilder) WithVolumeMounts(mounts ...corev1.VolumeMount) *ContainerBuilder

type DeploymentBuilder

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

func Deployment

func Deployment(d *appsv1.Deployment) *DeploymentBuilder

func (*DeploymentBuilder) WithContainers

func (b *DeploymentBuilder) WithContainers(containers ...corev1.Container) *DeploymentBuilder

func (*DeploymentBuilder) WithLabel

func (b *DeploymentBuilder) WithLabel(key, value string) *DeploymentBuilder

WithLabel ensures Labels is non-nil and sets a key/value.

func (*DeploymentBuilder) WithReplicas

func (b *DeploymentBuilder) WithReplicas(n int32) *DeploymentBuilder

func (*DeploymentBuilder) WithSelectorLabel

func (b *DeploymentBuilder) WithSelectorLabel(key, value string) *DeploymentBuilder

WithSelectorLabel ensures Spec.Selector.MatchLabels is non-nil and sets a key/value.

func (*DeploymentBuilder) WithServiceAccount

func (b *DeploymentBuilder) WithServiceAccount(name string) *DeploymentBuilder

func (*DeploymentBuilder) WithTemplateAnnotation

func (b *DeploymentBuilder) WithTemplateAnnotation(key, value string) *DeploymentBuilder

func (*DeploymentBuilder) WithTemplateLabel

func (b *DeploymentBuilder) WithTemplateLabel(key, value string) *DeploymentBuilder

func (*DeploymentBuilder) WithTolerations added in v0.2.7

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

func (*DeploymentBuilder) WithVolumes

func (b *DeploymentBuilder) WithVolumes(volumes ...corev1.Volume) *DeploymentBuilder

type ServiceBuilder

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

func Service

func Service(svc *corev1.Service) *ServiceBuilder

func (*ServiceBuilder) WithLabel

func (b *ServiceBuilder) WithLabel(key, value string) *ServiceBuilder

func (*ServiceBuilder) WithPorts added in v0.2.1

func (b *ServiceBuilder) WithPorts(ports ...corev1.ServicePort) *ServiceBuilder

func (*ServiceBuilder) WithSelectorLabel

func (b *ServiceBuilder) WithSelectorLabel(key, value string) *ServiceBuilder

func (*ServiceBuilder) WithType

func (b *ServiceBuilder) WithType(svcType corev1.ServiceType) *ServiceBuilder

Jump to

Keyboard shortcuts

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