Documentation ¶
Index ¶
- func NamespaceFromRequest(request *admissionv1.AdmissionRequest) (*v1.Namespace, error)
- func NamespaceOldAndNewFromRequest(request *admissionv1.AdmissionRequest) (*v1.Namespace, *v1.Namespace, error)
- func SecretFromRequest(request *admissionv1.AdmissionRequest) (*v1.Secret, error)
- func SecretOldAndNewFromRequest(request *admissionv1.AdmissionRequest) (*v1.Secret, *v1.Secret, error)
- func UnstructuredFromRequest(request *admissionv1.AdmissionRequest) (*unstructured.Unstructured, error)
- func UnstructuredOldAndNewFromRequest(request *admissionv1.AdmissionRequest) (*unstructured.Unstructured, *unstructured.Unstructured, error)
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.