v1

package
v0.4.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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespaceFromRequest

func NamespaceFromRequest(request *admissionv1.AdmissionRequest) (*v1.Namespace, error)

NamespaceFromRequest returns a Namespace object from the webhook request. If the operation is a Delete operation, then the old object is returned. Otherwise, the new object is returned.

func NamespaceOldAndNewFromRequest

func NamespaceOldAndNewFromRequest(request *admissionv1.AdmissionRequest) (*v1.Namespace, *v1.Namespace, error)

NamespaceOldAndNewFromRequest gets the old and new Namespace objects, respectively, from the webhook request. If the request is a Delete operation, then the new object is the zero value for Namespace. Similarly, if the request is a Create operation, then the old object is the zero value for Namespace.

func SecretFromRequest

func SecretFromRequest(request *admissionv1.AdmissionRequest) (*v1.Secret, error)

SecretFromRequest returns a Secret object from the webhook request. If the operation is a Delete operation, then the old object is returned. Otherwise, the new object is returned.

func SecretOldAndNewFromRequest

func SecretOldAndNewFromRequest(request *admissionv1.AdmissionRequest) (*v1.Secret, *v1.Secret, error)

SecretOldAndNewFromRequest gets the old and new Secret objects, respectively, from the webhook request. If the request is a Delete operation, then the new object is the zero value for Secret. Similarly, if the request is a Create operation, then the old object is the zero value for Secret.

func UnstructuredFromRequest

func UnstructuredFromRequest(request *admissionv1.AdmissionRequest) (*unstructured.Unstructured, error)

UnstructuredFromRequest returns a Unstructured object from the webhook request. If the operation is a Delete operation, then the old object is returned. Otherwise, the new object is returned.

func UnstructuredOldAndNewFromRequest

func UnstructuredOldAndNewFromRequest(request *admissionv1.AdmissionRequest) (*unstructured.Unstructured, *unstructured.Unstructured, error)

UnstructuredOldAndNewFromRequest gets the old and new Unstructured objects, respectively, from the webhook request. If the request is a Delete operation, then the new object is the zero value for Unstructured. Similarly, if the request is a Create operation, then the old object is the zero value for Unstructured.

Types

This section is empty.

Jump to

Keyboard shortcuts

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