webhooks

package
v0.0.0-...-c0b94f1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SmeConverterServicePath = "/convert-sme"
)

Functions

func Add

func Add(mgr manager.Manager) error

Add webhook handlers

Types

type WebhookCleanupRunnable

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

func NewCleanupRunnable

func NewCleanupRunnable(cl client.Client) *WebhookCleanupRunnable

Returns a Runnable that will remove the resources that previous versions of the operator created for webhooks, so that they don't conflict with the new resources that are deployed by OLM.

func (*WebhookCleanupRunnable) Done

func (r *WebhookCleanupRunnable) Done() bool

func (*WebhookCleanupRunnable) NeedLeaderElection

func (r *WebhookCleanupRunnable) NeedLeaderElection() bool

NeedLeaderElection returns false because it needs to run before the operator becomes the leader, since the operator also starts serving webhooks before it becomes the leader. If the webhooks are cleaned up as soon as the operator starts, then the webhook server will log TLS certificate errors because the old certificate is still being used. With NeedLeaderElection being false, if multiple instances of the operator start at the same time, they will all try to delete these resources, but this shouldn't be an issue because the code that deletes them handles conflicts.

func (*WebhookCleanupRunnable) Start

func (r *WebhookCleanupRunnable) Start(_ <-chan struct{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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