operator

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultWatchNamespace is the default namespace the operator
	// will watch for instances of its custom resources.
	DefaultWatchNamespace = "openshift-cluster-api"

	// DefaultClusterAutoscalerNamespace is the default namespace for
	// cluster-autoscaler deployments.
	DefaultClusterAutoscalerNamespace = "openshift-cluster-api"

	// DefaultClusterAutoscalerName is the default ClusterAutoscaler
	// object watched by the operator.
	DefaultClusterAutoscalerName = "default"

	// DefaultClusterAutoscalerImage is the default image used in
	// ClusterAutoscaler deployments.
	DefaultClusterAutoscalerImage = "quay.io/openshift/origin-cluster-autoscaler:v4.0"

	// DefaultClusterAutoscalerReplicas is the default number of
	// replicas in ClusterAutoscaler deployments.
	DefaultClusterAutoscalerReplicas = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// WatchNamespace is the namespace the operator will watch for
	// ClusterAutoscaler and MachineAutoscaler instances.
	WatchNamespace string

	// ClusterAutoscalerNamespace is the namespace in which
	// cluster-autoscaler deployments will be created.
	ClusterAutoscalerNamespace string

	// ClusterAutoscalerName is the name of the ClusterAutoscaler
	// resource that will be watched by the operator.
	ClusterAutoscalerName string

	// ClusterAutoscalerImage is the image to be used in
	// ClusterAutoscaler deployments.
	ClusterAutoscalerImage string

	// ClusterAutoscalerReplicas is the number of replicas to be
	// configured in ClusterAutoscaler deployments.
	ClusterAutoscalerReplicas int32
}

Config represents the runtime configuration for the operator.

func ConfigFromEnvironment

func ConfigFromEnvironment() *Config

ConfigFromEnvironment returns a new Config object with defaults overridden by environment variables when set.

func NewConfig

func NewConfig() *Config

NewConfig returns a new Config object with defaults set.

type Operator

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

Operator represents an instance of the cluster-autoscaler-operator.

func New

func New(cfg *Config) (*Operator, error)

New returns a new Operator instance with the given config and a manager configured with the various controllers.

func (*Operator) AddControllers

func (o *Operator) AddControllers() error

AddControllers configures the various controllers and adds them to the operator's manager instance.

func (*Operator) Start

func (o *Operator) Start() error

Start starts the operator's controller-manager.

Jump to

Keyboard shortcuts

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