webhook

package
v1.17.3 Latest Latest
Warning

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

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

Documentation

Overview

Package webhook contains the implementation of the validating admission webhook.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValidator

func AddValidator(mgr manager.Manager) error

AddValidator adds the admission webhook validator to the passed manager.

func ConfigSyncMetadata

func ConfigSyncMetadata(set *fieldpath.Set) *fieldpath.Set

ConfigSyncMetadata returns all of the metadata fields in the given fieldpath Set which are ConfigSync labels or annotations.

func CreateCertsIfNeeded

func CreateCertsIfNeeded(mgr manager.Manager, restartOnSecretRefresh bool) (chan struct{}, error)

CreateCertsIfNeeded creates all certs for webhooks. This function is called from main.go

func DeclaredFields

func DeclaredFields(obj client.Object) (*fieldpath.Set, error)

DeclaredFields returns the declared fields for the given Object.

Types

type ObjectDiffer

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

ObjectDiffer can compare two versions of an Object and report on any declared fields which were modified between the two.

func (*ObjectDiffer) FieldDiff

func (d *ObjectDiffer) FieldDiff(oldObj, newObj client.Object) (*fieldpath.Set, error)

FieldDiff returns a Set of the Object fields which are being modified in the given Request that are also marked as fields declared in Git.

func (*ObjectDiffer) FieldSet

func (d *ObjectDiffer) FieldSet(obj client.Object) (*fieldpath.Set, error)

FieldSet returns a Set of the fields in the given Object.

type Validator

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

Validator is the part of the validating webhook which handles admission requests and admits or denies them.

func (*Validator) Handle

Handle implements admission.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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