webhook

package
v0.0.0-...-a69a52a Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RuntimeImage      string `yaml:"runtimeImage"`
	HostPath          string `yaml:"hostPath"`
	DataPathPrefix    string `yaml:"dataPathPrefix"`
	EnableAffinity    bool   `yaml:"enableAffinity"`
	RuntimeServerPort uint   `yaml:"runtimeServerPort"`
}

Config defines fields for webhook.

func LoadConfig

func LoadConfig(file string) (*Config, error)

LoadConfig returns config from the file.

type PodInjector

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

PodInjector defines fields for the sidecar container injected to the pod.

func NewPodInjector

func NewPodInjector(config *Config, client client.Client) *PodInjector

NewPodInjector returns PodInjector object by the config and client.

func (*PodInjector) Handle

Handle handles an pod creation request, and mutates the pod spec if the dataset is exist.

func (*PodInjector) InjectDecoder

func (p *PodInjector) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

Jump to

Keyboard shortcuts

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