deployers

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEtcdMaintenanceBuilder

func WithEtcdMaintenanceBuilder(builder EtcdMaintenanceBuilder) func(*MetaDeployer)

Types

type CommonBuilder

type CommonBuilder struct {
	Cluster       *v1alpha1.GreptimeDBCluster
	ComponentKind v1alpha1.ComponentKind

	*deployer.DefaultBuilder
}

func (*CommonBuilder) AddLogsVolume

func (c *CommonBuilder) AddLogsVolume(template *corev1.PodTemplateSpec, mountPath string)

AddLogsVolume will create a shared volume for logs and mount it to the main container and sidecar container.

func (*CommonBuilder) AddVectorConfigVolume added in v0.1.1

func (c *CommonBuilder) AddVectorConfigVolume(template *corev1.PodTemplateSpec)

func (*CommonBuilder) AddVectorSidecar added in v0.1.1

func (c *CommonBuilder) AddVectorSidecar(template *corev1.PodTemplateSpec, kind v1alpha1.ComponentKind)

func (*CommonBuilder) GenerateConfigMap

func (c *CommonBuilder) GenerateConfigMap() (*corev1.ConfigMap, error)

func (*CommonBuilder) GeneratePodMonitor

func (c *CommonBuilder) GeneratePodMonitor() (*monitoringv1.PodMonitor, error)

func (*CommonBuilder) GeneratePodTemplateSpec

func (c *CommonBuilder) GeneratePodTemplateSpec(template *v1alpha1.PodTemplateSpec) *corev1.PodTemplateSpec

func (*CommonBuilder) GenerateVectorConfigMap added in v0.1.1

func (c *CommonBuilder) GenerateVectorConfigMap() (*corev1.ConfigMap, error)

func (*CommonBuilder) MountConfigDir

func (c *CommonBuilder) MountConfigDir(template *corev1.PodTemplateSpec)

MountConfigDir mounts the configmap to the main container as '/etc/greptimedb/config.toml'.

type CommonDeployer

type CommonDeployer struct {
	Scheme *runtime.Scheme

	client.Client
	deployer.DefaultDeployer
}

CommonDeployer is the common deployer for all components of GreptimeDBCluster.

func NewFromManager

func NewFromManager(mgr ctrl.Manager) *CommonDeployer

NewFromManager creates a new CommonDeployer from controller manager.

func (*CommonDeployer) GetCluster

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

func (*CommonDeployer) NewCommonBuilder

func (c *CommonDeployer) NewCommonBuilder(crdObject client.Object, componentKind v1alpha1.ComponentKind) *CommonBuilder

type DatanodeDeployer

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

DatanodeDeployer is the deployer for datanode.

func NewDatanodeDeployer

func NewDatanodeDeployer(mgr ctrl.Manager) *DatanodeDeployer

func (*DatanodeDeployer) Apply

func (d *DatanodeDeployer) Apply(ctx context.Context, crdObject client.Object, objects []client.Object) error

Apply is re-implemented for datanode to handle the maintenance mode.

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) Generate

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

func (*DatanodeDeployer) NewBuilder

func (d *DatanodeDeployer) NewBuilder(crdObject client.Object) deployer.Builder

func (*DatanodeDeployer) PostSyncHooks

func (d *DatanodeDeployer) PostSyncHooks() []deployer.Hook

type EtcdMaintenanceBuilder

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

type FlownodeDeployer

type FlownodeDeployer struct {
	*CommonDeployer
}

FlownodeDeployer is the deployer for flownode.

func NewFlownodeDeployer

func NewFlownodeDeployer(mgr ctrl.Manager) *FlownodeDeployer

func (*FlownodeDeployer) CheckAndUpdateStatus

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

func (*FlownodeDeployer) CleanUp

func (*FlownodeDeployer) Generate

func (d *FlownodeDeployer) Generate(crdObject client.Object) ([]client.Object, error)

func (*FlownodeDeployer) NewBuilder

func (d *FlownodeDeployer) NewBuilder(crdObject client.Object) deployer.Builder

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) Generate

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

func (*FrontendDeployer) NewBuilder

func (d *FrontendDeployer) NewBuilder(crdObject client.Object) deployer.Builder

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) Generate

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

func (*MetaDeployer) NewBuilder

func (d *MetaDeployer) NewBuilder(crdObject client.Object) deployer.Builder

func (*MetaDeployer) PreSyncHooks

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

type MetaDeployerOption

type MetaDeployerOption func(*MetaDeployer)

type MonitoringDeployer added in v0.1.1

type MonitoringDeployer struct {
	*CommonDeployer
}

func NewMonitoringDeployer added in v0.1.1

func NewMonitoringDeployer(mgr ctrl.Manager) *MonitoringDeployer

func (*MonitoringDeployer) CheckAndUpdateStatus added in v0.1.1

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

func (*MonitoringDeployer) Generate added in v0.1.1

func (d *MonitoringDeployer) Generate(crdObject client.Object) ([]client.Object, error)

func (*MonitoringDeployer) NewBuilder added in v0.1.1

func (d *MonitoringDeployer) NewBuilder(crdObject client.Object) deployer.Builder

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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