monitor

package
v1.9.0-industry.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 5 Imported by: 13

Documentation

Overview

Package monitor is the internal version of the API.

Index

Constants

View Source
const GroupName = "monitor.tkestack.io"

GroupName is group name used to register these schema

Variables

View Source
var (
	// Scheme is the default instance of runtime.Scheme to which types in the TKE API are already registered.
	Scheme = runtime.NewScheme()
	// Codecs provides access to encoding and decoding for the scheme
	Codecs = serializer.NewCodecFactory(Scheme)
	// ParameterCodec handles versioning of objects that are converted to query parameters.
	ParameterCodec = runtime.NewParameterCodec(Scheme)
)
View Source
var (
	// SchemeBuilder collects functions that add things to a scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme applies all the stored functions to the scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal}

SchemeGroupVersion is group version used to register these objects

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a IdentityProvider qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns back a IdentityProvider qualified GroupResource

Types

type AddonPhase added in v1.3.1

type AddonPhase string

AddonPhase defines the phase of addon

const (
	// AddonPhaseInitializing means is wait initializing.
	AddonPhaseInitializing AddonPhase = "Initializing"
	// AddonPhaseReinitializing means is reinitializing.
	AddonPhaseReinitializing AddonPhase = "Reinitializing"
	// AddonPhaseChecking means is wait checking.
	AddonPhaseChecking AddonPhase = "Checking"
	// AddonPhaseRunning means is running.
	AddonPhaseRunning AddonPhase = "Running"
	// AddonPhaseUpgrading means is upgrading.
	AddonPhaseUpgrading AddonPhase = "Upgrading"
	// AddonPhaseFailed means has been failed.
	AddonPhaseFailed AddonPhase = "Failed"
	// AddonPhasePending means the controller is proceeding deploying
	AddonPhasePending AddonPhase = "Pending"
	// AddonPhaseUnhealthy means some pods of GPUManager is partial running
	AddonPhaseUnhealthy AddonPhase = "Unhealthy"
	// AddonPhaseTerminating means addon terminating
	AddonPhaseTerminating AddonPhase = "Terminating"
	// AddonPhaseUnknown means addon unknown
	AddonPhaseUnknown AddonPhase = "Unknown"
)

type ClusterOverview added in v1.3.1

type ClusterOverview struct {
	metav1.TypeMeta
	// +optional
	metav1.ObjectMeta
	// +optional
	Result *ClusterOverviewResult
}

ClusterOverview defines the structure for clusters' overview data request and result.

func (*ClusterOverview) DeepCopy added in v1.3.1

func (in *ClusterOverview) DeepCopy() *ClusterOverview

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOverview.

func (*ClusterOverview) DeepCopyInto added in v1.3.1

func (in *ClusterOverview) DeepCopyInto(out *ClusterOverview)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ClusterOverview) DeepCopyObject added in v1.3.1

func (in *ClusterOverview) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ClusterOverviewResult added in v1.3.1

type ClusterOverviewResult struct {
	ClusterCount           int32
	ClusterAbnormal        int32
	ProjectCount           int32
	ProjectAbnormal        int32
	NodeCount              int32
	NodeAbnormal           int32
	WorkloadCount          int32
	WorkloadAbnormal       int32
	CPUCapacity            float64
	CPUAllocatable         float64
	CPUNotReadyCapacity    float64
	CPUNotReadyAllocatable float64
	MemCapacity            int64
	MemAllocatable         int64
	MemNotReadyCapacity    int64
	MemNotReadyAllocatable int64
	PodCount               int32
	Clusters               []*ClusterStatistic
}

func (*ClusterOverviewResult) DeepCopy added in v1.3.1

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterOverviewResult.

func (*ClusterOverviewResult) DeepCopyInto added in v1.3.1

func (in *ClusterOverviewResult) DeepCopyInto(out *ClusterOverviewResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterStatistic added in v1.3.1

type ClusterStatistic struct {
	ClusterID                string
	ClusterDisplayName       string
	TenantID                 string
	ClusterPhase             string
	NodeCount                int32
	NodeAbnormal             int32
	WorkloadCount            int32
	WorkloadAbnormal         int32
	HasMetricServer          bool
	CPUUsed                  float64
	CPURequest               float64
	CPULimit                 float64
	CPUCapacity              float64
	CPUAllocatable           float64
	CPUNotReadyCapacity      float64
	CPUNotReadyAllocatable   float64
	CPURequestRate           string
	CPUAllocatableRate       string
	CPUUsage                 string
	MemUsed                  int64
	MemRequest               int64
	MemLimit                 int64
	MemCapacity              int64
	MemAllocatable           int64
	MemNotReadyCapacity      int64
	MemNotReadyAllocatable   int64
	MemRequestRate           string
	MemAllocatableRate       string
	MemUsage                 string
	PodCount                 int32
	SchedulerHealthy         bool
	ControllerManagerHealthy bool
	EtcdHealthy              bool
}

func (*ClusterStatistic) DeepCopy added in v1.3.1

func (in *ClusterStatistic) DeepCopy() *ClusterStatistic

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatistic.

func (*ClusterStatistic) DeepCopyInto added in v1.3.1

func (in *ClusterStatistic) DeepCopyInto(out *ClusterStatistic)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConfigMap

type ConfigMap struct {
	metav1.TypeMeta
	// +optional
	metav1.ObjectMeta

	// Data contains the configuration data.
	// Each key must consist of alphanumeric characters, '-', '_' or '.'.
	// Values with non-UTF-8 byte sequences must use the BinaryData field.
	// The keys stored in Data must not overlap with the keys in
	// the BinaryData field, this is enforced during validation process.
	// +optional
	Data map[string]string

	// BinaryData contains the binary data.
	// Each key must consist of alphanumeric characters, '-', '_' or '.'.
	// BinaryData can contain byte sequences that are not in the UTF-8 range.
	// The keys stored in BinaryData must not overlap with the ones in
	// the Data field, this is enforced during validation process.
	// +optional
	BinaryData map[string][]byte
}

ConfigMap holds configuration data for tke to consume.

func (*ConfigMap) DeepCopy

func (in *ConfigMap) DeepCopy() *ConfigMap

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMap.

func (*ConfigMap) DeepCopyInto

func (in *ConfigMap) DeepCopyInto(out *ConfigMap)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConfigMap) DeepCopyObject

func (in *ConfigMap) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ConfigMapList

type ConfigMapList struct {
	metav1.TypeMeta

	// +optional
	metav1.ListMeta

	// Items is the list of ConfigMaps.
	Items []ConfigMap
}

ConfigMapList is a resource containing a list of ConfigMap objects.

func (*ConfigMapList) DeepCopy

func (in *ConfigMapList) DeepCopy() *ConfigMapList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapList.

func (*ConfigMapList) DeepCopyInto

func (in *ConfigMapList) DeepCopyInto(out *ConfigMapList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ConfigMapList) DeepCopyObject

func (in *ConfigMapList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type Metric

type Metric struct {
	metav1.TypeMeta
	// +optional
	metav1.ObjectMeta

	// +optional
	Query MetricQuery
	// +optional
	JSONResult string
}

Metric defines the structure for querying monitoring data requests and results.

func (*Metric) DeepCopy

func (in *Metric) DeepCopy() *Metric

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metric.

func (*Metric) DeepCopyInto

func (in *Metric) DeepCopyInto(out *Metric)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Metric) DeepCopyObject

func (in *Metric) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MetricList

type MetricList struct {
	metav1.TypeMeta
	// +optional
	metav1.ListMeta

	// List of metrics
	Items []Metric
}

MetricList is the whole list of all metrics.

func (*MetricList) DeepCopy

func (in *MetricList) DeepCopy() *MetricList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricList.

func (*MetricList) DeepCopyInto

func (in *MetricList) DeepCopyInto(out *MetricList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*MetricList) DeepCopyObject

func (in *MetricList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type MetricQuery

type MetricQuery struct {
	Table string
	// +optional
	StartTime *int64
	// +optional
	EndTime    *int64
	Fields     []string
	Conditions []MetricQueryCondition
	// +optional
	OrderBy string
	// +optional
	Order   string
	GroupBy []string
	Limit   int32
	Offset  int32
}

func (*MetricQuery) DeepCopy

func (in *MetricQuery) DeepCopy() *MetricQuery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricQuery.

func (*MetricQuery) DeepCopyInto

func (in *MetricQuery) DeepCopyInto(out *MetricQuery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MetricQueryCondition

type MetricQueryCondition struct {
	Key   string
	Expr  string
	Value string
}

func (*MetricQueryCondition) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricQueryCondition.

func (*MetricQueryCondition) DeepCopyInto

func (in *MetricQueryCondition) DeepCopyInto(out *MetricQueryCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OverviewProjectStatus added in v1.4.0

type OverviewProjectStatus int32
const (
	OverviewProjectStatusNotFound OverviewProjectStatus = 0
	OverviewProjectStatusError    OverviewProjectStatus = -1
	OverviewProjectStatusDisable  OverviewProjectStatus = -2
)

type Prometheus added in v1.3.1

type Prometheus struct {
	metav1.TypeMeta
	// +optional
	metav1.ObjectMeta

	// Spec defines the desired identities of clusters in this set.
	// +optional
	Spec PrometheusSpec
	// +optional
	Status PrometheusStatus
}

Prometheus is a systems monitoring and alerting toolkit.

func (*Prometheus) DeepCopy added in v1.3.1

func (in *Prometheus) DeepCopy() *Prometheus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Prometheus.

func (*Prometheus) DeepCopyInto added in v1.3.1

func (in *Prometheus) DeepCopyInto(out *Prometheus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Prometheus) DeepCopyObject added in v1.3.1

func (in *Prometheus) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PrometheusList added in v1.3.1

type PrometheusList struct {
	metav1.TypeMeta
	// +optional
	metav1.ListMeta

	// List of Prometheuss
	Items []Prometheus
}

PrometheusList is the whole list of all prometheus which owned by a tenant.

func (*PrometheusList) DeepCopy added in v1.3.1

func (in *PrometheusList) DeepCopy() *PrometheusList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusList.

func (*PrometheusList) DeepCopyInto added in v1.3.1

func (in *PrometheusList) DeepCopyInto(out *PrometheusList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PrometheusList) DeepCopyObject added in v1.3.1

func (in *PrometheusList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type PrometheusRemoteAddr added in v1.3.1

type PrometheusRemoteAddr struct {
	WriteAddr []string
	ReadAddr  []string
}

PrometheusRemoteAddr is the remote write/read address for prometheus

func (*PrometheusRemoteAddr) DeepCopy added in v1.3.1

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRemoteAddr.

func (*PrometheusRemoteAddr) DeepCopyInto added in v1.3.1

func (in *PrometheusRemoteAddr) DeepCopyInto(out *PrometheusRemoteAddr)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PrometheusSpec added in v1.3.1

type PrometheusSpec struct {
	TenantID      string
	ClusterName   string
	Version       string
	SubVersion    map[string]string
	RemoteAddress PrometheusRemoteAddr
	// +optional
	NotifyWebhook string
	// +optional
	Resources ResourceRequirements
	// +optional
	RunOnMaster bool
	// +optional
	AlertRepeatInterval string
	// +optional
	WithNPD bool
}

PrometheusSpec describes the attributes on a Prometheus.

func (*PrometheusSpec) DeepCopy added in v1.3.1

func (in *PrometheusSpec) DeepCopy() *PrometheusSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec.

func (*PrometheusSpec) DeepCopyInto added in v1.3.1

func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PrometheusStatus added in v1.3.1

type PrometheusStatus struct {
	// +optional
	Version string
	// Phase is the current lifecycle phase of the helm of cluster.
	// +optional
	Phase AddonPhase
	// Reason is a brief CamelCase string that describes any failure.
	// +optional
	Reason string
	// RetryCount is a int between 0 and 5 that describes the time of retrying initializing.
	// +optional
	RetryCount int32
	// LastReInitializingTimestamp is a timestamp that describes the last time of retrying initializing.
	// +optional
	LastReInitializingTimestamp metav1.Time
	// SubVersion is the components version such as node-exporter.
	SubVersion map[string]string
}

PrometheusStatus is information about the current status of a Prometheus.

func (*PrometheusStatus) DeepCopy added in v1.3.1

func (in *PrometheusStatus) DeepCopy() *PrometheusStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusStatus.

func (*PrometheusStatus) DeepCopyInto added in v1.3.1

func (in *PrometheusStatus) DeepCopyInto(out *PrometheusStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceList added in v1.3.1

type ResourceList map[string]resource.Quantity

ResourceList is a set of (resource name, quantity) pairs.

func (ResourceList) DeepCopy added in v1.3.1

func (in ResourceList) DeepCopy() ResourceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceList.

func (ResourceList) DeepCopyInto added in v1.3.1

func (in ResourceList) DeepCopyInto(out *ResourceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ResourceRequirements added in v1.3.1

type ResourceRequirements struct {
	Limits   ResourceList
	Requests ResourceList
}

ResourceRequirements describes the compute resource requirements.

func (*ResourceRequirements) DeepCopy added in v1.3.1

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceRequirements.

func (*ResourceRequirements) DeepCopyInto added in v1.3.1

func (in *ResourceRequirements) DeepCopyInto(out *ResourceRequirements)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Directories

Path Synopsis
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.

Jump to

Keyboard shortcuts

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