webhookconfig

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package webhookconfig contains the controller for the WebhookConfig resource.

Index

Constants

View Source
const (
	// ReasonUpdateFailed is used when we fail to update the webhook config.
	ReasonUpdateFailed = "UpdateFailed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts added in v0.12.0

type Opts struct {
	SvcName         string
	SvcNamespace    string
	SecretName      string
	SecretNamespace string
	RequeueInterval time.Duration
}

Opts are the options for the webhookconfig controller Reconciler.

type Reconciler

type Reconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme

	RequeueDuration time.Duration
	SvcName         string
	SvcNamespace    string
	SecretName      string
	SecretNamespace string
	// contains filtered or unexported fields
}

Reconciler reconciles a ValidatingWebhookConfiguration object and updates it with the CA bundle from the given secret.

func New

func New(k8sClient client.Client, scheme *runtime.Scheme, leaderChan <-chan struct{}, log logr.Logger, opts Opts) *Reconciler

New returns a new Reconciler. The controller will watch ValidatingWebhookConfiguration resources and update them with the CA bundle from the given secret.

func (*Reconciler) ReadyCheck

func (r *Reconciler) ReadyCheck(_ *http.Request) error

ReadyCheck does a readiness check for the webhook using the endpoint slices.

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. In this case, we reconcile ValidatingWebhookConfiguration resources that are labeled with the well-known label key and value.

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager, opts controller.Options) error

SetupWithManager sets up the controller with the Manager. Also initializes the event recorder.

Jump to

Keyboard shortcuts

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