# 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.
- Exporter
- ExporterList
- ExporterSinks
- ExporterSpec
- ExporterWebhookSink
- Ruler
- RulerAlertmanagerSink
- RulerList
- RulerSinks
- RulerSpec
- RulerStdoutSink
- RulerWebhookSink
- ServiceReference
- EventRule
- Rule
- RuleList
- RuleSpec
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 |
ExporterList contains a list of Exporter
Field | Description | Scheme | Required |
---|---|---|---|
metadata | metav1.ListMeta | false | |
items | List of Exporters | []Exporter | true |
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 |
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 |
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 |
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 |
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 |
RulerList contains a list of Ruler
Field | Description | Scheme | Required |
---|---|---|---|
metadata | metav1.ListMeta | false | |
items | List of Rulers | []Ruler | true |
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 |
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 |
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 |
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 |
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 |
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 |
Rule is the Schema for the Rule API
Field | Description | Scheme | Required |
---|---|---|---|
metadata | metav1.ObjectMeta | false | |
spec | RuleSpec | true | |
status | RuleStatus | false |
RuleList contains a list of Rule
Field | Description | Scheme | Required |
---|---|---|---|
metadata | metav1.ListMeta | false | |
items | []Rule | true |
RuleSpec defines the desired state of Rule
Field | Description | Scheme | Required |
---|---|---|---|
rules | []EventRule | false |