Documentation
¶
Overview ¶
Package consts is the package that defines those universal const vars if const vars are not used specifically by a certain file, ie. may be used by other components or imported by other projects, then they should be defined here.
Index ¶
Constants ¶
const ( // OwnerReferenceIndex is the lookup name for the index function OwnerReferenceIndex = "owner-reference-index" // TargetReferenceIndex is the lookup name for the index function TargetReferenceIndex = "target-reference-index" // VPANameIndex is the lookup name for the index function VPANameIndex = "vpa-name-index" )
const ( EventReasonEvictFailed = "EvictFailed" EventReasonEvictCreated = "EvictCreated" EventReasonEvictExceededGracePeriod = "EvictExceededGracePeriod" EventReasonEvictSucceeded = "EvictSucceeded" EventReasonContainerStopped = "ContainerStopped" )
const variables for pod eviction reason identifier in event.
const ( EventActionEvicting = "Evicting" EventActionContainerStopping = "ContainerStopping" )
const variable for pod eviction action identifier in event.
const ( ObjectFieldNameSpec = "spec" ObjectFieldNameStatus = "status" )
common fields for ordinary k8s objects.
const ( KillerNameFakeKiller = "fake-killer" KillerNameEvictionKiller = "eviction-api-killer" KillerNameDeletionKiller = "deletion-api-killer" KillerNameContainerKiller = "container-killer" )
const ( // EvictionPluginThresholdMetRPCTimeoutInSecs is timeout duration in secs for ThresholdMet RPC EvictionPluginThresholdMetRPCTimeoutInSecs = 10 // EvictionPluginGetTopEvictionPodsRPCTimeoutInSecs is timeout duration in secs for GetTopEvictionPods RPC EvictionPluginGetTopEvictionPodsRPCTimeoutInSecs = 10 // EvictionPluginGetEvictPodsRPCTimeoutInSecs is timeout duration in secs for GetEvictPods RPC EvictionPluginGetEvictPodsRPCTimeoutInSecs = 10 )
const ( KatalystCustomConfigTargetFinalizerKCC = "kcct.katalyst.kubewharf.io/kcc-controller" KatalystCustomConfigTargetFinalizerCNC = "kcct.katalyst.kubewharf.io/cnc-controller" KatalystCustomConfigTargetFinalizerKCCT = "kcct.katalyst.kubewharf.io/kcct-controller" )
const variables for kcc target finalizer
const ( KCCTargetConfFieldNameLabelSelector = "nodeLabelSelector" KCCTargetConfFieldNamePriority = "priority" KCCTargetConfFieldEphemeralSelector = "ephemeralSelector" KCCTargetConfFieldNameRevisionHistoryLimit = "revisionHistoryLimit" KCCTargetConfFieldNameConfig = "config" KCCTargetConfFieldNameNodeNames = "nodeNames" KCCTargetConfFieldNameLastDuration = "lastDuration" )
generic spec fields for configuration CRD (referred by KCC)
const ( KCCTargetConfFieldNameCollisionCount = "collisionCount" KCCTargetConfFieldNameObservedGeneration = "observedGeneration" )
generic status fields for configuration CRD (referred by KCC)
const ( // metric type Rate = ".rate" Delta = ".delta" )
const ( MetricLoad1MinSystem = "cpu.load.1min.system" MetricLoad5MinSystem = "cpu.load.5min.system" MetricLoad15MinSystem = "cpu.load.15min.system" )
System compute metrics
const ( MetricMemTotalSystem = "mem.total.system" MetricMemUsedSystem = "mem.used.system" MetricMemFreeSystem = "mem.free.system" MetricMemShmemSystem = "mem.shmem.system" MetricMemBufferSystem = "mem.buffer.system" MetricMemPageCacheSystem = "mem.pagecache.system" MetricMemAvailableSystem = "mem.available.system" MetricMemDirtySystem = "mem.dirty.system" MetricMemWritebackSystem = "mem.writeback.system" MetricMemKswapdstealSystem = "mem.kswapdsteal.system" MetricMemKswapdstealDeltaSystem = "mem.kswapdsteal.delta.system" MetricMemSwapTotalSystem = "mem.swap.total.system" MetricMemSwapFreeSystem = "mem.swap.free.system" MetricMemSlabReclaimableSystem = "mem.slab.reclaimable.system" MetricMemScaleFactorSystem = "mem.scale.factor.system" MetricMemUpdateTimeSystem = "mem.updatetime.system" )
System memory metrics
const ( MetricIOReadSystem = "io.read.system" MetricIOWriteSystem = "io.write.system" MetricIOBusySystem = "io.busy.system" MetricIOReadOpsSystem = "io.read.ops.system" MetricIOWriteOpsSystem = "io.write.ops.system" MetricIOBusyRateSystem = "io.busy.rate.system" )
System blkio metrics
const ( MetricsSystemRootfsAvailable = "available.rootfs.system" MetricsSystemRootfsCapacity = "capacity.rootfs.system" MetricsSystemRootfsUsed = "used.rootfs.system" MetricsSystemRootfsInodes = "inodes.rootfs.system" MetricsSystemRootfsInodesFree = "free.inodes.rootfs.system" MetricsSystemRootfsInodesUsed = "used.inodes.rootfs.system" )
System rootfs metrics
const ( MetricMemTotalNuma = "mem.total.numa" MetricMemUsedNuma = "mem.used.numa" MetricMemFreeNuma = "mem.free.numa" MetricMemShmemNuma = "mem.shmem.numa" MetricMemAvailableNuma = "mem.available.numa" MetricMemFilepageNuma = "mem.filepage.numa" MetricMemInactiveFileNuma = "mem.inactivefile.numa" MetricMemBandwidthNuma = "mem.bandwidth.numa" MetricMemBandwidthMaxNuma = "mem.bandwidth.max.numa" MetricMemBandwidthTheoryNuma = "mem.bandwidth.theory.numa" MetricMemBandwidthReadNuma = "mem.bandwidth.read.numa" MetricMemBandwidthWriteNuma = "mem.bandwidth.write.numa" MetricMemLatencyReadNuma = "mem.latency.read.numa" MetricMemLatencyWriteNuma = "mem.latency.write.numa" )
System numa metrics
const ( MetricCPUSchedwait = "cpu.schedwait.cpu" MetricCPUUsageRatio = "cpu.usage.ratio.cpu" MetricCPUIOWaitRatio = "cpu.iowait.ratio.cpu" )
System cpu compute metrics
const ( MetricCPULimitContainer = "cpu.limit.container" MetricCPUUsageContainer = "cpu.usage.container" MetricCPUUsageUserContainer = "cpu.usage.user.container" MetricCPUUsageSysContainer = "cpu.usage.sys.container" MetricCPUQuotaContainer = "cpu.quota.container" MetricCPUPeriodContainer = "cpu.period.container" MetricCPUNrThrottledContainer = "cpu.nr.throttled.container" MetricCPUNrPeriodContainer = "cpu.nr.period.container" MetricCPUThrottledTimeContainer = "cpu.throttled.time.container" MetricCPUNrRunnableContainer = "cpu.nr.runnable.container" MetricCPUNrUninterruptibleContainer = "cpu.nr.uninterruptible.container" MetricCPUNrIOWaitContainer = "cpu.nr.iowait.container" MetricLoad1MinContainer = "cpu.load.1min.container" MetricLoad5MinContainer = "cpu.load.5min.container" MetricLoad15MinContainer = "cpu.load.15min.container" MetricOCRReadDRAMsContainer = "cpu.read.drams.container" MetricIMCWriteContainer = "cpu.imc.write.container" MetricStoreAllInsContainer = "cpu.store.allins.container" MetricStoreInsContainer = "cpu.store.ins.container" MetricCPUNrThrottledRateContainer = MetricCPUNrThrottledContainer + Rate MetricCPUNrPeriodRateContainer = MetricCPUNrPeriodContainer + Rate MetricCPUThrottledTimeRateContainer = MetricCPUThrottledTimeContainer + Rate MetricCPUUpdateTimeContainer = "cpu.updatetime.container" )
container cpu metrics
const ( MetricMemLimitContainer = "mem.limit.container" MetricMemTCPLimitContainer = "mem.tcp.limit.container" MetricMemUsageContainer = "mem.usage.container" MetricMemUsageUserContainer = "mem.usage.user.container" MetricMemUsageKernContainer = "mem.usage.kern.container" MetricMemRssContainer = "mem.rss.container" MetricMemCacheContainer = "mem.cache.container" MetricMemShmemContainer = "mem.shmem.container" MetricMemDirtyContainer = "mem.dirty.container" MetricMemWritebackContainer = "mem.writeback.container" MetricMemPgfaultContainer = "mem.pgfault.container" MetricMemPgmajfaultContainer = "mem.pgmajfault.container" MetricMemAllocstallContainer = "mem.allocstall.container" MetricMemKswapdstealContainer = "mem.kswapdstall.container" MetricMemOomContainer = "mem.oom.container" MetricMemScaleFactorContainer = "mem.scalefactor.container" MetricMemBandwidthReadContainer = "mem.bandwidth.read.container" MetricMemBandwidthWriteContainer = "mem.bandwidth.write.container" MetricMemPgfaultRateContainer = MetricMemPgfaultContainer + Rate MetricMemPgmajfaultRateContainer = MetricMemPgmajfaultContainer + Rate MetricMemOomRateContainer = MetricMemOomContainer + Rate MetricMemUpdateTimeContainer = "mem.updatetime.container" )
container memory metrics
const ( MetricBlkioReadIopsContainer = "blkio.read.iops.container" MetricBlkioWriteIopsContainer = "blkio.write.iops.container" MetricBlkioReadBpsContainer = "blkio.read.bps.container" MetricBlkioWriteBpsContainer = "blkio.write.bps.container" MetricBlkioUpdateTimeContainer = "blkio.updatetime.container" )
container blkio metrics
const ( MetricNetTcpSendBytesContainer = "net.tcp.send.bytes.container" MetricNetTcpSendPacketsContainer = "net.tcp.send.packets.container" MetricNetTcpRecvBytesContainer = "net.tcp.recv.bytes.container" MetricNetTcpRecvPacketsContainer = "net.tcp.recv.packets.container" MetricNetTcpSendBPSContainer = "net.tcp.send.bps.container" MetricNetTcpSendPpsContainer = "net.tcp.send.pps.container" MetricNetTcpRecvBPSContainer = "net.tcp.recv.bps.container" MetricNetTcpRecvPpsContainer = "net.tcp.recv.pps.container" MetricNetworkUpdateTimeContainer = "net.updatetime.container" )
container net metrics
const ( MetricCPUCPIContainer = "cpu.cpi.container" MetricCPUCyclesContainer = "cpu.cycles.container" MetricCPUInstructionsContainer = "cpu.instructions.container" MetricCPUICacheMissContainer = "cpu.icachemiss.container" MetricCPUL2CacheMissContainer = "cpu.l2cachemiss.container" MetricCPUL3CacheMissContainer = "cpu.l3cachemiss.container" MetricCPUCyclesRateContainer = MetricCPUCyclesContainer + Rate MetricCPUInstructionsRateContainer = MetricCPUInstructionsContainer + Rate MetricCPUICacheMissRateContainer = MetricCPUICacheMissContainer + Rate MetricCPUL2CacheMissRateContainer = MetricCPUL2CacheMissContainer + Rate MetricCPUL3CacheMissRateContainer = MetricCPUL3CacheMissContainer + Rate )
container perf metrics
const ( MetricsMemTotalPerNumaContainer = "mem.total.numa.container" MetricsMemFilePerNumaContainer = "mem.file.numa.container" MetricsMemAnonPerNumaContainer = "mem.anon.numa.container" )
container per numa metrics
const ( MetricsContainerRootfsAvailable = "available.rootfs.container" MetricsContainerRootfsCapacity = "capacity.rootfs.container" MetricsContainerRootfsUsed = "used.rootfs.container" MetricsContainerRootfsInodes = "inodes.rootfs.container" MetricsContainerRootfsInodesFree = "free.inodes.rootfs.container" MetricsContainerRootfsInodesUsed = "used.inodes.rootfs.container" )
container rootfs metrics
const ( MetricsLogsAvailable = "available.logs.container" MetricsLogsCapacity = "capacity.logs.container" MetricsLogsInodes = "inodes.logs.container" MetricsLogsInodesFree = "free.inodes.logs.container" MetricsLogsInodesUsed = "used.inodes.logs.container" )
container logs metrics
const ( MetricCPULimitCgroup = "cpu.limit.cgroup" MetricCPUUsageCgroup = "cpu.usage.cgroup" MetricCPUUsageUserCgroup = "cpu.usage.user.cgroup" MetricCPUUsageSysCgroup = "cpu.usage.sys.cgroup" MetricCPUQuotaCgroup = "cpu.quota.cgroup" MetricCPUPeriodCgroup = "cpu.period.cgroup" MetricCPUNrThrottledCgroup = "cpu.nr.throttled.cgroup" MetricCPUThrottledPeriodCgroup = "cpu.throttled.period.cgroup" MetricCPUThrottledTimeCgroup = "cpu.throttled.time.cgroup" MetricCPUNrRunnableCgroup = "cpu.nr.runnable.cgroup" MetricCPUNrUninterruptibleCgroup = "cpu.nr.uninterruptible.cgroup" MetricCPUNrIOWaitCgroup = "cpu.nr.iowait.cgroup" MetricLoad1MinCgroup = "cpu.load.1min.cgroup" MetricLoad5MinCgroup = "cpu.load.5min.cgroup" MetricLoad15MinCgroup = "cpu.load.15min.cgroup" MetricUpdateTimeCgroup = "cpu.updatetime.cgroup" )
Cgroup cpu metrics
const ( MetricMemLimitCgroup = "mem.limit.cgroup" MetricMemUsageCgroup = "mem.usage.cgroup" MetricMemUsageUserCgroup = "mem.usage.user.cgroup" MetricMemUsageSysCgroup = "mem.usage.sys.cgroup" MetricMemRssCgroup = "mem.rss.cgroup" MetricMemCacheCgroup = "mem.cache.cgroup" MetricMemShmemCgroup = "mem.shmem.cgroup" MetricMemDirtyCgroup = "mem.dirty.cgroup" MetricMemWritebackCgroup = "mem.writeback.cgroup" MetricMemPgfaultCgroup = "mem.pgfault.cgroup" MetricMemPgmajfaultCgroup = "mem.pgmajfault.cgroup" MetricMemAllocstallCgroup = "mem.allocstall.cgroup" MetricMemKswapdstealCgroup = "mem.kswapdstall.cgroup" MetricMemOomCgroup = "mem.oom.cgroup" MetricMemScaleFactorCgroup = "mem.scalefactor.cgroup" )
Cgroup memory metrics
const ( MetricBlkioReadIopsCgroup = "blkio.read.iops.cgroup" MetricBlkioWriteIopsCgroup = "blkio.write.iops.cgroup" MetricBlkioReadBpsCgroup = "blkio.read.bps.cgroup" MetricBlkioWriteBpsCgroup = "blkio.write.bps.cgroup" )
Cgroup blkio metrics
const ( MetricNetTcpSendByteCgroup = "net.tcp.send.byte.cgroup" MetricNetTcpSendPpsCgroup = "net.tcp.send.pps.cgroup" MetricNetTcpRecvByteCgroup = "net.tcp.recv.byte.cgroup" MetricNetTcpRecvPpsCgroup = "net.tcp.recv.pps.cgroup" )
Cgroup net metrics
const ( MetricsMemTotalPerNumaCgroup = "mem.total.numa.cgroup" MetricsMemFilePerNumaCgroup = "mem.file.numa.cgroup" MetricsMemAnonPerNumaCgroup = "mem.anon.numa.cgroup" )
Cgroup per numa metrics
const ( MetricsPodVolumeAvailable = "available.volume.pod.container" MetricsPodVolumeCapacity = "capacity.volume.pod.container" MetricsPodVolumeUsed = "used.volume.pod.container" MetricsPodVolumeInodes = "inodes.volume.pod.container" MetricsPodVolumeInodesFree = "free.inodes.volume.pod.container" MetricsPodVolumeInodesUsed = "used.inodes.volume.pod.container" )
Pod volume metrics
const ( // KubeletQoSResourceManagerCheckpoint is the name of the checkpoint file for kubelet QoS resource manager KubeletQoSResourceManagerCheckpoint = "kubelet_qrm_checkpoint" MainContainerNameAnnotationKey = "kubernetes.io/main-container-name" )
const (
KatalystCustomConfigAnnotationKeyConfigHash = "kcc.katalyst.kubewharf.io/config.hash"
)
KatalystCustomConfigAnnotationKeyConfigHash defines const variables for kcc annotations about config hash.
const (
KatalystCustomConfigFinalizerKCC = "kcc.katalyst.kubewharf.io/kcc-controller"
)
KatalystCustomConfigFinalizerKCC defines const variables for kcc finalizer
const KatalystNodeDomainPrefix = "node.katalyst.kubewharf.io"
KatalystNodeDomainPrefix domain prefix for taint, label, annotation keys.
const KeySeparator = "/"
KeySeparator : to split parts of a key
const (
ServiceProfileDescriptorAnnotationKeyConfigHash = "spd.katalyst.kubewharf.io/config.hash"
)
ServiceProfileDescriptorAnnotationKeyConfigHash defines const variables for spd annotations about config hash.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ContainerName ¶
type ContainerName string
type KatalystComponent ¶
type KatalystComponent string
KatalystComponent defines the component name that current process is running as.
const ( KatalystComponentAgent KatalystComponent = "agent" KatalystComponentController KatalystComponent = "controller" KatalystComponentWebhook KatalystComponent = "webhook" KatalystComponentMetric KatalystComponent = "metric" KatalystComponentScheduler KatalystComponent = "scheduler" )
type PodContainerName ¶
type PodContainerName string