Documentation ¶
Index ¶
- Constants
- func AddAffinity(statefulSet *appsv1.StatefulSet, nodeSelectorRequirementKey string, ...)
- func CreateTabletCells(ctx context.Context, ytClient yt.Client, bundle string, tabletCellCount int) error
- func CreateUser(ctx context.Context, ytClient yt.Client, userName, token string, ...) error
- func GetNotGoodTabletCellBundles(ctx context.Context, ytClient yt.Client) ([]string, error)
- func IsRunningStatus(status SyncStatus) bool
- func IsUpdatingComponent(ytsaurus *apiproxy.Ytsaurus, component Component) bool
- func LocalServerNeedSync(srv server, ytsaurus *apiproxy.Ytsaurus) bool
- func RunIfCondition(condition string, commands ...string) string
- func RunIfExists(path string, commands ...string) string
- func RunIfNonexistent(path string, commands ...string) string
- func SetPathAcl(path string, acl []yt.ACE) string
- func SetWithIgnoreExisting(path string, value string) string
- type Chyt
- type Component
- type ComponentStatus
- type ConfigHelper
- func (h *ConfigHelper) Build() *corev1.ConfigMap
- func (h *ConfigHelper) Exists() bool
- func (h *ConfigHelper) Fetch(ctx context.Context) error
- func (h *ConfigHelper) GetConfigMapName() string
- func (h *ConfigHelper) GetFileNames() []string
- func (h *ConfigHelper) NeedInit() bool
- func (h *ConfigHelper) NeedReload() (bool, error)
- func (h *ConfigHelper) RemoveIfExists(ctx context.Context) error
- func (h *ConfigHelper) Sync(ctx context.Context) error
- type ControllerAgent
- func (ca *ControllerAgent) Fetch(ctx context.Context) error
- func (ca *ControllerAgent) GetType() consts.ComponentType
- func (ca *ControllerAgent) IsUpdatable() bool
- func (c *ControllerAgent) NeedSync() bool
- func (ca *ControllerAgent) Status(ctx context.Context) (ComponentStatus, error)
- func (ca *ControllerAgent) Sync(ctx context.Context) error
- type DataNode
- type Discovery
- func (d *Discovery) Fetch(ctx context.Context) error
- func (d *Discovery) GetType() consts.ComponentType
- func (d *Discovery) IsUpdatable() bool
- func (c *Discovery) NeedSync() bool
- func (d *Discovery) Status(ctx context.Context) (ComponentStatus, error)
- func (d *Discovery) Sync(ctx context.Context) error
- type ExecNode
- func (n *ExecNode) Fetch(ctx context.Context) error
- func (n *ExecNode) GetType() consts.ComponentType
- func (n *ExecNode) IsJobEnvironmentIsolated() bool
- func (n *ExecNode) IsUpdatable() bool
- func (c *ExecNode) SetReadyCondition(status ComponentStatus)
- func (n *ExecNode) Status(ctx context.Context) (ComponentStatus, error)
- func (n *ExecNode) Sync(ctx context.Context) error
- type HttpProxy
- func (hp *HttpProxy) Fetch(ctx context.Context) error
- func (hp *HttpProxy) GetType() consts.ComponentType
- func (hp *HttpProxy) IsUpdatable() bool
- func (c *HttpProxy) NeedSync() bool
- func (hp *HttpProxy) Status(ctx context.Context) (ComponentStatus, error)
- func (hp *HttpProxy) Sync(ctx context.Context) error
- type InitJob
- type Master
- type MasterCache
- func (mc *MasterCache) Fetch(ctx context.Context) error
- func (mc *MasterCache) GetType() consts.ComponentType
- func (mc *MasterCache) IsUpdatable() bool
- func (c *MasterCache) NeedSync() bool
- func (mc *MasterCache) Status(ctx context.Context) (ComponentStatus, error)
- func (mc *MasterCache) Sync(ctx context.Context) error
- type MasterHydra
- type MasterInfo
- type MasterState
- type Medium
- type Option
- type QueryTracker
- func (qt *QueryTracker) Fetch(ctx context.Context) error
- func (qt *QueryTracker) GetType() consts.ComponentType
- func (qt *QueryTracker) IsUpdatable() bool
- func (c *QueryTracker) NeedSync() bool
- func (qt *QueryTracker) Status(ctx context.Context) (ComponentStatus, error)
- func (qt *QueryTracker) Sync(ctx context.Context) error
- type QueueAgent
- func (qa *QueueAgent) Fetch(ctx context.Context) error
- func (qa *QueueAgent) GetType() consts.ComponentType
- func (qa *QueueAgent) IsUpdatable() bool
- func (c *QueueAgent) NeedSync() bool
- func (qa *QueueAgent) Status(ctx context.Context) (ComponentStatus, error)
- func (qa *QueueAgent) Sync(ctx context.Context) error
- type RemoteExecNode
- type RpcProxy
- func (rp *RpcProxy) Fetch(ctx context.Context) error
- func (rp *RpcProxy) GetType() consts.ComponentType
- func (rp *RpcProxy) IsUpdatable() bool
- func (c *RpcProxy) NeedSync() bool
- func (rp *RpcProxy) Status(ctx context.Context) (ComponentStatus, error)
- func (rp *RpcProxy) Sync(ctx context.Context) error
- type Scheduler
- func (s *Scheduler) Fetch(ctx context.Context) error
- func (s *Scheduler) GetType() consts.ComponentType
- func (s *Scheduler) IsUpdatable() bool
- func (c *Scheduler) NeedSync() bool
- func (s *Scheduler) Status(ctx context.Context) (ComponentStatus, error)
- func (s *Scheduler) Sync(ctx context.Context) error
- type Spyt
- type StrawberryController
- func (c *StrawberryController) Fetch(ctx context.Context) error
- func (c *StrawberryController) GetType() consts.ComponentType
- func (c *StrawberryController) IsUpdatable() bool
- func (c *StrawberryController) SetReadyCondition(status ComponentStatus)
- func (c *StrawberryController) Status(ctx context.Context) (ComponentStatus, error)
- func (c *StrawberryController) Sync(ctx context.Context) error
- type SyncStatus
- type TabletCellBundleHealth
- type TabletNode
- func (tn *TabletNode) Fetch(ctx context.Context) error
- func (tn *TabletNode) GetType() consts.ComponentType
- func (tn *TabletNode) IsUpdatable() bool
- func (c *TabletNode) NeedSync() bool
- func (tn *TabletNode) Status(ctx context.Context) (ComponentStatus, error)
- func (tn *TabletNode) Sync(ctx context.Context) error
- type TcpProxy
- func (tp *TcpProxy) Fetch(ctx context.Context) error
- func (tp *TcpProxy) GetType() consts.ComponentType
- func (tp *TcpProxy) IsUpdatable() bool
- func (c *TcpProxy) NeedSync() bool
- func (tp *TcpProxy) Status(ctx context.Context) (ComponentStatus, error)
- func (tp *TcpProxy) Sync(ctx context.Context) error
- type UI
- type YqlAgent
- func (yqla *YqlAgent) Fetch(ctx context.Context) error
- func (yqla *YqlAgent) GetName() string
- func (yqla *YqlAgent) GetType() consts.ComponentType
- func (yqla *YqlAgent) IsUpdatable() bool
- func (c *YqlAgent) NeedSync() bool
- func (yqla *YqlAgent) Status(ctx context.Context) (ComponentStatus, error)
- func (yqla *YqlAgent) Sync(ctx context.Context) error
- type YtsaurusClient
- func (yc *YtsaurusClient) AreMasterSnapshotsBuilt(ctx context.Context, monitoringPaths []string) (bool, error)
- func (yc *YtsaurusClient) AreTabletCellsRemoved(ctx context.Context) (bool, error)
- func (yc *YtsaurusClient) DisableSafeMode(ctx context.Context) error
- func (yc *YtsaurusClient) EnableSafeMode(ctx context.Context) error
- func (yc *YtsaurusClient) Fetch(ctx context.Context) error
- func (yc *YtsaurusClient) GetMasterMonitoringPaths(ctx context.Context) ([]string, error)
- func (yc *YtsaurusClient) GetTabletCells(ctx context.Context) ([]ytv1.TabletCellBundleInfo, error)
- func (yc *YtsaurusClient) GetType() consts.ComponentType
- func (yc *YtsaurusClient) GetYtClient() yt.Client
- func (yc *YtsaurusClient) HandlePossibilityCheck(ctx context.Context) (ok bool, msg string, err error)
- func (yc *YtsaurusClient) IsUpdatable() bool
- func (yc *YtsaurusClient) RecoverTableCells(ctx context.Context, bundles []ytv1.TabletCellBundleInfo) error
- func (yc *YtsaurusClient) RemoveTabletCells(ctx context.Context) error
- func (c *YtsaurusClient) SetReadyCondition(status ComponentStatus)
- func (yc *YtsaurusClient) StartBuildMasterSnapshots(ctx context.Context, monitoringPaths []string) error
- func (yc *YtsaurusClient) Status(ctx context.Context) (ComponentStatus, error)
- func (yc *YtsaurusClient) Sync(ctx context.Context) error
Constants ¶
View Source
const ChytInitClusterJobConfigFileName = "chyt-init-cluster.yson"
View Source
const DefaultBundle string = "default"
View Source
const (
JsPrologue string = "module.exports = "
)
View Source
const SysBundle string = "sys"
View Source
const UIClustersConfigFileName = "clusters-config.json"
View Source
const UICustomConfigFileName = "common.js"
Variables ¶
This section is empty.
Functions ¶
func AddAffinity ¶
func AddAffinity(statefulSet *appsv1.StatefulSet, nodeSelectorRequirementKey string, nodeSelectorRequirementValues []string)
func CreateTabletCells ¶
func CreateUser ¶
func IsRunningStatus ¶
func IsRunningStatus(status SyncStatus) bool
func IsUpdatingComponent ¶
func LocalServerNeedSync ¶
func RunIfCondition ¶
func RunIfExists ¶
func RunIfNonexistent ¶
func SetWithIgnoreExisting ¶
Types ¶
type Component ¶
type Component interface { Fetch(ctx context.Context) error Sync(ctx context.Context) error Status(ctx context.Context) (ComponentStatus, error) GetName() string GetType() consts.ComponentType SetReadyCondition(status ComponentStatus) // TODO(nadya73): refactor it IsUpdatable() bool }
type ComponentStatus ¶
type ComponentStatus struct { SyncStatus SyncStatus Message string }
func NewComponentStatus ¶
func NewComponentStatus(status SyncStatus, message string) ComponentStatus
func SimpleStatus ¶
func SimpleStatus(status SyncStatus) ComponentStatus
func WaitingStatus ¶
func WaitingStatus(status SyncStatus, event string) ComponentStatus
type ConfigHelper ¶
type ConfigHelper struct {
// contains filtered or unexported fields
}
func NewConfigHelper ¶
func NewConfigHelper( labeller *labeller.Labeller, apiProxy apiproxy.APIProxy, name string, configOverrides *corev1.LocalObjectReference, generators map[string]ytconfig.GeneratorDescriptor) *ConfigHelper
func (*ConfigHelper) Build ¶
func (h *ConfigHelper) Build() *corev1.ConfigMap
func (*ConfigHelper) Exists ¶
func (h *ConfigHelper) Exists() bool
func (*ConfigHelper) GetConfigMapName ¶
func (h *ConfigHelper) GetConfigMapName() string
func (*ConfigHelper) GetFileNames ¶
func (h *ConfigHelper) GetFileNames() []string
func (*ConfigHelper) NeedInit ¶
func (h *ConfigHelper) NeedInit() bool
func (*ConfigHelper) NeedReload ¶
func (h *ConfigHelper) NeedReload() (bool, error)
func (*ConfigHelper) RemoveIfExists ¶
func (h *ConfigHelper) RemoveIfExists(ctx context.Context) error
type ControllerAgent ¶
type ControllerAgent struct {
// contains filtered or unexported fields
}
func NewControllerAgent ¶
func (*ControllerAgent) GetType ¶
func (ca *ControllerAgent) GetType() consts.ComponentType
func (*ControllerAgent) IsUpdatable ¶
func (ca *ControllerAgent) IsUpdatable() bool
func (*ControllerAgent) Status ¶
func (ca *ControllerAgent) Status(ctx context.Context) (ComponentStatus, error)
type DataNode ¶
type DataNode struct {
// contains filtered or unexported fields
}
func NewDataNode ¶
func NewDataNode( cfgen *ytconfig.NodeGenerator, ytsaurus *apiproxy.Ytsaurus, master Component, spec ytv1.DataNodesSpec, ) *DataNode
func (*DataNode) GetType ¶
func (n *DataNode) GetType() consts.ComponentType
func (*DataNode) IsUpdatable ¶
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
func NewDiscovery ¶
func (*Discovery) GetType ¶
func (d *Discovery) GetType() consts.ComponentType
func (*Discovery) IsUpdatable ¶
type ExecNode ¶
type ExecNode struct {
// contains filtered or unexported fields
}
func NewExecNode ¶
func NewExecNode( cfgen *ytconfig.NodeGenerator, ytsaurus *apiproxy.Ytsaurus, master Component, spec ytv1.ExecNodesSpec, ) *ExecNode
func (*ExecNode) GetType ¶
func (n *ExecNode) GetType() consts.ComponentType
func (*ExecNode) IsJobEnvironmentIsolated ¶
func (n *ExecNode) IsJobEnvironmentIsolated() bool
Returns true if jobs are executed outside of exec node container.
func (*ExecNode) IsUpdatable ¶
func (*ExecNode) SetReadyCondition ¶
func (c *ExecNode) SetReadyCondition(status ComponentStatus)
type HttpProxy ¶
type HttpProxy struct {
// contains filtered or unexported fields
}
func NewHTTPProxy ¶
func (*HttpProxy) GetType ¶
func (hp *HttpProxy) GetType() consts.ComponentType
func (*HttpProxy) IsUpdatable ¶
type InitJob ¶
type InitJob struct {
// contains filtered or unexported fields
}
func NewInitJob ¶
func NewInitJob( labeller *labeller.Labeller, apiProxy apiproxy.APIProxy, conditionsManager apiproxy.ConditionManager, imagePullSecrets []corev1.LocalObjectReference, name, configFileName, image string, generator ytconfig.YsonGeneratorFunc) *InitJob
func (*InitJob) GetName ¶
func (c *InitJob) GetName() string
GetName returns component's name, which is used as an identifier in component management and for mentioning in logs. For example for master component name is "Master", For data node name looks like "DataNode<NameFromSpec>".
func (*InitJob) IsCompleted ¶
func (*InitJob) SetInitScript ¶
type Master ¶
type Master struct {
// contains filtered or unexported fields
}
func (*Master) GetType ¶
func (m *Master) GetType() consts.ComponentType
func (*Master) IsUpdatable ¶
type MasterCache ¶
type MasterCache struct {
// contains filtered or unexported fields
}
func NewMasterCache ¶
func NewMasterCache(cfgen *ytconfig.Generator, ytsaurus *apiproxy.Ytsaurus) *MasterCache
func (*MasterCache) GetType ¶
func (mc *MasterCache) GetType() consts.ComponentType
func (*MasterCache) IsUpdatable ¶
func (mc *MasterCache) IsUpdatable() bool
func (*MasterCache) Status ¶
func (mc *MasterCache) Status(ctx context.Context) (ComponentStatus, error)
type MasterHydra ¶
type MasterHydra struct { ReadOnly bool `yson:"read_only"` LastSnapshotReadOnly bool `yson:"last_snapshot_read_only"` Active bool `yson:"active"` State MasterState `yson:"state"` }
type MasterInfo ¶
type MasterState ¶
type MasterState string
const ( MasterStateLeading MasterState = "leading" MasterStateFollowing MasterState = "following" )
type Option ¶
type Option func(opts *options)
func WithContainerPorts ¶
func WithContainerPorts(ports ...corev1.ContainerPort) Option
type QueryTracker ¶
type QueryTracker struct {
// contains filtered or unexported fields
}
func NewQueryTracker ¶
func (*QueryTracker) GetType ¶
func (qt *QueryTracker) GetType() consts.ComponentType
func (*QueryTracker) IsUpdatable ¶
func (qt *QueryTracker) IsUpdatable() bool
func (*QueryTracker) Status ¶
func (qt *QueryTracker) Status(ctx context.Context) (ComponentStatus, error)
type QueueAgent ¶
type QueueAgent struct {
// contains filtered or unexported fields
}
func NewQueueAgent ¶
func (*QueueAgent) GetType ¶
func (qa *QueueAgent) GetType() consts.ComponentType
func (*QueueAgent) IsUpdatable ¶
func (qa *QueueAgent) IsUpdatable() bool
func (*QueueAgent) Status ¶
func (qa *QueueAgent) Status(ctx context.Context) (ComponentStatus, error)
type RemoteExecNode ¶
type RemoteExecNode struct {
// contains filtered or unexported fields
}
func NewRemoteExecNodes ¶
func NewRemoteExecNodes( cfgen *ytconfig.NodeGenerator, nodes *ytv1.RemoteExecNodes, proxy apiproxy.APIProxy, spec ytv1.ExecNodesSpec, commonSpec ytv1.CommonSpec, ) *RemoteExecNode
func (*RemoteExecNode) GetName ¶
func (c *RemoteExecNode) GetName() string
GetName returns component's name, which is used as an identifier in component management and for mentioning in logs. For example for master component name is "Master", For data node name looks like "DataNode<NameFromSpec>".
func (*RemoteExecNode) GetType ¶
func (n *RemoteExecNode) GetType() consts.ComponentType
func (*RemoteExecNode) IsJobEnvironmentIsolated ¶
func (n *RemoteExecNode) IsJobEnvironmentIsolated() bool
Returns true if jobs are executed outside of exec node container.
func (*RemoteExecNode) Sync ¶
func (n *RemoteExecNode) Sync(ctx context.Context) (ComponentStatus, error)
type RpcProxy ¶
type RpcProxy struct {
// contains filtered or unexported fields
}
func NewRPCProxy ¶
func (*RpcProxy) GetType ¶
func (rp *RpcProxy) GetType() consts.ComponentType
func (*RpcProxy) IsUpdatable ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func NewScheduler ¶
func (*Scheduler) GetType ¶
func (s *Scheduler) GetType() consts.ComponentType
func (*Scheduler) IsUpdatable ¶
type StrawberryController ¶
type StrawberryController struct {
// contains filtered or unexported fields
}
func NewStrawberryController ¶
func (*StrawberryController) Fetch ¶
func (c *StrawberryController) Fetch(ctx context.Context) error
func (*StrawberryController) GetType ¶
func (c *StrawberryController) GetType() consts.ComponentType
func (*StrawberryController) IsUpdatable ¶
func (c *StrawberryController) IsUpdatable() bool
func (*StrawberryController) SetReadyCondition ¶
func (c *StrawberryController) SetReadyCondition(status ComponentStatus)
func (*StrawberryController) Status ¶
func (c *StrawberryController) Status(ctx context.Context) (ComponentStatus, error)
type SyncStatus ¶
type SyncStatus string
const ( SyncStatusBlocked SyncStatus = "Blocked" SyncStatusNeedLocalUpdate SyncStatus = "NeedLocalUpdate" SyncStatusPending SyncStatus = "Pending" SyncStatusReady SyncStatus = "Ready" SyncStatusUpdating SyncStatus = "Updating" )
type TabletCellBundleHealth ¶
type TabletNode ¶
type TabletNode struct {
// contains filtered or unexported fields
}
func NewTabletNode ¶
func NewTabletNode( cfgen *ytconfig.NodeGenerator, ytsaurus *apiproxy.Ytsaurus, ytsaurusClient internalYtsaurusClient, spec ytv1.TabletNodesSpec, doInitiailization bool, ) *TabletNode
func (*TabletNode) GetType ¶
func (tn *TabletNode) GetType() consts.ComponentType
func (*TabletNode) IsUpdatable ¶
func (tn *TabletNode) IsUpdatable() bool
func (*TabletNode) Status ¶
func (tn *TabletNode) Status(ctx context.Context) (ComponentStatus, error)
type TcpProxy ¶
type TcpProxy struct {
// contains filtered or unexported fields
}
func NewTCPProxy ¶
func (*TcpProxy) GetType ¶
func (tp *TcpProxy) GetType() consts.ComponentType
func (*TcpProxy) IsUpdatable ¶
type UI ¶
type UI struct {
// contains filtered or unexported fields
}
func (*UI) GetType ¶
func (u *UI) GetType() consts.ComponentType
func (*UI) IsUpdatable ¶
func (*UI) SetReadyCondition ¶
func (c *UI) SetReadyCondition(status ComponentStatus)
type YqlAgent ¶
type YqlAgent struct {
// contains filtered or unexported fields
}
func NewYQLAgent ¶
func (*YqlAgent) GetType ¶
func (yqla *YqlAgent) GetType() consts.ComponentType
func (*YqlAgent) IsUpdatable ¶
type YtsaurusClient ¶
type YtsaurusClient struct {
// contains filtered or unexported fields
}
func NewYtsaurusClient ¶
func (*YtsaurusClient) AreMasterSnapshotsBuilt ¶
func (*YtsaurusClient) AreTabletCellsRemoved ¶
func (yc *YtsaurusClient) AreTabletCellsRemoved(ctx context.Context) (bool, error)
func (*YtsaurusClient) DisableSafeMode ¶
func (yc *YtsaurusClient) DisableSafeMode(ctx context.Context) error
func (*YtsaurusClient) EnableSafeMode ¶
func (yc *YtsaurusClient) EnableSafeMode(ctx context.Context) error
func (*YtsaurusClient) GetMasterMonitoringPaths ¶
func (yc *YtsaurusClient) GetMasterMonitoringPaths(ctx context.Context) ([]string, error)
func (*YtsaurusClient) GetTabletCells ¶
func (yc *YtsaurusClient) GetTabletCells(ctx context.Context) ([]ytv1.TabletCellBundleInfo, error)
func (*YtsaurusClient) GetType ¶
func (yc *YtsaurusClient) GetType() consts.ComponentType
func (*YtsaurusClient) GetYtClient ¶
func (yc *YtsaurusClient) GetYtClient() yt.Client
func (*YtsaurusClient) HandlePossibilityCheck ¶
func (*YtsaurusClient) IsUpdatable ¶
func (yc *YtsaurusClient) IsUpdatable() bool
func (*YtsaurusClient) RecoverTableCells ¶
func (yc *YtsaurusClient) RecoverTableCells(ctx context.Context, bundles []ytv1.TabletCellBundleInfo) error
func (*YtsaurusClient) RemoveTabletCells ¶
func (yc *YtsaurusClient) RemoveTabletCells(ctx context.Context) error
func (*YtsaurusClient) SetReadyCondition ¶
func (c *YtsaurusClient) SetReadyCondition(status ComponentStatus)
func (*YtsaurusClient) StartBuildMasterSnapshots ¶
func (yc *YtsaurusClient) StartBuildMasterSnapshots(ctx context.Context, monitoringPaths []string) error
func (*YtsaurusClient) Status ¶
func (yc *YtsaurusClient) Status(ctx context.Context) (ComponentStatus, error)
Source Files ¶
- chyt.go
- component.go
- config_helper.go
- controller_agent.go
- data_node.go
- discovery.go
- exec_node.go
- exec_node_base.go
- exec_node_remote.go
- helpers.go
- httpproxy.go
- init_job.go
- master.go
- master_caches.go
- microservice.go
- pods_manager.go
- query_tracker.go
- queue_agent.go
- rpcproxy.go
- scheduler.go
- server.go
- serveroptions.go
- spyt.go
- strawberry_controller.go
- tablet_node.go
- tcpproxy.go
- ui.go
- user.go
- volume.go
- yql_agent.go
- ytsaurus_client.go
Click to show internal directories.
Click to hide internal directories.