Documentation
¶
Overview ¶
Package webhookconfig implements the webhook register and cert manager for the admission webhook.
Package webhookconfig implements the webhook register and cert manager for the admission webhook.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCertManager ¶
func NewCertManager( clientConfig *rest.Config, certRenewer *varmortls.CertRenewer, secretInterface corev1.SecretInterface, secretInformer coreinformer.SecretInformer, stopCh <-chan struct{}, log logr.Logger) *certManager
Types ¶
type Register ¶
type Register struct {
// contains filtered or unexported fields
}
Register manages webhook registration.
func NewRegister ¶
func NewRegister( clientConfig *rest.Config, mutateInterface admissionv1.MutatingWebhookConfigurationInterface, validateInterface admissionv1.ValidatingWebhookConfigurationInterface, secretInterface corev1.SecretInterface, deploymentInterface appsv1.DeploymentInterface, leaseInterface coordinationv1.LeaseInterface, varmorInterface varmorinterface.CrdV1beta1Interface, mwcInformer adminformers.MutatingWebhookConfigurationInformer, vwcInformer adminformers.ValidatingWebhookConfigurationInformer, managerIP string, webhookTimeout int32, inContainer bool, stopCh <-chan struct{}, log logr.Logger) *Register
NewRegister creates new Register instance
func (*Register) Register ¶
Register clean up the old webhooks and re-creates admission webhooks configs on cluster
func (*Register) Remove ¶
func (wrc *Register) Remove()
Remove removes the webhook configuration, secrets and leases
func (*Register) ShouldRemoveVarmorResources ¶
ShouldRemoveVarmorResources determines whether vArmor webhook resources should be cleaned up. This function checks the current state of the vArmor manager deployment to decide if cleanup is needed.
Returns:
- true: Cleanup should be performed in the following scenarios: 1. Running outside of container environment (development/debug mode) 2. vArmor manager deployment not found in the cluster 3. vArmor manager deployment is being terminated 4. vArmor manager deployment is scaled to zero replicas
- false: Cleanup should not be performed, typically when the manager is updating or running normally
Click to show internal directories.
Click to hide internal directories.