Documentation ¶
Overview ¶
Package providerconfigmap implements a controller that is used to reconcile the `ContentSource` changes in the provider ConfigMap. The `ContentSource` key in the provider ConfigMap represents the TKG content library associated with VM operator. This controller detects any create/update ops to the TKG CL associations and creates the necessary Custom Resources so VM operator can discover VM images from the configured content library.
Index ¶
- Constants
- func AddToManager(ctx *context.ControllerManagerContext, mgr manager.Manager) error
- type ConfigMapReconciler
- func (r *ConfigMapReconciler) CreateContentSourceBindings(ctx goctx.Context, clUUID string) error
- func (r *ConfigMapReconciler) CreateOrUpdateContentSourceResources(ctx goctx.Context, clUUID string) error
- func (r *ConfigMapReconciler) Reconcile(ctx goctx.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ConfigMapReconciler) ReconcileNormal(ctx goctx.Context, cm *corev1.ConfigMap) error
Constants ¶
const ( TKGContentSourceLabelKey = "ContentSourceType" TKGContentSourceLabelValue = "TKGContentSource" UserWorkloadNamespaceLabel = "vSphereClusterID" )
This label is used to differentiate a TKG ContentSource from a VM service ContentSource.
Variables ¶
This section is empty.
Functions ¶
func AddToManager ¶
func AddToManager(ctx *context.ControllerManagerContext, mgr manager.Manager) error
AddToManager adds the ConfigMap controller to the manager.
Types ¶
type ConfigMapReconciler ¶
type ConfigMapReconciler struct { client.Client Logger logr.Logger // contains filtered or unexported fields }
func NewReconciler ¶
func NewReconciler( client client.Client, logger logr.Logger, vmProvider vmprovider.VirtualMachineProviderInterface) *ConfigMapReconciler
func (*ConfigMapReconciler) CreateContentSourceBindings ¶
func (r *ConfigMapReconciler) CreateContentSourceBindings(ctx goctx.Context, clUUID string) error
CreateContentSourceBindings creates ContentSourceBindings in all the user workload namespaces for the configured TKG ContentSource.
func (*ConfigMapReconciler) CreateOrUpdateContentSourceResources ¶
func (r *ConfigMapReconciler) CreateOrUpdateContentSourceResources(ctx goctx.Context, clUUID string) error