Documentation ¶
Index ¶
- Constants
- Variables
- func AddToManager(mgr manager.Manager, poolManager *pool_manager.PoolManager) error
- func CreateOwnerRefForMutatingWebhook(kubeClient *kubernetes.Clientset, managerNamespace string) error
- func CreateOwnerRefForService(kubeClient *kubernetes.Clientset, managerNamespace string) error
Constants ¶
const (
WebhookServerPort = 8000
)
Variables ¶
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 ¶
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.