tenant

package
v0.0.0-...-321caff Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0, MIT Imports: 27 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ControllerName = "tenant-controller"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupsState

type GroupsState struct {
	TenantGroups *v1alpha1.GroupList
}

func NewGroupsState

func NewGroupsState() *GroupsState

func (*GroupsState) IsEmpty

func (i *GroupsState) IsEmpty() bool

Returns true if no more groups exist in this tenant, which includes returning true if all remaining groups in the tenant are under deletion.

func (*GroupsState) Read

func (i *GroupsState) Read(ctx context.Context, cr *v1alpha1.Tenant, client client.Client) error

type ReconcileTenant

type ReconcileTenant struct {
	// 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
	Log          logr.Logger
	Config       *config.ControllerConfig
	Recorder     record.EventRecorder
	StatusPoller *polling.StatusPoller
}

ReconcileTenant reconciles a Grafana object

func (*ReconcileTenant) Reconcile

func (r *ReconcileTenant) Reconcile(
	ctx context.Context,
	request reconcile.Request,
) (result reconcile.Result, err error)

Reconcile reads the state of the cluster for a Tenant object and makes changes based on the state read and what's defined in its spec.

func (*ReconcileTenant) RemoveGOUI

func (r *ReconcileTenant) RemoveGOUI(ctx context.Context, request reconcile.Request) error

TODO(joe): this is temporary function to gradually cleanup all unneeded CustomeResources.

func (*ReconcileTenant) SetupWithManager

func (r *ReconcileTenant) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type TenantReconciler

type TenantReconciler struct {
	ConfigHash string
	Teardown   bool
	Log        logr.Logger
}

func NewTenantReconciler

func NewTenantReconciler(teardown bool, logger logr.Logger) *TenantReconciler

func (*TenantReconciler) Reconcile

type TenantState

type TenantState struct {
	Groups *GroupsState
}

func NewTenantState

func NewTenantState() TenantState

func (*TenantState) Read

func (i *TenantState) Read(ctx context.Context, cr *v1alpha1.Tenant, client client.Client) error

Jump to

Keyboard shortcuts

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