controller

package
v0.3.12 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrResourceExists is used as part of the Event 'reason' when a Pipeline fails
	// to sync due to a ConfigMap of the same name already existing.
	ErrResourceExists = "ErrResourceExists"

	// ErrResourceExists is used as part of the Event 'reason' when a Pipeline fails
	// to sync due to a ConfigMap of the same name already existing.
	ErrSyncFailed = "ErrSyncFailed"

	// MessageResourceExists is the message used for Events when a resource
	// fails to sync due to a statefulSet already existing
	MessageResourceExists = "ConfigMap %s already exists and is not managed by Pipeline"

	// MessageResourceSynced is the message used for an Event fired when a Pipeline
	// is synced successfully
	MessageSyncFailed = "Pipeline sync failed, err: %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterController

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

func NewClusterController

func NewClusterController(namespace string, kubeInformerFactory informers.SharedInformerFactory,
	kubeclientset kubernetes.Interface,
	clusterClient clusterclient.Interface, clusterInformer clusterinformer.ClusterInformer,
	pipeClient pipeclient.Interface, pipeInformer pipeinformer.PipelineInformer) *ClusterController

func (*ClusterController) GetCluster

func (cc *ClusterController) GetCluster() *clusterapi.Cluster

func (*ClusterController) GetK8Pipeline

func (cc *ClusterController) GetK8Pipeline(namespace, pipelineName string) (*pipeapi.Pipeline, error)

func (*ClusterController) ListK8Pipelines

func (cc *ClusterController) ListK8Pipelines(namespace string) ([]*pipeapi.Pipeline, error)

func (*ClusterController) Reset

func (cc *ClusterController) Reset(pipeline *pipeapi.Pipeline) error

func (*ClusterController) Run

func (cc *ClusterController) Run(threadness int, stopCh <-chan struct{}) error

type Interface

type Interface interface {
	GetCluster() *clusterapi.Cluster
	GetK8Pipeline(namespace, pipelineName string) (*pipeapi.Pipeline, error)
	ListK8Pipelines(namespace string) ([]*pipeapi.Pipeline, error)

	Reset(pipeline *pipeapi.Pipeline) error
}

type PipelineManager

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

func (*PipelineManager) Reset

func (pm *PipelineManager) Reset(pipeline *api.Pipeline) error

func (*PipelineManager) Run

func (pm *PipelineManager) Run(threadiness int, stopCh <-chan struct{}) error

Run will set up the event handlers for types we are interested in, as well as syncing informer caches and starting workers. It will block until stopCh is closed, at which point it will shutdown the workqueue and wait for workers to finish processing their current work items.

Jump to

Keyboard shortcuts

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