webhook

package
v0.0.0-...-18523a5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OpAdd     = "add"
	OpRemove  = "remove"
	OpReplace = "replace"
)

operators

View Source
var (
	PathAnnotations = "/metadata/annotations" //map, 单个key的话,值是string
	PathLabels      = "/metadata/labels"      //map, 单key, 值是string
	PathContainers  = "/spec/containers"      // slice
)

Op Path

View Source
var (
	INJECTEDKEY   = "yulibaozi/injected"   // INJECTEDKEY 标识已经被注入过
	NOINJECTEDKEY = "yulibaozi/noinjected" // NOINJECTEDKEY 标识为不需要注入

)

是否需要注入标识

Functions

func GetContainerInMyConfigMap

func GetContainerInMyConfigMap(name, namespace string) ([]corev1.Container, error)

GetContainerInMyConfigMap 从crd的 myconfigMap中获取 容器

func ServerPodInjection

func ServerPodInjection(w http.ResponseWriter, r *http.Request)

ServerPodInjection server

Types

type MyConf

type MyConf struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Data              map[string]string `json:"data,omitempty" protobuf:"bytes,2,rep,name=data"`
}

MyConf crd 自定义的config

Jump to

Keyboard shortcuts

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