pod

package
v0.0.0-...-a158ba3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WebhookName string = "pod-validation"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PodWebhook

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

func NewWebhook

func NewWebhook() *PodWebhook

NewWebhook creates a new webhook

func (*PodWebhook) Authorized

func (s *PodWebhook) Authorized(request admissionctl.Request) admissionctl.Response

Authorized implements Webhook interface

func (*PodWebhook) Doc

func (s *PodWebhook) Doc() string

func (*PodWebhook) FailurePolicy

func (s *PodWebhook) FailurePolicy() admissionregv1.FailurePolicyType

FailurePolicy implements Webhook interface and defines how unrecognized errors and timeout errors from the admission webhook are handled. Allowed values are Ignore or Fail. Ignore means that an error calling the webhook is ignored and the API request is allowed to continue. It's important to leave the FailurePolicy set to Ignore because otherwise the pod will fail to be created as the API request will be rejected.

func (*PodWebhook) GetURI

func (s *PodWebhook) GetURI() string

GetURI implements Webhook interface

func (*PodWebhook) HypershiftEnabled

func (s *PodWebhook) HypershiftEnabled() bool

func (*PodWebhook) MatchPolicy

func (s *PodWebhook) MatchPolicy() admissionregv1.MatchPolicyType

MatchPolicy implements Webhook interface

func (*PodWebhook) Name

func (s *PodWebhook) Name() string

Name implements Webhook interface

func (*PodWebhook) ObjectSelector

func (s *PodWebhook) ObjectSelector() *metav1.LabelSelector

ObjectSelector implements Webhook interface

func (*PodWebhook) Rules

Rules implements Webhook interface

func (*PodWebhook) SideEffects

func (s *PodWebhook) SideEffects() admissionregv1.SideEffectClass

SideEffects implements Webhook interface

func (*PodWebhook) SyncSetLabelSelector

func (s *PodWebhook) SyncSetLabelSelector() metav1.LabelSelector

SyncSetLabelSelector returns the label selector to use in the SyncSet.

func (*PodWebhook) TimeoutSeconds

func (s *PodWebhook) TimeoutSeconds() int32

TimeoutSeconds implements Webhook interface

func (*PodWebhook) Validate

func (s *PodWebhook) Validate(req admissionctl.Request) bool

Validate implements Webhook interface

Jump to

Keyboard shortcuts

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