Documentation
¶
Overview ¶
Package webhookconfig contains the controller for the WebhookConfig resource.
Index ¶
Constants ¶
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 ¶
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.