Documentation
¶
Index ¶
- Variables
- func Add(mgr manager.Manager) error
- func CheckMultiTenancyController(c client.Client, reqLogger logr.Logger) (*v1alpha1.Controller, error)
- func LoopSchedule(tenancyScheduler TenancyScheduler, tenancyWatcher TenancyWatcher)
- type KubeObject
- type Kubeapi
- type NamespacedChart
- type ReconcileMultiTenancyController
- type TenancyExample
- type TenancyOperator
- type TenancyScheduler
- type TenancyWatcher
Constants ¶
This section is empty.
Variables ¶
View Source
var Mutex sync.Mutex
View Source
var TenancyQueue = make(chan TenancyExample)
Functions ¶
func Add ¶
* * USER ACTION REQUIRED: This is a scaffold file intended for the user to modify with their own Controller * business logic. Delete these comments after modifying this file.*
and Start it when the Manager is Started.
func LoopSchedule ¶
func LoopSchedule(tenancyScheduler TenancyScheduler, tenancyWatcher TenancyWatcher)
FIFO work queue
Types ¶
type KubeObject ¶
type Kubeapi ¶
func (*Kubeapi) CreateUnstructured ¶
func (k *Kubeapi) CreateUnstructured() *unstructured.Unstructured
type NamespacedChart ¶
type ReconcileMultiTenancyController ¶
type ReconcileMultiTenancyController struct {
// TODO: Clarify the split client
// This client, initialized using mgr.Client() above, is a split client
// that reads objects from the cache and writes to the apiserver
Client client.Client
Scheme *runtime.Scheme
Config *rest.Config
}
ReconcileMultiTenancyController reconciles a MultiTenancyController object
func (*ReconcileMultiTenancyController) Reconcile ¶
func (r *ReconcileMultiTenancyController) Reconcile(request reconcile.Request) (reconcile.Result, error)
TODO(user): Modify this Reconcile function to implement your Controller logic. This example creates Note: The Controller will requeue the Request to be processed again if the returned error is non-nil or Result.Requeue is true, otherwise upon completion it will remove the work from the queue.
type TenancyExample ¶
type TenancyExample struct {
Reconcile *ReconcileMultiTenancyController
TenancyOperator TenancyOperator
NamespacedChart NamespacedChart
NamespacedController types.NamespacedName
Namespaces []string
Settings map[string]string
StateSettings map[string]string
}
type TenancyOperator ¶
type TenancyOperator string
const ( UPDATE TenancyOperator = "update" CREATE TenancyOperator = "create" DELETE TenancyOperator = "delete" INIT TenancyOperator = "init" )
func (TenancyOperator) ToString ¶
func (t TenancyOperator) ToString() string
type TenancyScheduler ¶
type TenancyScheduler interface {
CreateSingleTenancyByConfigure(t *TenancyExample) (objs []KubeObject, err error)
UpdateSingleTenancyByConfigure(t *TenancyExample) (objs []KubeObject, err error)
DeleteSingleTenancyByConfigure(t *TenancyExample) (objs []KubeObject, err error)
}
type TenancyWatcher ¶
type TenancyWatcher interface {
InitTenancyWatcher(t *TenancyExample)
CreateTenancyPodStatusAndReplicationControllerStatus(objs []KubeObject, t *TenancyExample)
DeleteTenancyPodStatusAndReplicationControllerStatus(objs []KubeObject, t *TenancyExample)
CreateTenancyNamespacesIfNeed(t *TenancyExample)
DeleteTenancyNamespacesIfNeed(t *TenancyExample)
}
Click to show internal directories.
Click to hide internal directories.