modulepackage
0.9.93
Repository: https://github.com/devops-simba/webhook_core.git
Documentation: pkg.go.dev
# README
webhook_core
Core part of the webhook library
# Functions
CompleteBinding complete binding after calling `flag.Parse()`.
Contains check whether a collection contains a value or not.
ContainsIgnoreCase check whether a collection contains a value or not ignoring the case of the values.
CreateErrorResponse create an admission error response.
CreatePatchResponse create a patch response for an admission review request.
CreateServerFromFlags create a server from application flags.
CreateServerFromFlagsAndRunToTermination create a server from application flags and run it until receive the termination signal.
FindFirst find specified value in a list of strings return index of found item or -1 if value is not in the collection.
FindIgnoreCase find specified value in a list of string ignoring case of the strings.
GetClientset get Clientset object from global context.
GetNamespace get information about namespace.
GetPod get information about a POD.
GetRegisteredWebhooks get list of all registered webhooks.
GetRESTConfig get REST configuration that created from loading kubeconfig.
GetWebhookAction extract web action from the path.
InitializeGlobalContext initialize global context.
InitializeRuntimeScheme initialize a runtime scheme this is useful for adding schemes from different APIs(like openshift).
No description provided by the author
IsObjectInNamespaces check if an object is in specified set of namespaces.
KeyValue create a map[string]string with a single entry.
NewAddPatch create a new `PatchOperation` for 'add' operation.
NewReplacePatch create a new `PatchOperation` for 'replace' operation.
ReadAdmissionReview read an AdmissionReview from a request.
RegisterWebhook register a new webhook.
ToString return a string representation of a loaded webhook.
TryInitializeApplicationFlags try to initialize flags of specified instance of object.
UpdateAnnotations create a set of packes to update annotations of an object.
UpdateLabels create a set of packes to update labels of an object.
WriteAdmissionResponse write an AdmissionResponse as a HTTP response.
# Constants
LabelComponent component label.
LabelInstance instance label.
LabelManagedBy managed-by label.
LabelName name label.
LabelPartOf part-of label.
LabelVersion version label.
# Variables
IgnoredNamespaces list of namespaces that should ignored by admission review process.
Scheme Default runtime scheme.
# Structs
AppFlagInitializationResponse a helper type.
PatchOperation a patch operation.
WebhookServer actual server that listen for incoming requests and generate a response for them by calling `Webhook` instances.
# Interfaces
NeedApplicationFlags this interface represent an object that need binding to application flags.
Webhook This interface represent a webhook.