restarters

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxStaticNodeId = 50000
)
View Source
const (
	DefaultPodPhasePollingInterval = time.Second * 10
)
View Source
const (
	HostnameEnvVar = "HOSTNAME"
)

Variables

This section is empty.

Functions

func ExcludeByCommonFields

func ExcludeByCommonFields(nodes []*Ydb_Maintenance.Node, spec FilterNodeParams) []*Ydb_Maintenance.Node

func ExcludeByTenantNames

func ExcludeByTenantNames(
	tenantNodes []*Ydb_Maintenance.Node,
	selectedTenants []string,
	tenantToNodeIds map[string][]uint32,
) []*Ydb_Maintenance.Node

func FilterByDatacenters added in v0.0.7

func FilterByDatacenters(nodes []*Ydb_Maintenance.Node, datacenters []string) []*Ydb_Maintenance.Node

func FilterByHostFQDN

func FilterByHostFQDN(nodes []*Ydb_Maintenance.Node, hostFQDNs []string) []*Ydb_Maintenance.Node

func FilterByNodeIds

func FilterByNodeIds(nodes []*Ydb_Maintenance.Node, nodeIds []uint32) []*Ydb_Maintenance.Node

func FilterStorageNodes

func FilterStorageNodes(nodes []*Ydb_Maintenance.Node, maxStaticNodeId uint32) []*Ydb_Maintenance.Node

func FilterTenantNodes

func FilterTenantNodes(nodes []*Ydb_Maintenance.Node) []*Ydb_Maintenance.Node

func MergeAndUnique

func MergeAndUnique(nodeSlices ...[]*Ydb_Maintenance.Node) []*Ydb_Maintenance.Node

func PopulateByCommonFields

func PopulateByCommonFields(nodes []*Ydb_Maintenance.Node, spec FilterNodeParams) []*Ydb_Maintenance.Node

func SatisfiesStartingTime

func SatisfiesStartingTime(node *Ydb_Maintenance.Node, startedTime *options.StartedTime) bool

func StreamPipeIntoLogger

func StreamPipeIntoLogger(p io.ReadCloser, logger *zap.SugaredLogger)

Types

type ClusterNodesInfo

type ClusterNodesInfo struct {
	AllNodes        []*Ydb_Maintenance.Node
	TenantToNodeIds map[string][]uint32
}

type FilterNodeParams

type FilterNodeParams struct {
	Version             options.VersionSpec
	StartedTime         *options.StartedTime
	ExcludeHosts        []string
	SelectedTenants     []string
	SelectedNodeIds     []uint32
	SelectedHosts       []string
	SelectedDatacenters []string
	MaxStaticNodeId     uint32
}

type K8sRestarterOptions added in v0.0.3

type K8sRestarterOptions struct {
	RestartDuration time.Duration
	KubeconfigPath  string
	Namespace       string
}

type Restarter

type Restarter interface {
	Filter(
		spec FilterNodeParams,
		cluster ClusterNodesInfo,
	) []*Ydb_Maintenance.Node
	RestartNode(node *Ydb_Maintenance.Node) error
}

type RunRestarter

type RunRestarter struct {
	Opts *RunRestarterParams
	// contains filtered or unexported fields
}

func NewRunRestarter

func NewRunRestarter(logger *zap.SugaredLogger, params *RunRestarterParams) *RunRestarter

func (*RunRestarter) Filter

func (*RunRestarter) RestartNode

func (r *RunRestarter) RestartNode(node *Ydb_Maintenance.Node) error

func (*RunRestarter) SetDynnodeOnly

func (r *RunRestarter) SetDynnodeOnly()

func (*RunRestarter) SetStorageOnly

func (r *RunRestarter) SetStorageOnly()

type RunRestarterParams added in v0.0.3

type RunRestarterParams struct {
	PayloadFilePath string
}

type StorageK8sOpts

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

type StorageK8sRestarter

type StorageK8sRestarter struct {
	Opts *StorageK8sOpts
	// contains filtered or unexported fields
}

func NewStorageK8sRestarter

func NewStorageK8sRestarter(logger *zap.SugaredLogger, params *StorageK8sRestarterOptions) *StorageK8sRestarter

func (*StorageK8sRestarter) Filter

func (StorageK8sRestarter) RestartNode

func (r StorageK8sRestarter) RestartNode(node *Ydb_Maintenance.Node) error

type StorageK8sRestarterOptions added in v0.0.3

type StorageK8sRestarterOptions struct {
	*K8sRestarterOptions
}

type StorageSSHOpts

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

type StorageSSHRestarter

type StorageSSHRestarter struct {
	Opts *StorageSSHOpts
	// contains filtered or unexported fields
}

func NewStorageSSHRestarter

func NewStorageSSHRestarter(logger *zap.SugaredLogger, sshArgs []string, systemdUnit string) *StorageSSHRestarter

func (StorageSSHRestarter) Filter

func (StorageSSHRestarter) RestartNode

func (r StorageSSHRestarter) RestartNode(node *Ydb_Maintenance.Node) error

type TenantK8sOpts

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

type TenantK8sRestarter

type TenantK8sRestarter struct {
	Opts *TenantK8sOpts
	// contains filtered or unexported fields
}

func NewTenantK8sRestarter

func NewTenantK8sRestarter(logger *zap.SugaredLogger, params *TenantK8sRestarterOptions) *TenantK8sRestarter

func (*TenantK8sRestarter) Filter

func (TenantK8sRestarter) RestartNode

func (r TenantK8sRestarter) RestartNode(node *Ydb_Maintenance.Node) error

type TenantK8sRestarterOptions added in v0.0.3

type TenantK8sRestarterOptions struct {
	*K8sRestarterOptions
}

type TenantSSHOpts

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

type TenantSSHRestarter

type TenantSSHRestarter struct {
	Opts *TenantSSHOpts
	// contains filtered or unexported fields
}

func NewTenantSSHRestarter

func NewTenantSSHRestarter(logger *zap.SugaredLogger, sshArgs []string, systemdUnit string) *TenantSSHRestarter

func (TenantSSHRestarter) Filter

func (TenantSSHRestarter) RestartNode

func (r TenantSSHRestarter) RestartNode(node *Ydb_Maintenance.Node) error

Jump to

Keyboard shortcuts

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