pod

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Affinity

func Affinity(podAntiAffinitySelector map[string]string, nodeAffinity *corev1.NodeAffinity) *corev1.Affinity

Affinity returns a corev1.Affinity struct

func ContainerPortTCP

func ContainerPortTCP(name string, port int32) corev1.ContainerPort

ContainerPortTCP returns a TCP corev1.ContainerPort

func ContainerPorts

func ContainerPorts(ports ...corev1.ContainerPort) []corev1.ContainerPort

ContainerPorts returns a list of corev1.ContainerPort

func ExecProbe

func ExecProbe(command string, cfg saasv1alpha1.ProbeSpec) *corev1.Probe

ExecProbe returns a exec type corev1.Probe struct

func HTTPProbe

func HTTPProbe(path string, port intstr.IntOrString, scheme corev1.URIScheme, cfg saasv1alpha1.ProbeSpec) *corev1.Probe

HTTPProbe returns an HTTP corev1.Probe struct

func HTTPProbeWithHeaders

func HTTPProbeWithHeaders(path string, port intstr.IntOrString, scheme corev1.URIScheme, cfg saasv1alpha1.ProbeSpec, headers map[string]string) *corev1.Probe

func Image

func Image(image saasv1alpha1.ImageSpec) string

func ImagePullSecrets

func ImagePullSecrets(ips *string) []corev1.LocalObjectReference

func TCPProbe

func TCPProbe(port intstr.IntOrString, cfg saasv1alpha1.ProbeSpec) *corev1.Probe

TCPProbe returns a TCP corev1.Probe struct

Types

type Option added in v0.22.0

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

func (*Option) AsSecretRef added in v0.22.0

func (o *Option) AsSecretRef(s string) *Option

func (*Option) EmptyIf added in v0.22.0

func (o *Option) EmptyIf(empty bool) *Option

func (*Option) IntoEnvvar added in v0.22.0

func (o *Option) IntoEnvvar(e string) *Option

type Options added in v0.22.0

type Options []*Option

func NewOptions added in v0.22.0

func NewOptions() *Options

func Union added in v0.22.0

func Union(lists ...[]*Option) *Options

func (*Options) BuildEnvironment added in v0.22.0

func (opts *Options) BuildEnvironment() []corev1.EnvVar

BuildEnvironment generates a list of corev1.Envvar that matches the list of options

func (*Options) DeepCopy added in v0.22.0

func (options *Options) DeepCopy() *Options

DeepCopy traveses the struct and returns a deep copy of it

func (*Options) FilterSecretOptions added in v0.22.0

func (options *Options) FilterSecretOptions() Options

FilterSecretOptions returns a list of options that will generate a Secret resource

func (*Options) GenerateExternalSecrets added in v0.22.0

func (opts *Options) GenerateExternalSecrets(namespace string, labels map[string]string, secretStoreName, secretStoreKind string, refreshInterval metav1.Duration) []resource.TemplateInterface

GenerateExternalSecrets generates the external secret templates required to match the list of options

func (*Options) GenerateRolloutTriggers added in v0.22.0

func (options *Options) GenerateRolloutTriggers(additionalSecrets ...string) []resource.TemplateMutationFunction

func (*Options) ListSecretResourceNames added in v0.22.0

func (options *Options) ListSecretResourceNames() []string

func (*Options) Unpack added in v0.22.0

func (options *Options) Unpack(o any, params ...string) *Option

Unpack retrieves the value specified from the API and adds a matching option to the list of options. It handles both values and pointers seamlessly. Considers a nil value as an unset option. It always unpacks into an string representation of the value so it can be stored as an environment variable. A parameter indicating the format (as in a call to fmt.Sprintf()) can be optionally passed.

func (*Options) WithExtraEnv added in v0.22.0

func (options *Options) WithExtraEnv(extra []corev1.EnvVar) *Options

WithExtraEnv returns a copy of the Options list with the added extra envvars

Jump to

Keyboard shortcuts

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