v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the probe v1 API group +kubebuilder:object:generate=true +groupName=kubeprober.erda.cloud

Index

Constants

View Source
const (
	ProbeNamespace       = "KUBEPROBER_PROBE_NAMESPACE"
	ProbeName            = "KUBEPROBER_PROBE_NAME"
	ProbeStatusReportUrl = "KUBEPROBER_STATUS_REPORT_URL"

	LabelKeyApp            = "app"
	LabelValueApp          = "kubeprober.erda.cloud"
	LabelKeyProbeNameSpace = "kubeprober.erda.cloud/probe-namespace"
	LabelKeyProbeName      = "kubeprober.erda.cloud/probe-name"

	DefaultSourceKey   = "source"
	DefaultSourceValue = "kubeprober"
	OnceProbeDonePhase = "DONE"
)
View Source
const (
	ExtraCMName = "extra-config"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "kubeprober.erda.cloud", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Alert added in v0.1.0

type Alert struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AlertSpec   `json:"spec,omitempty"`
	Status AlertStatus `json:"status,omitempty"`
}

Alert is the Schema for the alerts API

func (*Alert) DeepCopy added in v0.1.0

func (in *Alert) DeepCopy() *Alert

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

func (*Alert) DeepCopyInto added in v0.1.0

func (in *Alert) DeepCopyInto(out *Alert)

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

func (*Alert) DeepCopyObject added in v0.1.0

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

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

type AlertList added in v0.1.0

type AlertList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Alert `json:"items"`
}

AlertList contains a list of Alert

func (*AlertList) DeepCopy added in v0.1.0

func (in *AlertList) DeepCopy() *AlertList

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

func (*AlertList) DeepCopyInto added in v0.1.0

func (in *AlertList) DeepCopyInto(out *AlertList)

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

func (*AlertList) DeepCopyObject added in v0.1.0

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

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

type AlertSpec added in v0.1.0

type AlertSpec struct {

	// Foo is an example field of Alert. Edit cluster_types.go to remove/update
	Address string `json:"address,omitempty"`
	Token   string `json:"token,omitempty"`
	Sign    string `json:"sign,omitempty"`
}

AlertSpec defines the desired state of Alert

func (*AlertSpec) DeepCopy added in v0.1.0

func (in *AlertSpec) DeepCopy() *AlertSpec

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

func (*AlertSpec) DeepCopyInto added in v0.1.0

func (in *AlertSpec) DeepCopyInto(out *AlertSpec)

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

type AlertStatus added in v0.1.0

type AlertStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of alert
	// Important: Run "make" to regenerate code after modifying this file
	AlertCount map[string]int `json:"alertCount,omitempty"`
}

AlertStatus defines the observed state of Alert

func (*AlertStatus) DeepCopy added in v0.1.0

func (in *AlertStatus) DeepCopy() *AlertStatus

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

func (*AlertStatus) DeepCopyInto added in v0.1.0

func (in *AlertStatus) DeepCopyInto(out *AlertStatus)

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

type CheckerStatus

type CheckerStatus string
const (
	CheckerStatusError   CheckerStatus = "ERROR"
	CheckerStatusWARN    CheckerStatus = "WARN"
	CheckerStatusUNKNOWN CheckerStatus = "UNKNOWN"
	CheckerStatusInfo    CheckerStatus = "INFO"
	CheckerStatusPass    CheckerStatus = "PASS"
)

func (CheckerStatus) Priority

func (c CheckerStatus) Priority() int

type Cluster

type Cluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ClusterSpec   `json:"spec,omitempty"`
	Status ClusterStatus `json:"status,omitempty"`
}

Cluster is the Schema for the clusters API

func (*Cluster) DeepCopy

func (in *Cluster) DeepCopy() *Cluster

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

func (*Cluster) DeepCopyInto

func (in *Cluster) DeepCopyInto(out *Cluster)

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

func (*Cluster) DeepCopyObject

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

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

func (*Cluster) Default

func (c *Cluster) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Cluster) SetupWebhookWithManager

func (c *Cluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Cluster) ValidateCreate

func (c *Cluster) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Cluster) ValidateDelete

func (c *Cluster) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Cluster) ValidateUpdate

func (c *Cluster) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ClusterConfig

type ClusterConfig struct {
	Address         string `json:"address"`
	Token           string `json:"token"`
	CACert          string `json:"caCert"`
	CertData        string `json:"certData"`
	KeyData         string `json:"keyData"`
	ProbeNamespaces string `json:"probeNamespaces"`
}

func (*ClusterConfig) DeepCopy

func (in *ClusterConfig) DeepCopy() *ClusterConfig

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

func (*ClusterConfig) DeepCopyInto

func (in *ClusterConfig) DeepCopyInto(out *ClusterConfig)

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

type ClusterList

type ClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Cluster `json:"items"`
}

ClusterList contains a list of Cluster

func (*ClusterList) DeepCopy

func (in *ClusterList) DeepCopy() *ClusterList

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

func (*ClusterList) DeepCopyInto

func (in *ClusterList) DeepCopyInto(out *ClusterList)

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

func (*ClusterList) DeepCopyObject

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

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

type ClusterSpec

type ClusterSpec struct {

	// Foo is an example field of Cluster. Edit cluster_types.go to remove/update
	K8sVersion    string        `json:"k8sVersion,omitempty"`
	ClusterConfig ClusterConfig `json:"clusterConfig,omitempty"`
	ExtraInfo     []ExtraVar    `json:"extraInfo,omitempty"`
}

ClusterSpec defines the desired state of Cluster

func (*ClusterSpec) DeepCopy

func (in *ClusterSpec) DeepCopy() *ClusterSpec

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

func (*ClusterSpec) DeepCopyInto

func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)

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

type ClusterStatus

type ClusterStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	HeartBeatTimeStamp string          `json:"heartBeatTimeStamp,omitempty"`
	NodeCount          int             `json:"nodeCount,omitempty"`
	AttachedProbes     []string        `json:"attachedProbes,omitempty"`
	Checkers           string          `json:"checkers,omitempty"`
	OnceProbeList      []OnceProbeItem `json:"onceProbeList,omitempty"`
}

ClusterStatus defines the observed state of Cluster

func (*ClusterStatus) DeepCopy

func (in *ClusterStatus) DeepCopy() *ClusterStatus

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

func (*ClusterStatus) DeepCopyInto

func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)

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

type Config added in v0.1.0

type Config struct {
	Name string         `json:"name,omitempty"`
	Env  []apiv1.EnvVar `json:"env,omitempty"`
}

Checker defines the desired state of Checker

func (*Config) DeepCopy added in v0.1.0

func (in *Config) DeepCopy() *Config

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

func (*Config) DeepCopyInto added in v0.1.0

func (in *Config) DeepCopyInto(out *Config)

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

type ExtraVar

type ExtraVar struct {
	Name  string `json:"name" protobuf:"bytes,1,opt,name=name"`
	Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"`
}

func (*ExtraVar) DeepCopy

func (in *ExtraVar) DeepCopy() *ExtraVar

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

func (*ExtraVar) DeepCopyInto

func (in *ExtraVar) DeepCopyInto(out *ExtraVar)

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

type OnceProbeItem added in v0.1.0

type OnceProbeItem struct {
	ID         string   `json:"id,omitempty"`
	CreateTime string   `json:"createTime,omitempty"`
	FinishTime string   `json:"finishTime,omitempty"`
	Probes     []string `json:"probes,omitempty"`
}

func (*OnceProbeItem) DeepCopy added in v0.1.0

func (in *OnceProbeItem) DeepCopy() *OnceProbeItem

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

func (*OnceProbeItem) DeepCopyInto added in v0.1.0

func (in *OnceProbeItem) DeepCopyInto(out *OnceProbeItem)

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

type Policy

type Policy struct {
	// unit: minute
	RunInterval int `json:"runInterval,omitempty"`
}

func (*Policy) DeepCopy

func (in *Policy) DeepCopy() *Policy

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

func (*Policy) DeepCopyInto

func (in *Policy) DeepCopyInto(out *Policy)

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

type Probe

type Probe struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ProbeSpec   `json:"spec,omitempty"`
	Status ProbeStates `json:"status,omitempty"`
}

Probe is the Schema for the probes API

func (*Probe) DeepCopy

func (in *Probe) DeepCopy() *Probe

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

func (*Probe) DeepCopyInto

func (in *Probe) DeepCopyInto(out *Probe)

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

func (*Probe) DeepCopyObject

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

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

func (*Probe) Default

func (p *Probe) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*Probe) SetupWebhookWithManager

func (p *Probe) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*Probe) ValidateCreate

func (p *Probe) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*Probe) ValidateDelete

func (p *Probe) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*Probe) ValidateUpdate

func (p *Probe) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type ProbeCheckerStatus

type ProbeCheckerStatus struct {
	// checker name
	Name string `json:"name"`
	// ERROR/WARN/WARN/UNKNOWN
	Status CheckerStatus `json:"status,omitempty"`
	// if not ok, keep error message
	Message string       `json:"message,omitempty"`
	LastRun *metav1.Time `json:"lastRun,omitempty"`
}

func (*ProbeCheckerStatus) DeepCopy

func (in *ProbeCheckerStatus) DeepCopy() *ProbeCheckerStatus

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

func (*ProbeCheckerStatus) DeepCopyInto

func (in *ProbeCheckerStatus) DeepCopyInto(out *ProbeCheckerStatus)

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

func (ProbeCheckerStatus) Validate

func (in ProbeCheckerStatus) Validate() error

type ProbeList

type ProbeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`

	Items []Probe `json:"items,omitempty"`
}

ProbeList contains a list of Probe

func (*ProbeList) DeepCopy

func (in *ProbeList) DeepCopy() *ProbeList

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

func (*ProbeList) DeepCopyInto

func (in *ProbeList) DeepCopyInto(out *ProbeList)

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

func (*ProbeList) DeepCopyObject

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

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

type ProbeSpec

type ProbeSpec struct {
	Policy   Policy        `json:"policy,omitempty"`
	Template apiv1.PodSpec `json:"template,omitempty"`
	Configs  []Config      `json:"configs,omitempty"`
}

ProbeSpec defines the desired state of Probe

func (*ProbeSpec) DeepCopy

func (in *ProbeSpec) DeepCopy() *ProbeSpec

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

func (*ProbeSpec) DeepCopyInto

func (in *ProbeSpec) DeepCopyInto(out *ProbeSpec)

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

type ProbeStates

type ProbeStates struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	MD5   string `json:"md5,omitempty"`
	Phase string `json:"phase,omitempty"`
}

ProbeStatus defines the observed state of Probe

func (*ProbeStates) DeepCopy

func (in *ProbeStates) DeepCopy() *ProbeStates

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

func (*ProbeStates) DeepCopyInto

func (in *ProbeStates) DeepCopyInto(out *ProbeStates)

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

type ProbeStatus

type ProbeStatus struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ProbeStatusSpec   `json:"spec,omitempty"`
	Status ProbeStatusStates `json:"status,omitempty"`
}

ProbeStatus is the Schema for the probestatuses API

func (*ProbeStatus) DeepCopy

func (in *ProbeStatus) DeepCopy() *ProbeStatus

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

func (*ProbeStatus) DeepCopyInto

func (in *ProbeStatus) DeepCopyInto(out *ProbeStatus)

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

func (*ProbeStatus) DeepCopyObject

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

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

type ProbeStatusList

type ProbeStatusList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []ProbeStatus `json:"items"`
}

ProbeStatusList contains a list of ProbeStatus

func (*ProbeStatusList) DeepCopy

func (in *ProbeStatusList) DeepCopy() *ProbeStatusList

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

func (*ProbeStatusList) DeepCopyInto

func (in *ProbeStatusList) DeepCopyInto(out *ProbeStatusList)

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

func (*ProbeStatusList) DeepCopyObject

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

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

type ProbeStatusSpec

type ProbeStatusSpec struct {
	Checkers []ProbeCheckerStatus `json:"checkers,omitempty"`
}

func (*ProbeStatusSpec) DeepCopy

func (in *ProbeStatusSpec) DeepCopy() *ProbeStatusSpec

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

func (*ProbeStatusSpec) DeepCopyInto

func (in *ProbeStatusSpec) DeepCopyInto(out *ProbeStatusSpec)

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

type ProbeStatusStates

type ProbeStatusStates struct {
	Status CheckerStatus `json:"status,omitempty"`
	// if not ok, keep error message
	Message string       `json:"message,omitempty"`
	LastRun *metav1.Time `json:"lastRun,omitempty"`
}

ProbeStatusStatus defines the observed state of ProbeStatus

func (*ProbeStatusStates) DeepCopy

func (in *ProbeStatusStates) DeepCopy() *ProbeStatusStates

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

func (*ProbeStatusStates) DeepCopyInto

func (in *ProbeStatusStates) DeepCopyInto(out *ProbeStatusStates)

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

type ReportProbeStatusSpec added in v0.1.0

type ReportProbeStatusSpec struct {
	ProbeName          string `json:"probeName"`
	ProbeNamespace     string `json:"probeNamespace"`
	ProbeCheckerStatus `json:",inline"`
	Checkers           []ProbeCheckerStatus `json:"checkers"`
}

Client report probe status struct in sdk

func (*ReportProbeStatusSpec) DeepCopy added in v0.1.0

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

func (*ReportProbeStatusSpec) DeepCopyInto added in v0.1.0

func (in *ReportProbeStatusSpec) DeepCopyInto(out *ReportProbeStatusSpec)

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

Jump to

Keyboard shortcuts

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