Documentation ¶
Index ¶
Constants ¶
View Source
const ( UnixTimeTemplate = "2006-01-02T15:04:05Z" ParamsTemplateNamespace = "kube-system" MinorVersionCmNamespace = "kube-system" UserParamsSuffix = "-user-params" RunningParamsSuffix = "-running-params" PortUsageCmName = "cloud-provider-port-usage-%s" PortUsageCmNamespace = "kube-system" NextExternalPortKey = "Pbx.Next.External.Port" PortRangeCmNamespace = "kube-system" InsIdRangeCmNamespace = "kube-system" NextClusterScopeCustInsIdKey = "NextClusterScopeCustInsId" DefaultNextClusterScopeCustInsId = "1000" StorageDummyWorkflowId = "Dummy#000" ContainerNameEngine = "engine" ContainerNamePfsd = "pfsd" ContainerNamePfsdTool = "pfsd-tool" InstanceSystemResourcesCmName = "instance-system-resources" InstanceSystemResourcesCmNamespace = "kube-system" ClusterManagerNameSuffix = ".cm" ClusterManagerFlagSuffix = "-cmflag" ClusterManagerMetaSuffix = "-cmconfig" ClusterManagerLeaderSuffix = "-cmleader" ClusterManagerGlobalConfigSuffix = "-global-cmconfig" CmHASwitchFlagKey = "enable_all" CmEnableOnlinePromoteFlagKey = "enable_online_promote" CmEnableRedlineKey = "enable_redline" CmHASwitchFlagKeyEnable = "1" StorageConditionType corev1.NodeConditionType = "PlugInStorageUnavailable" ClientNetworkConditionType corev1.NodeConditionType = "NodeClientNetworkUnavailable" // Manager SrvOperatorPrefix = "srv_opr" SrvOperatorAction = SrvOperatorPrefix + "_action" SrvOperatorType = SrvOperatorPrefix + "_type" SrvOperatorHostinsHosts = SrvOperatorPrefix + "_hosts" SrvOperatorHostIp = SrvOperatorPrefix + "_host_ip" SrvOperatorUserName = SrvOperatorPrefix + "_user_name" SrvOperatorUserPassword = SrvOperatorPrefix + "_password" SrvOperatorUserPrivilege = SrvOperatorPrefix + "_privilege" ManagerSrvTypeIns = "hostins_ops" ManagerSrvTypeAccount = "account" ManagerSrvTypeHealthCheck = "health_check" ManagerSrvTypeLockIns = "lock_ins" ManagerSrvTypeUpdateConf = "update_conf" ManagerSrvTypeReplica = "replica" ManagerActionCreateReplication = "create_replication" ManagerActionSetupInstall = "setup_install_instance" ManagerActionSetupLogAgent = "setup_logagent_config" ManagerActionGetSystemIdentifier = "get_system_identifier" ManagerActionQueryInstallationProgress = "query_installation_progress" ManagerActionDisableSsl = "disable_ssl" ManagerActionStopInstance = "stop_instance" ManagerActionStartInstance = "start_instance" ManagerActionGrowPfs = "grow_pfs" ManagerActionUpdateConf = "update" ManagerActionCreateAccount = "create" ManagerActionHealthCheck = "hostins_check" ManagerActionLockDiskFull = "lock_ins_diskfull" ManagerActionUnLockDiskFull = "unlock_ins_diskfull" NetConfigMapNamespace = "kube-system" NetConfigmapName = "ccm-config" DefaultClientNetCardName = "bond1" InternalNetCardName = "INTERNAL_NETWORK_CARD_NAME" ClientNetCardName = "NET_CARD_NAME" StorageServiceNamespace = "kube-system" StorageServiceName = "polardb-sms-manager" // Cache CacheKeyNodesClientIP = "CacheKeyNodesClientIP" EngineImageName = "engineImage" ManagerImageName = "managerImage" PfsdImageName = "pfsdImage" PfsdToolImageName = "pfsdToolImage" ClusterManagerImageName = "clusterManagerImage" EnginePhasePending string = "PENDING" EnginePhaseStarting string = "STARTING" EnginePhaseRunning string = "RUNNING" EnginePhaseStopping string = "STOPPING" EnginePhaseStopped string = "STOPPED" EnginePhaseFailed string = "FAILED" LabelInsType string = "apsara.metric.db_ins_type" LabelClusterName string = "apsara.metric.clusterName" LabelClusterMode string = "apsara.ins.cluster.mode" LabelInsPort string = "apsara.ins.port" LabelArch string = "apsara.metric.arch" LabelDbType string = "apsara.metric.db_type" LabelInsId string = "apsara.metric.ins_id" LabelInsName string = "apsara.metric.ins_name" LabelLogicCustInsId string = "apsara.metric.logic_custins_id" LabelLogicCustInsName string = "apsara.metric.logic_custins_name" LabelPhysicalCustInsId string = "apsara.metric.physical_custins_id" LabelPodName string = "apsara.metric.pod_name" LabelPvName string = "apsara.metric.pv_name" )
Variables ¶
View Source
var IgnoreParams []string = []string{"log_line_prefix"}
忽略以下参数的更新
View Source
var IgnoreTemplateParams []string = []string{"ssl", "ssl_cert_file", "ssl_key_file", "listen_addresses"}
忽略以下模板参数的覆盖
View Source
var (
IsLeader = false
)
选主全局开关
Functions ¶
func CreateInterruptError ¶
func CreateInterruptError(e InterruptErrorEnum, err error) error
Types ¶
type InterruptError ¶
type InterruptError struct { Name string Error error // 错误 Reason string // 出错原因 Component string // 导致中断的组件 }
func (*InterruptError) ToString ¶
func (e *InterruptError) ToString() string
type InterruptErrorEnum ¶
type InterruptErrorEnum string
const ( // 格式: "中断错误类型|导致中断的组件|中断原因" InterruptPodLost InterruptErrorEnum = "POD_LOST||pod is lost." InterruptPodUnScheduled InterruptErrorEnum = "POD_UNSCHEDULED||" InterruptDbStartFailed InterruptErrorEnum = "DB_START_FAIL||" NoAvailableNode InterruptErrorEnum = "NO_AVAILABLE_NODE||" )
Click to show internal directories.
Click to hide internal directories.