controller

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReconcileAddonsConfiguration

func NewReconcileAddonsConfiguration(mgr manager.Manager, addonGetterFactory addonGetterFactory,
	chartStorage chartStorage, addonStorage addonStorage, brokerFacade brokerFacade, docsProvider docsProvider,
	brokerSyncer brokerSyncer, templateService templateService, tmpDir string, log logrus.FieldLogger) reconcile.Reconciler

NewReconcileAddonsConfiguration returns a new reconcile.Reconciler

func NewReconcileClusterAddonsConfiguration

func NewReconcileClusterAddonsConfiguration(mgr manager.Manager, addonGetterFactory addonGetterFactory, chartStorage chartStorage,
	addonStorage addonStorage, brokerFacade brokerFacade, docsProvider docsProvider, brokerSyncer brokerSyncer,
	templateService templateService, tmpDir string, log logrus.FieldLogger) reconcile.Reconciler

NewReconcileClusterAddonsConfiguration returns a new reconcile.Reconciler

func SetupAndStartController

func SetupAndStartController(cfg *rest.Config, ctrCfg *config.ControllerConfig, metricsAddr string, sFact storage.Factory, uploadClient rafter.Client, lg *logrus.Entry) manager.Manager

SetupAndStartController creates and starts the controller

Types

type AddonsConfigurationController

type AddonsConfigurationController struct {
	// contains filtered or unexported fields
}

AddonsConfigurationController holds a controller logic

func NewAddonsConfigurationController

func NewAddonsConfigurationController(reconciler reconcile.Reconciler) *AddonsConfigurationController

NewAddonsConfigurationController creates a controller with a given reconciler

func (*AddonsConfigurationController) Start

Start starts a controller

type BrokerController added in v1.1.0

type BrokerController struct {
	// contains filtered or unexported fields
}

BrokerController is a controller which reacts on changes for ServiceInstance, ServiceBroker and AddonsConfiguration. Only this controller should create/delete ServiceBroker.

func NewBrokerController added in v1.1.0

func NewBrokerController(checker instanceChecker, cli client.Client, bFacade brokerFacade) *BrokerController

NewBrokerController creates BrokerController instance.

func (*BrokerController) Reconcile added in v1.1.0

func (sbc *BrokerController) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile checks if the (cluster) service broker must be removed

func (*BrokerController) Start added in v1.1.0

func (sbc *BrokerController) Start(mgr manager.Manager) error

Start starts the controller

type ClusterAddonsConfigurationController

type ClusterAddonsConfigurationController struct {
	// contains filtered or unexported fields
}

ClusterAddonsConfigurationController holds controller logic

func NewClusterAddonsConfigurationController

func NewClusterAddonsConfigurationController(reconciler reconcile.Reconciler) *ClusterAddonsConfigurationController

NewClusterAddonsConfigurationController creates new controller with a given reconciler

func (*ClusterAddonsConfigurationController) Start

Start starts a controller

type ClusterBrokerController added in v1.1.0

type ClusterBrokerController struct {
	// contains filtered or unexported fields
}

ClusterBrokerController is a controller which reacts on changes for ServiceInstance, ClusterServiceBroker and ClusterAddonsConfiguration. Only this controller should create/delete ClusterServiceBroker.

func NewClusterBrokerController added in v1.1.0

func NewClusterBrokerController(checker instanceChecker, cli client.Client, bFacade brokerFacade, clusterBrokerName string) *ClusterBrokerController

NewClusterBrokerController creates ClusterBrokerController instance.

func (*ClusterBrokerController) Reconcile added in v1.1.0

func (sbc *ClusterBrokerController) Reconcile(request reconcile.Request) (reconcile.Result, error)

Reconcile checks if the cluster service broker must be removed

func (*ClusterBrokerController) Start added in v1.1.0

func (sbc *ClusterBrokerController) Start(mgr manager.Manager) error

Start starts the controller

type CommonClient

type CommonClient struct {
	client.Client
	// contains filtered or unexported fields
}

CommonClient holds shared client for controllers

func NewCommonClient

func NewCommonClient(cli client.Client, log logrus.FieldLogger) *CommonClient

NewCommonClient creates a new CommonClient

func (*CommonClient) IsNamespaceScoped

func (a *CommonClient) IsNamespaceScoped() bool

IsNamespaceScoped return true if service is namespace-scoped

func (*CommonClient) ListConfigurations

func (a *CommonClient) ListConfigurations() ([]internal.CommonAddon, error)

ListConfigurations lists ClusterAddonsConfiguration or AddonsConfiguration if namespace is set

func (*CommonClient) ReprocessRequest

func (a *CommonClient) ReprocessRequest(addonName string) error

ReprocessRequest bumps reprocessRequest for ClusterAddonsConfiguration or AddonsConfiguration if namespace is set

func (*CommonClient) SetNamespace

func (a *CommonClient) SetNamespace(namespace string)

SetNamespace sets service's working namespace

func (*CommonClient) UpdateConfiguration

func (a *CommonClient) UpdateConfiguration(addon *internal.CommonAddon) error

UpdateConfiguration updates ClusterAddonsConfiguration or AddonsConfiguration if namespace is set

func (*CommonClient) UpdateConfigurationStatus

func (a *CommonClient) UpdateConfigurationStatus(addon *internal.CommonAddon) error

UpdateConfigurationStatus updates ClusterAddonsConfiguration or AddonsConfiguration status if namespace is set

type NamespacedService

type NamespacedService interface {
	SetNamespace(namespace string)
}

NamespacedService represents service layer which can be applied to both namespace scoped and cluster-wide resources

type ReconcileAddonsConfiguration

type ReconcileAddonsConfiguration struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileAddonsConfiguration reconciles a AddonsConfiguration object

func (*ReconcileAddonsConfiguration) Reconcile

Reconcile reads that state of the cluster for a AddonsConfiguration object and makes changes based on the state read

type ReconcileClusterAddonsConfiguration

type ReconcileClusterAddonsConfiguration struct {
	client.Client
	// contains filtered or unexported fields
}

ReconcileClusterAddonsConfiguration reconciles a ClusterAddonsConfiguration object

func (*ReconcileClusterAddonsConfiguration) Reconcile

Reconcile reads that state of the cluster for a ClusterAddonsConfiguration object and makes changes based on the state read

Directories

Path Synopsis
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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