Documentation
¶
Index ¶
- Constants
- Variables
- func ComponentCypressPath(component ComponentType) string
- func ComponentLabel(component ComponentType) string
- func ComponentServicePrefix(component ComponentType) string
- func ComponentStatefulSetPrefix(component ComponentType) string
- func GetDaemonSetPrefix(component ComponentType) string
- func GetDefaultStrawberryControllerFamilies() []string
- func GetMicroservicePrefix(component ComponentType) string
- func GetServiceKebabCase(component ComponentType) string
- func GetShortName(component ComponentType) string
- func GetStatefulSetPrefix(component ComponentType) string
- type ComponentClass
- type ComponentType
Constants ¶
View Source
const ( HTTPPortName = "http" HTTPSPortName = "https" YTRPCPortName = "rpc" YTPublicRPCPortName = "public-rpc" KafkaPortName = "kafka" YTMonitoringContainerPortName = "metrics" YTMonitoringServicePortName = "ytsaurus-metrics" CRIServiceMonitoringPortName = "cri-metrics" CHYTHttpProxyName = "chyt-http" CHYTHttpsProxyName = "chyt-https" )
View Source
const ( YTMonitoringPort = 10000 DiscoveryRPCPort = 9020 DiscoveryMonitoringPort = 10020 MasterRPCPort = 9010 MasterMonitoringPort = 10010 SchedulerRPCPort = 9011 SchedulerMonitoringPort = 10011 ControllerAgentRPCPort = 9014 ControllerAgentMonitoringPort = 10014 DataNodeRPCPort = 9012 DataNodeMonitoringPort = 10012 TabletNodeRPCPort = 9022 TabletNodeMonitoringPort = 10022 ExecNodeRPCPort = 9029 ExecNodeMonitoringPort = 10029 OffshoreDataGatewayRPCPort = 9032 OffshoreDataGatewayMonitoringPort = 10032 CRIServiceMonitoringPort = 10026 // TODO(zlobober): temporary until YT-20036. DataNodeSkynetPort = 11012 TabletNodeSkynetPort = 11022 ExecNodeSkynetPort = 11029 RPCProxyPublicRPCPort = 9013 RPCProxyInternalRPCPort = 9023 RPCProxyMonitoringPort = 10013 HTTPProxyRPCPort = 9016 HTTPProxyMonitoringPort = 10016 HTTPProxyHTTPPort = 80 HTTPProxyHTTPSPort = 443 HTTPProxyChytHttpPort = 8123 HTTPProxyChytHttpsPort = 8443 TCPProxyMonitoringPort = 10017 QueryTrackerRPCPort = 9028 QueryTrackerMonitoringPort = 10028 YQLAgentRPCPort = 9019 YQLAgentMonitoringPort = 10019 YQLAgentDQInterconnectPort = 9035 YQLAgentDQgRPCPort = 9036 QueueAgentRPCPort = 9030 QueueAgentMonitoringPort = 10030 UIHTTPPort = 80 StrawberryHTTPAPIPort = 80 MasterCachesRPCPort = 9018 MasterCachesMonitoringPort = 10018 KafkaProxyMonitoringPort = 10033 KafkaProxyKafkaPort = 9034 KafkaProxyRPCPort = 9033 CypressProxyRPCPort = 9031 CypressProxyMonitoringPort = 10031 BundleControllerRPCPort = 9025 BundleControllerMonitoringPort = 10025 TabletBalancerRPCPort = 9024 TabletBalancerMonitoringPort = 10024 )
View Source
const ( ConfigMountPoint = "/config" ConfigTemplateMountPoint = "/config_template" HTTPSSecretMountPoint = "/tls/https_secret" RPCProxySecretMountPoint = "/tls/rpc_secret" BusServerSecretMountPoint = "/tls/bus_secret" BusClientSecretMountPoint = "/tls/bus_client_secret" CABundleMountPoint = "/tls/ca_bundle" CARootBundleMountPoint = "/etc/ssl/certs" UIClustersConfigMountPoint = "/opt/app" UICustomConfigMountPoint = "/opt/app/dist/server/configs/custom" UISecretsMountPoint = "/opt/app/secrets" UIVaultMountPoint = "/vault" SecretsMountBase = "/var/run/secrets" )
View Source
const ( YTServerContainerName = "ytserver" PostprocessConfigContainerName = "postprocess-config" PrepareLocationsContainerName = "prepare-locations" PrepareSecretContainerName = "prepare-secret" UIContainerName = "yt-ui" StrawberryContainerName = "strawberry" HydraPersistenceUploaderContainerName = "hydra-persistence-uploader" TimbertruckContainerName = "timbertruck" )
View Source
const ( ClientConfigFileName = "client.yson" ClientConfigPathEnv = "YT_DRIVER_CONFIG_PATH" CypressPatchFileName = "cypress-patch.yson" PendingCypressPatchFileName = "pending-cypress-patch.yson" PreviousCypressPatchFileName = "previous-cypress-patch.yson" InitJobDefaultReason = "InitJob" InitJobScriptName = "init-job-script.sh" PostprocessConfigScriptName = "postprocess-config.sh" MasterCellsInitializationScriptName = "master-cells-initialization.sh" ClusterInitializationScriptName = "cluster-initialization.sh" MasterEnterReadOnlyScriptName = "master-enter-read-only.sh" MasterExitReadOnlyScriptName = "master-exit-read-only.sh" MasterCellsPreparationScriptName = "master-cells-preparation.sh" MasterCellsWaitRegistrationScriptName = "master-cells-wait-registration.sh" MasterCellsSettlementScriptName = "master-cells-settlement.sh" MasterCellsCompletionScriptName = "master-cells-completion.sh" OperationsArchiveInitializationScriptName = "operations-archive-initialization.sh" OperationsArchiveUpdateScriptName = "operations-archive-update.sh" YQLAgentInitializationScriptName = "yql-agent-initialization.sh" YQLAgentUpdateScriptName = "yql-agent-update.sh" UIClusterConfigFileName = "clusters-config.json" UISecretFileName = "yt-interface-secret.json" CABundleFileName = "ca.crt" CARootBundleFileName = "ca-certificates.crt" // NOTE: See https://github.com/ytsaurus/ytsaurus/issues/1524 SSLCertFileKey = "SSL_CERT_FILE" SSLCertDirKey = "SSL_CERT_DIR" RequestsCABundleKey = "REQUESTS_CA_BUNDLE" TokenSecretKey = "YT_TOKEN" TokenFileName = "token" )
View Source
const ( JobsContainerName = "jobs" CRIServiceSocketName = "cri.sock" CRIOConfigVolumeName = "config-crio" CRIOConfigMountPoint = "/config/crio" CRIOConfigFileName = "crio.conf" CRIOSignaturePolicyFileName = "policy.json" CRIOSeccompPrivilegedFileName = "seccomp-privileged.json" CRINamespace = "yt" CRIBaseCgroup = "/yt" ContainerdConfigVolumeName = "config-containerd" ContainerdConfigMountPoint = "/config/containerd" ContainerdSocketName = "containerd.sock" ContainerdConfigFileName = "containerd.toml" DockerSecretVolumeName = "image-pull-secret" DockerSecretMountPath = "/config/image-pull-secret" DockerSecretFileName = "config.json" TimbertruckConfigMountPoint = "/etc/timbertruck" )
View Source
const ( ConfigTemplateVolumeName = "config-template" ConfigVolumeName = "config" HTTPSSecretVolumeName = "https-secret" RPCProxySecretVolumeName = "rpc-secret" BusServerSecretVolumeName = "bus-secret" BusClientSecretVolumeName = "bus-client-secret" CARootBundleVolumeName = "ca-root-bundle" CABundleVolumeName = "ca-bundle" InitScriptVolumeName = "init-script" UIVaultVolumeName = "vault" UISecretsVolumeName = "secrets" TimbertruckWorkDirName = "timbertruck" YQLAgentTokenVolumeName = "yql-agent-secret" YQLExecTokenVolumeName = "yql-agent-exec-secret" )
View Source
const ( // Pass certificates via secure vault too - to avoid logging bulky values BusCABundleVaultName = "YT_BUS_CA_BUNDLE" BusClientCertificateVaultName = "YT_BUS_CLIENT_CERTIFICATE" BusClientPrivateKeyVaultName = "YT_BUS_CLIENT_PRIVATE_KEY" BusServerCertificateVaultName = "YT_BUS_SERVER_CERTIFICATE" BusServerPrivateKeyVaultName = "YT_BUS_SERVER_PRIVATE_KEY" SecureVaultEnvPrefix = "YT_SECURE_VAULT_" )
View Source
const ( ConditionOperatorVersion = "OperatorVersion" ConditionClusterMaintenance = "ClusterMaintenance" ConditionReadyToWork = "ReadyToWork" ConditionImageHeaterReady = "ImageHeaterReady" ConditionImageHeaterComplete = "ImageHeaterComplete" ConditionMasterCellsInitialized = "MasterCellsInitialized" ConditionTimbertruckUserInitialized = "TimbertruckUserInitialized" // Cluster health checks ConditionUpdateIsPossible = "UpdateIsPossible" ConditionMastersQuorumCheck = "MastersQuorumCheck" ConditionLostVitalChunksCheck = "LostVitalChunksCheck" ConditionQuorumMissingChunksCheck = "QuorumMissingChunksCheck" ConditionTabletCellBundlesHealthCheck = "TabletCellBundlesHealthCheck" )
Status conditions
View Source
const ( ConditionTimbertruckPrepared = "TimbertruckPrepared" ConditionCypressPatchApplied = "CypressPatchApplied" ConditionMasterCellsPreparation = "MasterCellsPreparation" ConditionMasterCellsRegistration = "MasterCellsRegistration" ConditionMasterCellsCompletion = "MasterCellsCompletion" )
Both status and update conditions
View Source
const ( ConditionReady = "Ready" ConditionInitJobCompleted = "InitJobCompleted" ConditionQuorumCheck = "-QuorumCheck" )
Component status conditions suffixes
View Source
const ( ConditionBulkUpdateModeStarted = "BulkUpdateModeStarted" ConditionWaitingOnDeleteUpdate = "WaitingOnDeleteUpdate" ConditionRollingBudgetExhausted = "RollingBudgetExhausted" ConditionPreChecksRunning = "PreChecksRunning" ConditionScalingDown = "ScalingDown" ConditionScalingUp = "ScalingUp" ConditionPodsUpdated = "PodsUpdated" ConditionPodsRemoved = "PodsRemoved" ConditionPodsRemovingStarted = "PodsRemovingStarted" // Suffix for update state itself ConditionUpdateStateComplete = "Complete" )
Component update phase condition suffixes
View Source
const ( ConditionSafeModeEnabled = "SafeModeEnabled" ConditionTabletCellsSaved = "TabletCellsSaved" ConditionTabletCellsRemovingStarted = "TabletCellsRemovingStarted" ConditionTabletCellsRemoved = "TabletCellsRemoved" ConditionSnaphotsSaved = "SnaphotsSaved" ConditionTabletCellsRecovered = "TabletCellsRecovered" ConditionSidecarsPreparedForInitializing = "SidecarsPreparedForInitializing" // TODO: Remove, it holds alignment. ConditionQTStateUpdated = "QTStateUpdated" ConditionQTStatePreparedForUpdating = "QTStatePreparedForUpdating" ConditionQAStateUpdated = "QAStateUpdated" ConditionQAStatePreparedForUpdating = "QAStatePreparedForUpdating" ConditionSafeModeDisabled = "SafeModeDisabled" )
Update conditions
View Source
const ( PhaseCellsInitialization = "CellsInitialization" PhaseCellsRolesAssignment = "CellsRolesAssignment" PhaseCellsRolesAssigned = "CellsRolesAssigned" PhaseClusterInitialization = "ClusterInitialization" PhaseClusterReconfiguration = "ClusterReconfiguration" PhaseCellRegistration = "CellRegistration" )
Instance initialization phases and init-job reasons.
View Source
const ( // ConditionRealChunksAttributeEnabled is set by client component when // it ensures that sys/@config/node_tracker/enable_real_chunk_locations == %true. ConditionRealChunksAttributeEnabled = "RealChunksAttributeEnabled" // ConditionDataNodesNeedPodsRemoval is set by client component when it detects that // some nodes have imaginary chunks and need to be restarted to remove them. ConditionDataNodesNeedPodsRemoval = "DataNodesNeedPodsRemoval" // ConditionDataNodesWithImaginaryChunksAbsent is set by client component when // it ensures that there are no active data nodes with imaginary chunks exists, so master // can be safely updated to 24.2. ConditionDataNodesWithImaginaryChunksAbsent = "DataNodesWithImaginaryChunksAbsent" )
Conditions below are for migration from imaginary chunks to real chunks for 24.2 https://github.com/ytsaurus/ytsaurus-k8s-operator/issues/396
View Source
const ( LostVitalChunksCountPath = "//sys/lost_vital_chunks/@count" ParityMissingChunksCountPath = "//sys/parity_missing_chunks/@count" DataMissingChunksCountPath = "//sys/data_missing_chunks/@count" UnsafelyPlacedChunksCountPath = "//sys/unsafely_placed_chunks/@count" QuorumMissingChunksCountPath = "//sys/quorum_missing_chunks/@count" DisableSchedulerJobsAttr = "disable_scheduler_jobs" PrimaryMastersPath = "//sys/primary_masters" SecondaryMastersPath = "//sys/secondary_masters" // This is directory with symlinks to all masters. ClusterMastersPath = "//sys/cluster_masters" MasterElectionPath = "orchid/monitoring/election" MasterHydraPath = "orchid/monitoring/hydra" MasterCellDescriptorsPath = "//sys/@config/multicell_manager/cell_descriptors" )
View Source
const ( ENV_K8S_POD_NAME = "K8S_POD_NAME" ENV_K8S_NODE_NAME = "K8S_NODE_NAME" ENV_K8S_POD_NAMESPACE = "K8S_POD_NAMESPACE" )
View Source
const ( YTClusterLabelName = "ytsaurus.tech/cluster-name" YTCellTagLabelName = "ytsaurus.tech/cell-tag" YTCellIDLabelName = "ytsaurus.tech/cell-id" YTComponentLabelName = "yt_component" YTMetricsLabelName = "yt_metrics" DescriptionAnnotationName = "kubernetes.io/description" // Version of overrides observed at the time of generation. ConfigOverridesVersionAnnotationName = "ytsaurus.tech/config-overrides-version" // Config hash is computed from configmap data. ConfigHashAnnotationName = "ytsaurus.tech/config-hash" InitJobReasonAnnotationName = "ytsaurus.tech/init-job-reason" // Instance phase initiates restart when changes. InstancePhaseAnnotationName = "ytsaurus.tech/instance-phase" // Instance hash is computed from template of pod spec. InstanceHashAnnotationName = "ytsaurus.tech/instance-hash" // Observed generation of owner resource at the time of last update. ObservedGenerationAnnotationName = "ytsaurus.tech/observed-generation" YTOperatorInstanceLabelName = "ytsaurus.tech/operator-instance" ImageHeaterLabelName = "ytsaurus.tech/image-heater" ImageHeaterTargetsAnnotationName = "ytsaurus.tech/image-heater-targets" )
View Source
const ( MinValidCellTag = 0x0001 MaxValidCellTag = 0xf000 MaxSecondaryMasterCells = 48 )
View Source
const ( BundleControllerType = ytv1.BundleControllerType TabletBalancerType = ytv1.TabletBalancerType ControllerAgentType = ytv1.ControllerAgentType CypressProxyType = ytv1.CypressProxyType DataNodeType = ytv1.DataNodeType DiscoveryType = ytv1.DiscoveryType ExecNodeType = ytv1.ExecNodeType HttpProxyType = ytv1.HttpProxyType MasterCacheType = ytv1.MasterCacheType MasterType = ytv1.MasterType QueryTrackerType = ytv1.QueryTrackerType QueueAgentType = ytv1.QueueAgentType RpcProxyType = ytv1.RpcProxyType SchedulerType = ytv1.SchedulerType StrawberryControllerType = ytv1.StrawberryControllerType TabletNodeType = ytv1.TabletNodeType OffshoreDataGatewayType = ytv1.OffshoreDataGatewayType TcpProxyType = ytv1.TcpProxyType KafkaProxyType = ytv1.KafkaProxyType UIType = ytv1.UIType YqlAgentType = ytv1.YqlAgentType YtsaurusClientType = ytv1.YtsaurusClientType ChytType = ytv1.ChytType SpytType = ytv1.SpytType ClusterConnectionType = ytv1.ClusterConnectionType NativeClientConfigType = ytv1.NativeClientConfigType TimbertruckType = ytv1.TimbertruckType ImageHeaterType = ytv1.ImageHeaterType )
View Source
const ( ComponentClassUnspecified = ytv1.ComponentClassUnspecified ComponentClassStateless = ytv1.ComponentClassStateless ComponentClassEverything = ytv1.ComponentClassEverything ComponentClassNothing = ytv1.ComponentClassNothing )
View Source
const AdminLoginSecretKey = "login"
View Source
const AdminPasswordSecretKey = "password"
View Source
const AdminTokenSecretKey = "token"
View Source
const DefaultCABundlePath = "/etc/ssl/certs/ca-certificates.crt"
View Source
const DefaultClusterStatusPollPeriod = time.Minute
View Source
const DefaultHTTPProxyRole = "default"
View Source
const DefaultImageHeaterConcurrency = 100
View Source
const DefaultMedium = "default"
View Source
const DefaultName = "default"
View Source
const DefaultStrawberryControllerFamily = "chyt"
View Source
const DefaultTimbertruckDirectoryPath = "//sys/admin/logs"
View Source
const (
HTTPSSecretUpdatePeriod = time.Second * 60
)
View Source
const HydraPersistenceUploaderUserName = "robot-hydra-persistence-uploader"
View Source
const MaxSlotLocationReserve = 10 << 30 // 10GiB
View Source
const MetrikaCounterFileName = "common.js"
View Source
const MetrikaCounterScript = `` /* 365-byte string literal not displayed */
View Source
const RandomTokenBytes = 30
View Source
const RandomTokenPrefix = "ytct-ytop-"
View Source
const StartUID = 19500
View Source
const StrawberryControllerUserName = "robot-strawberry-controller"
View Source
const TimbertruckUserName = "robot-timbertruck"
View Source
const UIUserName = "robot-ui"
View Source
const YQLAgentExecUserName = "yql_agent_exec"
View Source
const YQLAgentUserName = "yql_agent"
View Source
const YtsaurusOperatorUserName = "robot-ytsaurus-k8s-operator"
Variables ¶
View Source
var ( LocalComponentTypes = []ComponentType{ BundleControllerType, TabletBalancerType, ControllerAgentType, DataNodeType, DiscoveryType, ExecNodeType, HttpProxyType, MasterCacheType, MasterType, QueryTrackerType, QueueAgentType, RpcProxyType, SchedulerType, StrawberryControllerType, TabletNodeType, TcpProxyType, KafkaProxyType, YqlAgentType, ClusterConnectionType, NativeClientConfigType, ImageHeaterType, } RemoteComponentTypes = []ComponentType{ DataNodeType, ExecNodeType, TabletNodeType, OffshoreDataGatewayType, } )
View Source
var RawLogsQueueSchema = schema.Schema{ Columns: []schema.Column{ { Name: "value", Type: schema.TypeString, }, { Name: "codec", Type: schema.TypeString, }, { Name: "source_uri", Type: schema.TypeString, }, { Name: "meta", ComplexType: schema.Optional{Item: schema.TypeAny}, }, { Name: "$timestamp", Type: schema.TypeUint64, }, { Name: "$cumulative_data_weight", Type: schema.TypeInt64, }, }, }
Functions ¶
func ComponentCypressPath ¶
func ComponentCypressPath(component ComponentType) string
func ComponentLabel ¶
func ComponentLabel(component ComponentType) string
func ComponentServicePrefix ¶
func ComponentServicePrefix(component ComponentType) string
func ComponentStatefulSetPrefix ¶
func ComponentStatefulSetPrefix(component ComponentType) string
func GetDaemonSetPrefix ¶ added in v0.31.0
func GetDaemonSetPrefix(component ComponentType) string
func GetDefaultStrawberryControllerFamilies ¶
func GetDefaultStrawberryControllerFamilies() []string
func GetMicroservicePrefix ¶
func GetMicroservicePrefix(component ComponentType) string
func GetServiceKebabCase ¶
func GetServiceKebabCase(component ComponentType) string
func GetShortName ¶
func GetShortName(component ComponentType) string
func GetStatefulSetPrefix ¶
func GetStatefulSetPrefix(component ComponentType) string
Types ¶
type ComponentClass ¶
type ComponentClass = ytv1.ComponentClass
type ComponentType ¶
type ComponentType = ytv1.ComponentType
Click to show internal directories.
Click to hide internal directories.