operators

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SupportedOperators = map[OperatorType]OperatorSetupBuilder{
		OperatorTypeQdr: &QdrOperatorBuilder{BaseOperatorBuilder{
			image:        "quay.io/interconnectedcloud/qdr-operator",
			operatorName: "qdr-operator",
			keepCdrs:     true,
			apiVersion:   "v1alpha1",
		}},
		OperatorTypeBroker: &BrokerOperatorBuilder{BaseOperatorBuilder{
			image:        "quay.io/artemiscloud/activemq-artemis-operator:latest",
			operatorName: "activemq-artemis-operator",
			keepCdrs:     true,
			apiVersion:   "v1alpha1",
		}},
		OperatorTypeSkupper: &SkupperOperatorBuilder{BaseOperatorBuilder: BaseOperatorBuilder{
			operatorName: "skupper-router",
		}},
	}
)

Functions

This section is empty.

Types

type BaseOperator

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

func (*BaseOperator) APIVersion

func (b *BaseOperator) APIVersion() string

func (*BaseOperator) CRDNames

func (b *BaseOperator) CRDNames() []string

func (*BaseOperator) GroupName

func (b *BaseOperator) GroupName() string

func (*BaseOperator) Image

func (b *BaseOperator) Image() string

func (*BaseOperator) InitFromBaseOperatorBuilder

func (b *BaseOperator) InitFromBaseOperatorBuilder(builder *BaseOperatorBuilder) error

func (*BaseOperator) Interface

func (b *BaseOperator) Interface() interface{}

func (*BaseOperator) Name

func (b *BaseOperator) Name() string

func (*BaseOperator) Namespace

func (b *BaseOperator) Namespace() string

func (*BaseOperator) Setup

func (b *BaseOperator) Setup() error

func (*BaseOperator) SetupYamls

func (b *BaseOperator) SetupYamls() error

func (*BaseOperator) TeardownEach

func (b *BaseOperator) TeardownEach() error

func (*BaseOperator) TeardownSuite

func (b *BaseOperator) TeardownSuite() error

type BaseOperatorBuilder

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

All the base operator stuff goes into this class. All operator-specific things go into specific classes.

func (*BaseOperatorBuilder) AddYamlURL

func (b *BaseOperatorBuilder) AddYamlURL(yaml string) OperatorSetupBuilder

func (*BaseOperatorBuilder) Build

func (b *BaseOperatorBuilder) Build() (OperatorSetup, error)

func (*BaseOperatorBuilder) Finalize

func (*BaseOperatorBuilder) KeepCdr

func (b *BaseOperatorBuilder) KeepCdr(keepCdrs bool) OperatorSetupBuilder

func (*BaseOperatorBuilder) NewBuilder

func (b *BaseOperatorBuilder) NewBuilder(restConfig *rest.Config, rawConfig *clientcmdapi.Config) OperatorSetupBuilder

func (*BaseOperatorBuilder) OperatorType

func (b *BaseOperatorBuilder) OperatorType() OperatorType

func (*BaseOperatorBuilder) SetAdminUnavailable

func (b *BaseOperatorBuilder) SetAdminUnavailable() OperatorSetupBuilder

When CRDs are already created on the cluster in question, we don't need to do anything with them.

func (*BaseOperatorBuilder) SetOperatorName

func (b *BaseOperatorBuilder) SetOperatorName(operatorName string) OperatorSetupBuilder

Allows for custom named operators to exist

func (*BaseOperatorBuilder) WithApiVersion

func (b *BaseOperatorBuilder) WithApiVersion(apiVersion string) OperatorSetupBuilder

func (*BaseOperatorBuilder) WithCommand

func (b *BaseOperatorBuilder) WithCommand(command string) OperatorSetupBuilder

func (*BaseOperatorBuilder) WithImage

func (b *BaseOperatorBuilder) WithImage(image string) OperatorSetupBuilder

func (*BaseOperatorBuilder) WithNamespace

func (b *BaseOperatorBuilder) WithNamespace(namespace string) OperatorSetupBuilder

func (*BaseOperatorBuilder) WithOperatorName

func (b *BaseOperatorBuilder) WithOperatorName(name string) OperatorSetupBuilder

func (*BaseOperatorBuilder) WithYamlURLs

func (b *BaseOperatorBuilder) WithYamlURLs(yamls []string) OperatorSetupBuilder

func (*BaseOperatorBuilder) WithYamls

func (b *BaseOperatorBuilder) WithYamls(yamls [][]byte) OperatorSetupBuilder

Pass loaded yamls objects instead of URLs

type BrokerOperator

type BrokerOperator struct {
	BaseOperator
	// contains filtered or unexported fields
}

func (*BrokerOperator) APIVersion

func (b *BrokerOperator) APIVersion() string

func (*BrokerOperator) CRDNames

func (b *BrokerOperator) CRDNames() []string

func (*BrokerOperator) GroupName

func (b *BrokerOperator) GroupName() string

func (*BrokerOperator) Image

func (b *BrokerOperator) Image() string

func (*BrokerOperator) Interface

func (b *BrokerOperator) Interface() interface{}

func (*BrokerOperator) Name

func (b *BrokerOperator) Name() string

func (*BrokerOperator) Namespace

func (b *BrokerOperator) Namespace() string

func (*BrokerOperator) Setup

func (b *BrokerOperator) Setup() error

func (*BrokerOperator) TeardownEach

func (b *BrokerOperator) TeardownEach() error

func (*BrokerOperator) TeardownSuite

func (b *BrokerOperator) TeardownSuite() error

type BrokerOperatorBuilder

type BrokerOperatorBuilder struct {
	BaseOperatorBuilder
}

Reusing BaseOperatorBuilder implementation and adding the "abstract" method Build() and OperatorType()

func (*BrokerOperatorBuilder) Build

func (*BrokerOperatorBuilder) OperatorType

func (b *BrokerOperatorBuilder) OperatorType() OperatorType

type DefinitionStruct

type DefinitionStruct struct {
	ApiVersion string      `json:"apiVersion"`
	Kind       string      `json:"kind"`
	Metadata   interface{} `json:"metadata"`
	Spec       interface{} `json:"spec"`
}

type OperatorSetup

type OperatorSetup interface {
	Interface() interface{}
	Namespace() string
	Image() string
	Name() string
	CRDNames() []string
	GroupName() string
	APIVersion() string
	Setup() error
	TeardownEach() error
	TeardownSuite() error
}

type OperatorSetupBuilder

type OperatorSetupBuilder interface {
	NewBuilder(restConfig *rest.Config, rawConfig *clientcmdapi.Config) OperatorSetupBuilder
	WithNamespace(namespace string) OperatorSetupBuilder
	WithImage(image string) OperatorSetupBuilder
	WithCommand(command string) OperatorSetupBuilder
	WithYamlURLs(yamls []string) OperatorSetupBuilder
	AddYamlURL(yaml string) OperatorSetupBuilder
	WithOperatorName(name string) OperatorSetupBuilder
	KeepCdr(keepCdrs bool) OperatorSetupBuilder
	SetAdminUnavailable() OperatorSetupBuilder
	SetOperatorName(operatorName string) OperatorSetupBuilder
	WithApiVersion(apiVersion string) OperatorSetupBuilder
	WithYamls(yamls [][]byte) OperatorSetupBuilder
	Build() (OperatorSetup, error)
	OperatorType() OperatorType
}

type OperatorType

type OperatorType int
const (
	OperatorTypeQdr OperatorType = iota
	OperatorTypeBroker
	OperatorTypeSkupper
)

type QdrOperator

type QdrOperator struct {
	BaseOperator
	// contains filtered or unexported fields
}

func (*QdrOperator) APIVersion

func (q *QdrOperator) APIVersion() string

func (*QdrOperator) CRDNames

func (q *QdrOperator) CRDNames() []string

func (*QdrOperator) GroupName

func (q *QdrOperator) GroupName() string

func (*QdrOperator) Image

func (q *QdrOperator) Image() string

func (*QdrOperator) Interface

func (q *QdrOperator) Interface() interface{}

func (*QdrOperator) Name

func (q *QdrOperator) Name() string

func (*QdrOperator) Namespace

func (q *QdrOperator) Namespace() string

func (*QdrOperator) Setup

func (q *QdrOperator) Setup() error

func (*QdrOperator) TeardownEach

func (q *QdrOperator) TeardownEach() error

func (*QdrOperator) TeardownSuite

func (q *QdrOperator) TeardownSuite() error

type QdrOperatorBuilder

type QdrOperatorBuilder struct {
	BaseOperatorBuilder
}

Reusing BaseOperatorBuilder implementation and adding the "abstract" method Build() and OperatorType()

func (*QdrOperatorBuilder) Build

func (q *QdrOperatorBuilder) Build() (OperatorSetup, error)

func (*QdrOperatorBuilder) OperatorType

func (q *QdrOperatorBuilder) OperatorType() OperatorType

type SkupperOperator

type SkupperOperator struct {
	BaseOperator
	ClusterLocal    bool
	Id              string
	QdrouterdImage  string
	ControllerImage string
	ProxyImage      string
	SkupperPath     string
}

func (*SkupperOperator) Name

func (s *SkupperOperator) Name() string

func (*SkupperOperator) Setup

func (s *SkupperOperator) Setup() error

func (*SkupperOperator) SkupperBin

func (s *SkupperOperator) SkupperBin() string

func (*SkupperOperator) TeardownEach

func (s *SkupperOperator) TeardownEach() error

func (*SkupperOperator) TeardownSuite

func (s *SkupperOperator) TeardownSuite() error

type SkupperOperatorBuilder

type SkupperOperatorBuilder struct {
	BaseOperatorBuilder
	// contains filtered or unexported fields
}

SkupperOperatorBuilder helps building a skupper operator that uses

the CLI skupper. Once the API is available
we can create a second skupper operator to
test both api and cli.

func (*SkupperOperatorBuilder) Build

func (*SkupperOperatorBuilder) ClusterLocal

func (b *SkupperOperatorBuilder) ClusterLocal(local bool)

func (*SkupperOperatorBuilder) OperatorType

func (s *SkupperOperatorBuilder) OperatorType() OperatorType

func (*SkupperOperatorBuilder) SkupperId

func (b *SkupperOperatorBuilder) SkupperId(id string)

func (*SkupperOperatorBuilder) WithControllerImage

func (b *SkupperOperatorBuilder) WithControllerImage(image string)

func (*SkupperOperatorBuilder) WithProxyImage

func (b *SkupperOperatorBuilder) WithProxyImage(image string)

func (*SkupperOperatorBuilder) WithQdrouterdImage

func (b *SkupperOperatorBuilder) WithQdrouterdImage(image string)

func (*SkupperOperatorBuilder) WithSkupperPath

func (b *SkupperOperatorBuilder) WithSkupperPath(path string)

Jump to

Keyboard shortcuts

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