Skip to content

Latest commit

 

History

History
237 lines (166 loc) · 11.1 KB

api.md

File metadata and controls

237 lines (166 loc) · 11.1 KB

# API Docs

This Document documents the types introduced by the Kube-Events to be consumed by users.

Note this document is generated from code comments. When contributing a change to this document please do so by changing the code comments.

Table of Contents

Exporter

Exporter is the Schema for the exporter API

Field Description Scheme Required
metadata metav1.ObjectMeta false
spec Spec defines the specification of the desired behavior of the Exporter. ExporterSpec true
status ExporterStatus false

Back to TOC

ExporterList

ExporterList contains a list of Exporter

Field Description Scheme Required
metadata metav1.ListMeta false
items List of Exporters []Exporter true

Back to TOC

ExporterSinks

ExporterSinks defines a set of sinks for Events Exporter

Field Description Scheme Required
webhooks Webhooks is a list of ExporterWebhookSink []*ExporterWebhookSink false
stdout Stdout represents whether to write events to stdout. Output when configure an empty struct {}, but do nothing when no configuration *ExporterStdoutSink false

Back to TOC

ExporterSpec

ExporterSpec defines the desired state of Exporter

Field Description Scheme Required
image Docker image of events exporter string true
imagePullPolicy Image pull policy. One of Always, Never, IfNotPresent. corev1.PullPolicy false
affinity If specified, the pod's scheduling constraints. *corev1.Affinity false
nodeSelector Define which Nodes the Pods are scheduled on. map[string]string false
tolerations If specified, the pod's tolerations. []corev1.Toleration false
resources Resources defines resources requests and limits for single Pod. corev1.ResourceRequirements false
sinks Sinks defines details of events sinks *ExporterSinks false

Back to TOC

ExporterWebhookSink

ExporterWebhookSink defines parameters for webhook sink of Events Exporter.

Field Description Scheme Required
url url gives the location of the webhook, in standard URL form (scheme://host:port/path). Exactly one of url or service must be specified. string false
service service is a reference to the service for this webhook. Either service or url must be specified. If the webhook is running within the cluster, then you should use service. *ServiceReference false

Back to TOC

Ruler

Ruler is the Schema for the ruler API

Field Description Scheme Required
metadata metav1.ObjectMeta false
spec Spec defines the specification of the desired behavior of the Ruler. RulerSpec true
status RulerStatus false

Back to TOC

RulerAlertmanagerSink

RulerAlertmanagerSink is a sink to alertmanager service on k8s

Field Description Scheme Required
namespace namespace is the namespace of the alertmanager service. string true
name name is the name of the alertmanager service. string true
port port is the port on the alertmanager service. Default to 9093. port should be a valid port number (1-65535, inclusive). *int false
targetPort TargetPort is the port to access on the backend instances targeted by the alertmanager service. If this is not specified, the value of the 'port' field is used. *int false

Back to TOC

RulerList

RulerList contains a list of Ruler

Field Description Scheme Required
metadata metav1.ListMeta false
items List of Rulers []Ruler true

Back to TOC

RulerSinks

RulerSinks defines a set of sinks for Events Ruler

Field Description Scheme Required
alertmanagers Alertmanager sinks to which events alerts will be sent. []*RulerAlertmanagerSink false
alertmanager An alertmanager sink to which events alerts will be sent. Deprecated, please use alertmanagers instead. *RulerAlertmanagerSink false
webhooks Webhooks is a list of RulerWebhookSink to which notifications or alerts can sink []*RulerWebhookSink false
stdout Stdout can config write notifications or alerts to stdout; do nothing when no configuration *RulerStdoutSink false

Back to TOC

RulerSpec

RulerSpec defines the desired state of Ruler

Field Description Scheme Required
replicas Number of desired pods. Defaults to 1. *int32 false
image Docker image of events ruler string true
imagePullPolicy Image pull policy. One of Always, Never, IfNotPresent. corev1.PullPolicy false
affinity If specified, the pod's scheduling constraints. *corev1.Affinity false
nodeSelector Define which Nodes the Pods are scheduled on. map[string]string false
tolerations If specified, the pod's tolerations. []corev1.Toleration false
resources Resources defines resources requests and limits for single Pod. corev1.ResourceRequirements false
ruleNamespaceSelector Namespaces to be selected for Rules discovery. If unspecified, discover Rule instances from all namespaces. *metav1.LabelSelector false
ruleSelector A selector to select Rules instances. *metav1.LabelSelector false
sinks Sinks defines sinks detail of this ruler *RulerSinks false

Back to TOC

RulerStdoutSink

RulerStdoutSink defines parameters for stdout sink of Events Ruler.

Field Description Scheme Required
type Type represents that the sink is for notification or alert. Available values are notification and alert RulerSinkType true

Back to TOC

RulerWebhookSink

RulerWebhookSink defines parameters for webhook sink of Events Ruler.

Field Description Scheme Required
type Type represents that the sink is for notification or alert. Available values are notification and alert RulerSinkType true
url url gives the location of the webhook, in standard URL form (scheme://host:port/path). Exactly one of url or service must be specified. string false
service service is a reference to the service for this webhook. Either service or url must be specified. If the webhook is running within the cluster, then you should use service. *ServiceReference false

Back to TOC

ServiceReference

ServiceReference holds a reference to k8s Service

Field Description Scheme Required
namespace namespace is the namespace of the service. string true
name name is the name of the service. string true
port port is the port on the service and should be a valid port number (1-65535, inclusive). *int false
path path is an optional URL path which will be sent in any request to this service. string false

Back to TOC

EventRule

EventRule describes a notification or alert rule

Field Description Scheme Required
name Name is simple name of rule string false
condition Condition is a string similar with the where part of sql. See supported grammar details on https://github.com/kubesphere/event-rule-engine#supported-grammer . For example: type="Warning" and involvedObject.kind="Pod" and reason="FailedMount" string false
labels Labels map[string]string false
annotations Values of Annotations can use format string with the fields of the event. For example: {"message": "%message"} map[string]string false
enable Enable is whether to enable the rule, default to false bool false
type Type represents that the rule is for notification or alert. Available values are notification and alert RuleType false

Back to TOC

Rule

Rule is the Schema for the Rule API

Field Description Scheme Required
metadata metav1.ObjectMeta false
spec RuleSpec true
status RuleStatus false

Back to TOC

RuleList

RuleList contains a list of Rule

Field Description Scheme Required
metadata metav1.ListMeta false
items []Rule true

Back to TOC

RuleSpec

RuleSpec defines the desired state of Rule

Field Description Scheme Required
rules []EventRule false

Back to TOC