webhook

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookCaller

type WebhookCaller interface {
	CallWebhook(ctx context.Context, pod *corev1.Pod, revision string, preferDefaultTagWebhook bool) (*corev1.Pod, error)
}

WebhookCaller calls the Istio injection webhook to get the expected mutated pod.

type WebhookClient

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

WebhookClient calls the Istio sidecar injection webhook to get the expected mutated pod.

func NewWebhookClient

func NewWebhookClient(k8sClient client.Client) *WebhookClient

NewWebhookClient creates a WebhookClient. caBundle is read from MutatingWebhookConfiguration.

func (*WebhookClient) CallWebhook

func (w *WebhookClient) CallWebhook(ctx context.Context, pod *corev1.Pod, revision string, preferDefaultTagWebhook bool) (*corev1.Pod, error)

CallWebhook sends the pod to the Istio injection webhook and returns the mutated pod. The pod should be built from the workload's pod template (Deployment/StatefulSet/DaemonSet). When preferDefaultTagWebhook is true, uses istio-revision-tag-default if it exists; otherwise uses istiod.svc.

Jump to

Keyboard shortcuts

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