webhook

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AddToManagerFuncs []func(manager.Manager, *pool_manager.PoolManager, *metav1.LabelSelector) (*admission.Webhook, error)

AddToManagerFuncs is a list of functions to add all Controllers to the Manager

Functions

func AddToManager

func AddToManager(mgr manager.Manager, poolManager *pool_manager.PoolManager, managerNamespace string) error

AddToManager adds all Controllers to the Manager +kubebuilder:rbac:groups=admissionregistration.k8s.io,resources=mutatingwebhookconfigurations;validatingwebhookconfigurations,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;update;create;delete +kubebuilder:rbac:groups="",resources=events,verbs=get;list;create;update +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete +kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch +kubebuilder:rbac:groups="apiextensions.k8s.io",resources=customresourcedefinitions,verbs=get;list +kubebuilder:rbac:groups=apps,resources=deployments,verbs=get;create;update;patch;list;watch +kubebuilder:rbac:groups="kubevirt.io",resources=virtualmachines,verbs=get;list;watch;create;update;patch

func CreateOwnerRefForMutatingWebhook

func CreateOwnerRefForMutatingWebhook(kubeClient *kubernetes.Clientset, managerNamespace string) error

This function creates or update the mutating webhook to add an owner reference pointing the statefulset object of the manager. This way when we remove the controller from the cluster it will also remove this webhook to allow the creating of new pods and virtual machines objects. We choose this solution because the sigs.k8s.io/controller-runtime package doesn't allow to customize the ServerOptions object

func CreateOwnerRefForService

func CreateOwnerRefForService(kubeClient *kubernetes.Clientset, managerNamespace string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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