utils

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CaSecretWrongTypeErrorMessage = "the CA bundle secret must be of type \"kubernetes.io/ts\""

Variables

This section is empty.

Functions

func ExcludedFieldsFromJson

func ExcludedFieldsFromJson(data map[string]interface{}, path string)

Remove the specified path from the json object Path examples :

INPUT

test1.test2

OUTPUT

test1:
  test2: value

INPUT

.test3
test3: value

OUTPUT

test7
test7: value

INPUT

.test4[this.string-is:the/same*key]test5[test6]

OUTPUT

test4:
"this.string-is:the/same*key":
  test5:
    test6: value

func FindCABundle added in v0.3.3

func FindCABundle(client client.Client, namespace string, name string) ([]byte, error)

func FindGlobalCABundle added in v0.3.3

func FindGlobalCABundle(client client.Client, host string) ([]byte, error)

func GetObjectFromWebhookRequest added in v0.3.1

func GetObjectFromWebhookRequest(decoder admission.Decoder, obj runtime.Object, req admission.Request) error

func OperationToVerb added in v0.3.1

func OperationToVerb(operation admissionv1.OperationType) ([]string, error)

func TypeBasedConditionRemover

func TypeBasedConditionRemover(conditions []metav1.Condition, typeKind string) []metav1.Condition

func TypeBasedConditionUpdater

func TypeBasedConditionUpdater(conditions []metav1.Condition, condition metav1.Condition) []metav1.Condition

Types

This section is empty.

Jump to

Keyboard shortcuts

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