mutate

package
v0.0.0-...-496b4c9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UniversalDeserializer = serializer.NewCodecFactory(runtime.NewScheme()).UniversalDeserializer()
)

Functions

func IsKubeNamespace

func IsKubeNamespace(ns string) bool

IsKubeNamespace checks if the given namespace is a Kubernetes-owned namespace.

Types

type ImageRegistry

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

ImageRegistry object

func NewRegistry

func NewRegistry(config *service.PiggyConfig) *ImageRegistry

NewRegistry creates and initializes registry

func (*ImageRegistry) GetImageConfig

func (r *ImageRegistry) GetImageConfig(ctx context.Context, config *service.PiggyConfig, namespace string, container corev1.Container, podSpec corev1.PodSpec) (*v1.Config, error)

GetImageConfig returns entrypoint and command of container

type Mutating

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

Mutating a mutating object

func NewMutating

func NewMutating(ctx context.Context, k8sClient kubernetes.Interface) (*Mutating, error)

NewMutating create mutating object

func (*Mutating) ApplyPiggy

func (m *Mutating) ApplyPiggy(req *admissionv1.AdmissionRequest) (interface{}, error)

ApplyPiggy handle adminssion request and apply piggy to pod

func (*Mutating) LookForEnvFrom

func (mw *Mutating) LookForEnvFrom(envFrom []corev1.EnvFromSource, ns string) ([]corev1.EnvVar, error)

LookForEnvFrom look up value from envFrom

func (*Mutating) LookForValueFrom

func (m *Mutating) LookForValueFrom(env corev1.EnvVar, ns string) (*corev1.EnvVar, error)

LookForValueFrom look up value from valueFrom

func (*Mutating) MutatePod

func (m *Mutating) MutatePod(config *service.PiggyConfig, pod *corev1.Pod) (interface{}, error)

MutatePod mutate pod

type Signature

type Signature map[string]string

Jump to

Keyboard shortcuts

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