cainjector

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MutatingWebhookConfigurationName   = "mutatingwebhookconfiguration"
	ValidatingWebhookConfigurationName = "validatingwebhookconfiguration"
	APIServiceName                     = "apiservice"
	CustomResourceDefinitionName       = "customresourcedefinition"
)

Variables

View Source
var (
	MutatingWebhookSetup = setup{
							// contains filtered or unexported fields
	}

	ValidatingWebhookSetup = setup{
							// contains filtered or unexported fields
	}

	APIServiceSetup = setup{
					// contains filtered or unexported fields
	}

	CRDSetup = setup{
				// contains filtered or unexported fields
	}
)

Functions

func RegisterAllInjectors added in v1.12.0

func RegisterAllInjectors(ctx context.Context, mgr ctrl.Manager, opts SetupOptions) error

RegisterAllInjectors sets up watches for all injectable and injector types that cainjector should watch

Types

type InjectTarget

type InjectTarget interface {
	// AsObject returns this injectable as an object.
	// It should be a pointer suitable for mutation.
	AsObject() client.Object

	// AsApplyObject returns this injectable as an object that only contains
	// fields which are managed by the cainjector (CA Data) and immutable fields
	// that must be present in Apply calls; intended for use for Apply Patch
	// calls.
	AsApplyObject() (client.Object, client.Patch)

	// SetCA sets the CA of this target to the given certificate data (in the standard
	// PEM format used across Kubernetes).  In cases where multiple CA fields exist per
	// target (like admission webhook configs), all CAs are set to the given value.
	SetCA(data []byte)
}

InjectTarget knows how to set CA data to a particular instance of injectable, for example an instance of ValidatingWebhookConfiguration.

type NewInjectableTarget added in v1.12.0

type NewInjectableTarget func() InjectTarget

NewInjectableTarget knows how to create InjectTarget for a particular type of injectable.

type SetupOptions added in v1.12.0

type SetupOptions struct {
	Namespace                    string
	EnableCertificatesDataSource bool
	EnabledReconcilersFor        map[string]bool
}

Jump to

Keyboard shortcuts

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