initializer

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 630

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	extClientset kubernetes.Interface,
	dynamicClient dynamic.Interface,
	extInformers informers.SharedInformerFactory,
	authz authorizer.Authorizer,
	featureGates featuregate.FeatureGate,
	stopCh <-chan struct{},
) pluginInitializer

New creates an instance of admission plugins initializer. This constructor is public with a long param list so that callers immediately know that new information can be expected during compilation when they update a level.

Types

type WantsAuthorizer

type WantsAuthorizer interface {
	SetAuthorizer(authorizer.Authorizer)
	admission.InitializationValidator
}

WantsAuthorizer defines a function which sets Authorizer for admission plugins that need it.

type WantsDrainedNotification added in v0.25.0

type WantsDrainedNotification interface {
	SetDrainedNotification(<-chan struct{})
	admission.InitializationValidator
}

WantsDrainedNotification defines a function which sets the notification of where the apiserver has already been drained for admission plugins that need it. After receiving that notification, Admit/Validate calls won't be called anymore.

type WantsDynamicClient added in v0.26.0

type WantsDynamicClient interface {
	SetDynamicClient(dynamic.Interface)
	admission.InitializationValidator
}

type WantsExternalKubeClientSet

type WantsExternalKubeClientSet interface {
	SetExternalKubeClientSet(kubernetes.Interface)
	admission.InitializationValidator
}

WantsExternalKubeClientSet defines a function which sets external ClientSet for admission plugins that need it

type WantsExternalKubeInformerFactory

type WantsExternalKubeInformerFactory interface {
	SetExternalKubeInformerFactory(informers.SharedInformerFactory)
	admission.InitializationValidator
}

WantsExternalKubeInformerFactory defines a function which sets InformerFactory for admission plugins that need it

type WantsFeatures added in v0.17.0

type WantsFeatures interface {
	InspectFeatureGates(featuregate.FeatureGate)
	admission.InitializationValidator
}

WantsFeatureGate defines a function which passes the featureGates for inspection by an admission plugin. Admission plugins should not hold a reference to the featureGates. Instead, they should query a particular one and assign it to a simple bool in the admission plugin struct.

func (a *admissionPlugin) InspectFeatureGates(features featuregate.FeatureGate){
    a.myFeatureIsOn = features.Enabled("my-feature")
}

type WantsQuotaConfiguration added in v0.20.0

type WantsQuotaConfiguration interface {
	SetQuotaConfiguration(quota.Configuration)
	admission.InitializationValidator
}

WantsQuotaConfiguration defines a function which sets quota configuration for admission plugins that need it.

type WantsRESTMapper added in v0.26.0

type WantsRESTMapper interface {
	SetRESTMapper(meta.RESTMapper)
	admission.InitializationValidator
}

WantsRESTMapper defines a function which sets RESTMapper for admission plugins that need it.

type WantsSchemaResolver added in v0.27.0

type WantsSchemaResolver interface {
	SetSchemaResolver(resolver resolver.SchemaResolver)
	admission.InitializationValidator
}

WantsSchemaResolver defines a function which sets the SchemaResolver for an admission plugin that needs it.

Jump to

Keyboard shortcuts

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