start

package
v0.0.0-...-a45fa12 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

package start initializes and launches the core cluster version operator loops.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientBuilder

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

ClientBuilder simplifies returning Kubernetes client and client configs with an appropriate user agent.

func (*ClientBuilder) ClientOrDie

func (cb *ClientBuilder) ClientOrDie(name string, configFns ...func(*rest.Config)) clientset.Interface

func (*ClientBuilder) KubeClientOrDie

func (cb *ClientBuilder) KubeClientOrDie(name string, configFns ...func(*rest.Config)) kubernetes.Interface

func (*ClientBuilder) RestConfig

func (cb *ClientBuilder) RestConfig(configFns ...func(*rest.Config)) *rest.Config

RestConfig returns a copy of the ClientBuilder's rest.Config with any overrides from the provided configFns applied.

type Context

type Context struct {
	CVO        *cvo.Operator
	AutoUpdate *autoupdate.Controller

	CVInformerFactory              externalversions.SharedInformerFactory
	OpenshiftConfigInformerFactory informers.SharedInformerFactory
	InformerFactory                externalversions.SharedInformerFactory
}

Context holds the controllers for this operator and exposes a unified start command.

func (*Context) Start

func (c *Context) Start(ctx context.Context)

Start launches the controllers in the provided context and any supporting infrastructure. When ch is closed the controllers will be shut down.

type Options

type Options struct {
	ReleaseImage string

	Kubeconfig string
	NodeName   string
	ListenAddr string

	EnableAutoUpdate            bool
	EnableDefaultClusterVersion bool

	// Exclude is used to determine whether to exclude
	// certain manifests based on an annotation:
	// exclude.release.openshift.io/<identifier>=true
	Exclude string

	// for testing only
	Name            string
	Namespace       string
	PayloadOverride string
	EnableMetrics   bool
	ResyncInterval  time.Duration
}

Options are the valid inputs to starting the CVO.

func NewOptions

func NewOptions() *Options

NewOptions creates the default options for the CVO and loads any environment variable overrides.

func (*Options) NewControllerContext

func (o *Options) NewControllerContext(cb *ClientBuilder) *Context

NewControllerContext initializes the default Context for the current Options. It does not start any background processes.

func (*Options) Run

func (o *Options) Run() error

Jump to

Keyboard shortcuts

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