patcher

package
v1.11.4-rc.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

View Source
const (
	PatchPathContainers = "/spec/containers"
	PatchPathVolumes    = "/spec/volumes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PatchOperation

type PatchOperation struct {
	Op    string      `json:"op"`
	Path  string      `json:"path"`
	Value interface{} `json:"value,omitempty"`
}

PatchOperation represents a discreet change to be applied to a Kubernetes resource.

func GetEnvPatchOperations

func GetEnvPatchOperations(envs []corev1.EnvVar, addEnv []corev1.EnvVar, containerIdx int) []PatchOperation

GetEnvPatchOperations adds new environment variables only if they do not exist. It does not override existing values for those variables if they have been defined already.

func GetVolumeMountPatchOperations

func GetVolumeMountPatchOperations(volumeMounts []corev1.VolumeMount, addMounts []corev1.VolumeMount, containerIdx int) []PatchOperation

GetVolumeMountPatchOperations gets the patch operations for volume mounts

Jump to

Keyboard shortcuts

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