Documentation
¶
Index ¶
- func Btoi(b bool) int
- func Contains(list []string, element string) bool
- func JSONsubsetValue(a interface{}, b interface{}) bool
- func JoinPatches(patches [][]byte) []byte
- func NewKubeClient(config *rest.Config) (kubernetes.Interface, error)
- func NewKubeInformerFactory(cfg *rest.Config) kubeinformers.SharedInformerFactory
- func SkipFilteredResources(kind, namespace, name string, filterK8Resources []K8Resource) bool
- func SkipFilteredResourcesReq(request *v1beta1.AdmissionRequest, filterK8Resources []K8Resource) bool
- type K8Resource
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONsubsetValue ¶
func JSONsubsetValue(a interface{}, b interface{}) bool
JSONsubsetValue checks if JSON a is contained in JSON b
func JoinPatches ¶ added in v0.8.0
JoinPatches joins array of serialized JSON patches to the single JSONPatch array
func NewKubeClient ¶ added in v0.8.0
func NewKubeClient(config *rest.Config) (kubernetes.Interface, error)
NewKubeClient returns a new kubernetes client
func NewKubeInformerFactory ¶
func NewKubeInformerFactory(cfg *rest.Config) kubeinformers.SharedInformerFactory
NewKubeInformerFactory returns a kubeinformer
func SkipFilteredResources ¶ added in v0.7.0
func SkipFilteredResources(kind, namespace, name string, filterK8Resources []K8Resource) bool
SkipFilteredResources checks if the resource is to be skipped based on filtered kinds
func SkipFilteredResourcesReq ¶ added in v0.7.0
func SkipFilteredResourcesReq(request *v1beta1.AdmissionRequest, filterK8Resources []K8Resource) bool
SkipFilteredResourcesReq checks if request is to be skipped based on filtered kinds
Types ¶
type K8Resource ¶ added in v0.7.0
type K8Resource struct { Kind string //TODO: as we currently only support one GVK version, we use the kind only. But if we support multiple GVK, then GV need to be added Namespace string Name string }
func ParseKinds ¶ added in v0.7.0
func ParseKinds(list string) []K8Resource
ParseKinds parses the kinds if a single string contains comma seperated kinds {"1,2,3","4","5"} => {"1","2","3","4","5"}
Click to show internal directories.
Click to hide internal directories.