mutation

package
v0.0.0-...-d7e65e3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LMAPMClusterName       = "LM_APM_CLUSTER_NAME"
	LMAPMNodeName          = "LM_APM_NODE_NAME"
	LMAPMPodName           = "LM_APM_POD_NAME"
	LMAPMPodNamespace      = "LM_APM_POD_NAMESPACE"
	LMAPMPodIP             = "LM_APM_POD_IP"
	LMAPMPodUID            = "LM_APM_POD_UID"
	ClusterName            = "CLUSTER_NAME"
	ServiceNamespace       = "SERVICE_NAMESPACE"
	ServiceName            = "SERVICE_NAME"
	OTELResourceAttributes = "OTEL_RESOURCE_ATTRIBUTES"

	WorkloadResourceDeployment  = "Deployment"
	WorkloadResourceStatefulSet = "StatefulSet"
	WorkloadResourceDaemonSet   = "DaemonSet"
	WorkloadResourceReplicaSet  = "ReplicaSet"
	WorkloadResourceJob         = "Job"
	WorkloadResourceCronJob     = "CronJob"

	MutationEnvVarInjection = "envVarInjection"
)

Variables

View Source
var Mutations = []Mutation{{Name: MutationEnvVarInjection, Do: mutateEnvVariables}}

Mutations represents allowed mutations

Functions

func RunMutations

func RunMutations(ctx context.Context, params *Params) error

RunMutations invokes the allowed mutations defined by Mutations

Types

type Mutation

type Mutation struct {
	Name string
	Do   func(context.Context, *Params) error
}

Mutation represents the mutation operation

type Params

type Params struct {
	Client    *config.K8sClient
	Log       logr.Logger
	LMConfig  config.Config
	Mutations []Mutation
	Pod       *corev1.Pod
	Namespace string
}

Params holds the helper objects to perform mutation

Jump to

Keyboard shortcuts

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