operator

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: Apache-2.0 Imports: 30 Imported by: 3

Documentation

Overview

Quartermaster framework

Index

Constants

View Source
const (
	TPRGroup   = "storage.coreos.com"
	TPRVersion = "v1alpha1"

	TPRStorageNodeKind    = "storagenode"
	TPRStorageStatusKind  = "storagestatus"
	TPRStorageClusterKind = "storagecluster"

	PluralTPRStorageNodeKind    = TPRStorageNodeKind + "s"
	PluralTPRStorageStatusKind  = TPRStorageStatusKind + "es"
	PluralTPRStorageClusterKind = TPRStorageClusterKind + "s"
)

Variables

This section is empty.

Functions

func GetStorageNodeSpecHash

func GetStorageNodeSpecHash(sp spec.StorageNodeSpec) uint32

func ListOptions

func ListOptions(name string) api.ListOptions

func NewQuartermasterRESTClient

func NewQuartermasterRESTClient(c restclient.Config) (*restclient.RESTClient, error)

func NewStorageClusterListWatch

func NewStorageClusterListWatch(client *restclient.RESTClient) *cache.ListWatch

NewStorageClusterListWatch returns a new ListWatch on the StorageCluster resource.

func NewStorageNodeListWatch

func NewStorageNodeListWatch(client *restclient.RESTClient) *cache.ListWatch

NewStorageNodeListWatch returns a new ListWatch on the StorageNode resource.

func PodRunningAndReady

func PodRunningAndReady(pod v1.Pod) (bool, error)

PodRunningAndReady returns whether a pod is running and each container has passed it's ready state.

func WaitForDeploymentReady added in v0.0.2

func WaitForDeploymentReady(client kubernetes.Interface, namespace, name string, available int32) error

func WaitForTPRReady

func WaitForTPRReady(restClient restclient.Interface, tprGroup, tprVersion, tprName string) error

WaitForTPRReady waits for a third party resource to be available for use.

Types

type Config

type Config struct {
	Host        string
	TLSInsecure bool
	TLSConfig   restclient.TLSClientConfig
	Kubeconfig  string
	MasterUrl   string
}

Config defines configuration parameters for the Operator.

type Operator

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

func New

func New(c Config, storageFuns ...qmstorage.StorageTypeNewFunc) (*Operator, error)

New creates a new controller.

func (*Operator) GetRESTClient added in v0.0.2

func (c *Operator) GetRESTClient() *restclient.RESTClient

func (*Operator) GetStorage

func (*Operator) Run

func (c *Operator) Run(stopc <-chan struct{}) error

Run the controller.

type StorageClusterOperator

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

func (*StorageClusterOperator) HasSynced

func (s *StorageClusterOperator) HasSynced() bool

func (*StorageClusterOperator) Setup

func (s *StorageClusterOperator) Setup(stopc <-chan struct{}) error

type StorageOperator

type StorageOperator interface {
	Setup(stopc <-chan struct{}) error
	HasSynced() bool
}

func NewStorageClusterOperator

func NewStorageClusterOperator(op *Operator) StorageOperator

Jump to

Keyboard shortcuts

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