webhook

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	WebhookServerPort = 8000
)

Variables

View Source
var AddToWebhookFuncs []func(*webhookserver.Server, *pool_manager.PoolManager) error

AddToManagerFuncs is a list of functions to add 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

Functions

func AddToManager

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

AddToManager adds all Controllers to the Manager

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 added in v0.8.0

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