deployers

package
v0.1.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GreptimeComponentName = "app.greptime.io/component"
)

Variables

View Source
var (
	DefaultMetricPortName = "metrics"
	DefaultMetricPath     = "/metrics"
	DefaultScapeInterval  = "30s"

	DefaultConfigPath = "/etc/greptimedb"
)

Functions

func UpdateStatus

func UpdateStatus(ctx context.Context, input *v1alpha1.GreptimeDBCluster, kc client.Client, opts ...client.UpdateOption) error

func WithCheckEtcdService

func WithCheckEtcdService(enableCheckEtcdService bool) func(*MetaDeployer)

func WithEtcdMaintenanceBuilder

func WithEtcdMaintenanceBuilder(builder EtcdMaintenanceBuilder) func(*MetaDeployer)

Types

type CommonDeployer

type CommonDeployer struct {
	client.Client
	Scheme *runtime.Scheme

	deployer.DefaultDeployer
}

CommonDeployer is the common deployer for all components of GreptimeDBCluster.

func NewFromManager

func NewFromManager(mgr ctrl.Manager) *CommonDeployer

func (*CommonDeployer) GenerateConfigMap

func (c *CommonDeployer) GenerateConfigMap(cluster *v1alpha1.GreptimeDBCluster, componentKind v1alpha1.ComponentKind) (*corev1.ConfigMap, error)

func (*CommonDeployer) GetCluster

func (c *CommonDeployer) GetCluster(crdObject client.Object) (*v1alpha1.GreptimeDBCluster, error)

func (*CommonDeployer) ResourceName

func (c *CommonDeployer) ResourceName(clusterName string, componentKind v1alpha1.ComponentKind) string

type DatanodeDeployer

type DatanodeDeployer struct {
	*CommonDeployer
}

DatanodeDeployer is the deployer for datanode.

func NewDatanodeDeployer

func NewDatanodeDeployer(mgr ctrl.Manager) *DatanodeDeployer

func (*DatanodeDeployer) CheckAndUpdateStatus

func (d *DatanodeDeployer) CheckAndUpdateStatus(ctx context.Context, crdObject client.Object) (bool, error)

func (*DatanodeDeployer) CleanUp

func (d *DatanodeDeployer) CleanUp(ctx context.Context, crdObject client.Object) error

func (*DatanodeDeployer) Render

func (d *DatanodeDeployer) Render(crdObject client.Object) ([]client.Object, error)

type EtcdMaintenanceBuilder

type EtcdMaintenanceBuilder func(etcdEndpoints []string) (clientv3.Maintenance, error)

type FrontendDeployer

type FrontendDeployer struct {
	*CommonDeployer
}

func NewFrontendDeployer

func NewFrontendDeployer(mgr ctrl.Manager) *FrontendDeployer

func (*FrontendDeployer) CheckAndUpdateStatus

func (d *FrontendDeployer) CheckAndUpdateStatus(ctx context.Context, crdObject client.Object) (bool, error)

func (*FrontendDeployer) Render

func (d *FrontendDeployer) Render(crdObject client.Object) ([]client.Object, error)

type MetaDeployer

type MetaDeployer struct {
	*CommonDeployer
	// contains filtered or unexported fields
}

func NewMetaDeployer

func NewMetaDeployer(mgr ctrl.Manager, opts ...MetaDeployerOption) *MetaDeployer

func (*MetaDeployer) CheckAndUpdateStatus

func (d *MetaDeployer) CheckAndUpdateStatus(ctx context.Context, highLevelObject client.Object) (bool, error)

func (*MetaDeployer) PreSyncHooks

func (d *MetaDeployer) PreSyncHooks() []deployer.Hook

func (*MetaDeployer) Render

func (d *MetaDeployer) Render(crdObject client.Object) ([]client.Object, error)

type MetaDeployerOption

type MetaDeployerOption func(*MetaDeployer)

Jump to

Keyboard shortcuts

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