envoverwrite

package
v1.0.80 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrigWorkloadEnvValues

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

original manifest values for the env vars of a workload This is specific to k8s as it assumes there is OriginalEnv per container

func NewOrigWorkloadEnvValues

func NewOrigWorkloadEnvValues(workloadObj client.Object) (*OrigWorkloadEnvValues, error)

func (*OrigWorkloadEnvValues) DeleteFromObj

func (o *OrigWorkloadEnvValues) DeleteFromObj(obj client.Object)

func (*OrigWorkloadEnvValues) GetContainerStoredEnvs

func (o *OrigWorkloadEnvValues) GetContainerStoredEnvs(containerName string) envOverwrite.OriginalEnv

func (*OrigWorkloadEnvValues) InsertOriginalValue

func (o *OrigWorkloadEnvValues) InsertOriginalValue(containerName string, envName string, val *string)

func (*OrigWorkloadEnvValues) RemoveOriginalValue

func (o *OrigWorkloadEnvValues) RemoveOriginalValue(containerName string, envName string) (*string, bool)

this function is called when reverting a value back to it's original content. it removes the env, if exists, and returns the original value for the caller to populate back into the manifest.

func (*OrigWorkloadEnvValues) SerializeToAnnotation

func (o *OrigWorkloadEnvValues) SerializeToAnnotation(obj client.Object) error

stores the original values back into the manifest annotations by modifying the annotations map of the input argument

Jump to

Keyboard shortcuts

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