operator

package
v0.0.0-...-b4c24e5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version is the version of the GravityDsa Operator.
	Version = "0.0.1"

	// GravityDsaImage is the default image
	GravityDsaImage = "iamjhe/gravity-dsa:v1"
	// GravityDsaImagePullPolicy is default imagepullpolicy ( Options: "Always", "Never", "IfNotPresent" )
	GravityDsaImagePullPolicy = "Always"

	GravityDsaServicePort = 44444

	// ResyncPeriod is how often the operator will be checking the resources.
	ResyncPeriod = 5 * time.Second
)

Variables

This section is empty.

Functions

func NewInformer

func NewInformer(
	c *Controller,
	resourceFuncs k8scache.ResourceEventHandlerFuncs,
	interval time.Duration,
) (k8scache.Indexer, k8scache.Controller)

NewInformer takes a controller and a set of resource handlers and returns an indexer and a controller that are subscribed to changes to the state of a dsas resource.

Types

type Controller

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

Controller manages dsas running in Kubernetes.

func NewController

func NewController(opts *Options) *Controller

func (*Controller) Run

func (c *Controller) Run(ctx context.Context) error

Run starts the gravityDsa operator controller loop.

func (*Controller) SetupClients

func (c *Controller) SetupClients(cfg *k8srestapi.Config) error

SetupClients takes the configuration and prepares the rest clients that will be used to interact with the cluster objects.

func (*Controller) SetupSignalHandler

func (c *Controller) SetupSignalHandler(ctx context.Context)

SetupSignalHandler enables handling process signals.

func (*Controller) Shutdown

func (c *Controller) Shutdown()

Shutdown stops the operator controller.

type Options

type Options struct {
	// Namespace where the Gravity DSA Operator will be managing the dsas.
	Namespace string

	// NoSignals marks whether to enable the signal handler.
	NoSignals bool
}

Options for the operator.

Jump to

Keyboard shortcuts

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