config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2020 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

View Source
const (
	// These constants MUST be equal to the corresponding names in service definition in definitions/install.yaml
	KubePolicyNamespace = "kyverno"
	WebhookServiceName  = "kyverno-svc"

	MutatingWebhookConfigurationName      = "kyverno-resource-mutating-webhook-cfg"
	MutatingWebhookConfigurationDebugName = "kyverno-resource-mutating-webhook-cfg-debug"
	MutatingWebhookName                   = "nirmata.kyverno.resource.mutating-webhook"

	VerifyMutatingWebhookConfigurationName      = "kyverno-verify-mutating-webhook-cfg"
	VerifyMutatingWebhookConfigurationDebugName = "kyverno-verify-mutating-webhook-cfg-debug"
	VerifyMutatingWebhookName                   = "nirmata.kyverno.verify-mutating-webhook"

	PolicyValidatingWebhookConfigurationName      = "kyverno-policy-validating-webhook-cfg"
	PolicyValidatingWebhookConfigurationDebugName = "kyverno-policy-validating-webhook-cfg-debug"
	PolicyValidatingWebhookName                   = "nirmata.kyverno.policy-validating-webhook"

	PolicyMutatingWebhookConfigurationName      = "kyverno-policy-mutating-webhook-cfg"
	PolicyMutatingWebhookConfigurationDebugName = "kyverno-policy-mutating-webhook-cfg-debug"
	PolicyMutatingWebhookName                   = "nirmata.kyverno.policy-mutating-webhook"

	// Due to kubernetes issue, we must use next literal constants instead of deployment TypeMeta fields
	// Issue: https://github.com/kubernetes/kubernetes/pull/63972
	// When the issue is closed, we should use TypeMeta struct instead of this constants
	DeploymentKind           = "Deployment"
	DeploymentAPIVersion     = "extensions/v1beta1"
	KubePolicyDeploymentName = "kyverno"
)

Variables

View Source
var (
	MutatingWebhookServicePath         = "/mutate"
	ValidatingWebhookServicePath       = "/validate"
	PolicyValidatingWebhookServicePath = "/policyvalidate"
	PolicyMutatingWebhookServicePath   = "/policymutate"
	VerifyMutatingWebhookServicePath   = "/verifymutate"

	SupportedKinds = []string{
		"ConfigMap",
		"CronJob",
		"DaemonSet",
		"Deployment",
		"Endpoints",
		"HorizontalPodAutoscaler",
		"Ingress",
		"Job",
		"LimitRange",
		"Namespace",
		"NetworkPolicy",
		"PersistentVolumeClaim",
		"PodDisruptionBudget",
		"PodTemplate",
		"ResourceQuota",
		"Secret",
		"Service",
		"StatefulSet",
	}
)

Functions

func CreateClientConfig added in v1.1.0

func CreateClientConfig(kubeconfig string) (*rest.Config, error)

CreateClientConfig creates client config

func LogDefaultFlags

func LogDefaultFlags()

LogDefaults sets default glog flags

Types

type ConfigData added in v0.11.0

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

func NewConfigData added in v0.11.0

func NewConfigData(rclient kubernetes.Interface, cmInformer informers.ConfigMapInformer, filterK8Resources string) *ConfigData

NewConfigData ...

func (*ConfigData) Run added in v0.11.0

func (cd *ConfigData) Run(stopCh <-chan struct{})

Run checks syncing

func (*ConfigData) ToFilter added in v0.11.0

func (cd *ConfigData) ToFilter(kind, namespace, name string) bool

ToFilter checks if the given resource is set to be filtered in the configuration

type Interface added in v0.11.0

type Interface interface {
	ToFilter(kind, namespace, name string) bool
}

Interface to be used by consumer to check filters

Jump to

Keyboard shortcuts

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