utils

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(list []string, element string) bool

func JSONsubsetValue

func JSONsubsetValue(a interface{}, b interface{}) bool

JSONsubsetValue checks if JSON a is contained in JSON b

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"}

Jump to

Keyboard shortcuts

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