Documentation ¶
Index ¶
- Variables
- func IsKubeNamespace(ns string) bool
- type ImageRegistry
- type Mutating
- func (m *Mutating) ApplyPiggy(req *admissionv1.AdmissionRequest) (interface{}, error)
- func (mw *Mutating) LookForEnvFrom(envFrom []corev1.EnvFromSource, ns string) ([]corev1.EnvVar, error)
- func (m *Mutating) LookForValueFrom(env corev1.EnvVar, ns string) (*corev1.EnvVar, error)
- func (m *Mutating) MutatePod(config *service.PiggyConfig, pod *corev1.Pod) (interface{}, error)
- type Signature
Constants ¶
This section is empty.
Variables ¶
View Source
var (
UniversalDeserializer = serializer.NewCodecFactory(runtime.NewScheme()).UniversalDeserializer()
)
Functions ¶
func IsKubeNamespace ¶
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 ¶
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 ¶
LookForValueFrom look up value from valueFrom
Click to show internal directories.
Click to hide internal directories.