ovnwebhook

package
v0.0.0-...-bdf4f4e Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeAdmission

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

func NewNodeAdmissionWebhook

func NewNodeAdmissionWebhook(enableInterconnect, enableHybridOverlay bool, extraAllowedUsers ...string) *NodeAdmission

func (NodeAdmission) ValidateCreate

func (p NodeAdmission) ValidateCreate(_ context.Context, _ runtime.Object) (warnings admission.Warnings, err error)

func (NodeAdmission) ValidateDelete

func (p NodeAdmission) ValidateDelete(_ context.Context, _ runtime.Object) (warnings admission.Warnings, err error)

func (NodeAdmission) ValidateUpdate

func (p NodeAdmission) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)

type PodAdmission

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

func NewPodAdmissionWebhook

func NewPodAdmissionWebhook(nodeLister listers.NodeLister, podAdmissions []PodAdmissionConditionOption, extraAllowedUsers ...string) *PodAdmission

func (PodAdmission) ValidateCreate

func (p PodAdmission) ValidateCreate(ctx context.Context, obj runtime.Object) (warnings admission.Warnings, err error)

func (PodAdmission) ValidateDelete

func (p PodAdmission) ValidateDelete(_ context.Context, _ runtime.Object) (warnings admission.Warnings, err error)

func (PodAdmission) ValidateUpdate

func (p PodAdmission) ValidateUpdate(ctx context.Context, oldObj, newObj runtime.Object) (warnings admission.Warnings, err error)

type PodAdmissionConditionOption

type PodAdmissionConditionOption struct {
	// CommonNamePrefix specifies common name in Usename
	CommonNamePrefix string `json:"commonNamePrefix"`
	// AllowedPodAnnotations contains annotation list to check Pod's annotation for webhook
	// this is used for Defaut=false because ovn-node case requires more detailed pod annotation
	// check
	AllowedPodAnnotations []string `json:"allowedPodAnnotations"`
	// AllowedPodAnnotationKeys contains AllowedPodAnnotations value as sets.Set[]
	AllowedPodAnnotationKeys sets.Set[string]
}

PodAdmissionConditionOptions specifies additional validate admission for pod.

func InitPodAdmissionConditionOptions

func InitPodAdmissionConditionOptions(fileName string) (podAdmissions []PodAdmissionConditionOption, err error)

InitPodAdmissionConditionOptions initializes PodAdmissionConditionOption: Load json from fileName

Jump to

Keyboard shortcuts

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