Skip to content

Eventing CR ​

Use the Eventing custom resource (CR) to configure global settings for the Eventing module, such as the backend type, logging level, and resource allocations for the Eventing Publisher Proxy.

You can have only one Eventing CR in your cluster, which must be in the kyma-system namespace.

Many fields have default values, so you only have to specify the parameters you want to override. Built-in validation rules guide you when you edit the CR and prevent invalid configurations. For example, you're not allowed to delete an existing backend.

To see the current CRD in YAML format, run:

kubectl get crd eventings.operator.kyma-project.io -o yaml

Sample Custom Resource ​

Use the following sample CRs as guidance. Each can be applied immediately when you install Eventing Manager.

Eventing Module Status and Event Flow ​

The Eventing module can have one of the following status values (based on the status.state field):

  • Ready: All resources managed by the Eventing manager are deployed successfully and the Eventing backend is connected.
  • Processing: The resources managed by the Eventing manager are being created or updated.
  • Warning: There is a user input misconfiguration. For example:
    • No backend is configured.
    • The backend is NATS, but the NATS module is not installed.
    • The backend is EventMesh, but the EventMesh Secret is missing or invalid.
  • Error: An error occurred while reconciling the Eventing CR.

This status, combined with your backend configuration, determines how the module processes events. The following table describes how the event flow is affected by the backend configuration and infrastructure health.

Specified BackendBackend Infrastructure StatusEventing Module StatusEvent FlowRecommended User Action
NoneNot applicableWarningBlockedSpecify a backend (NATS or EventMesh) in the Eventing CR.
NATS/EventMeshProcessing (while initializing or switching backends)ProcessingBlockedWait for the Eventing module to complete initialization or backend switch.
NATSWarning (NATS module deletion is blocked)ReadyActiveInvestigate and resolve why NATS module can't be deleted.
NATSError (NATS is unavailable or Eventing cannot connect to it)WarningBlockedEnsure the NATS module is added and operational. Check connectivity between Eventing and NATS.
NATSMissing (NATS module is not installed)WarningBlockedAdd the NATS module to your cluster.
EventMeshError (EventMesh Secret is missing or invalid)WarningBlockedCreate or update the EventMesh Secret.
NATS/EventMeshError (backend available but error with, for example, Eventing Publisher Proxy deployment or subscription manager)ErrorBlockedReview Eventing logs and contact support if the issue persists.

Custom Resource Parameters ​

For details, see operator.kyma-project.io_eventings.yaml.

Eventing.operator.kyma-project.io/v1alpha1 ​

Spec:

ParameterTypeDescription
annotationsmap[string]stringAnnotations allows to add annotations to resources.
backendobjectBackend defines the active backend used by Eventing.
backend.​configobjectConfig defines configuration for the Eventing backend.
backend.​config.​domainstringDomain defines the cluster public domain used to configure the EventMesh Subscriptions and their corresponding ApiRules.
backend.​config.​eventMeshSecretstringEventMeshSecret defines the namespaced name of the Kubernetes Secret containing EventMesh credentials. The format of name is "namespace/name".
backend.​config.​eventTypePrefixstringEventTypePrefix defines the prefix for all event types.
backend.​config.​natsMaxMsgsPerTopicintegerNATSMaxMsgsPerTopic limits how many messages in the NATS stream to retain per subject.
backend.​config.​natsStreamMaxSize{integer or string}NATSStreamMaxSize defines the maximum storage size for stream data.
backend.​config.​natsStreamReplicasintegerNATSStreamReplicas defines the number of replicas for the stream.
backend.​config.​natsStreamStorageTypestringNATSStreamStorageType defines the storage type for stream data.
backend.​type (required)stringType defines which backend to use. The value is either EventMesh, or NATS.
labelsmap[string]stringLabels allows to add Labels to resources.
loggingobjectLogging defines the log level for eventing-manager.
logging.​logLevelstringLogLevel defines the log level.
publisherobjectPublisher defines the configurations for eventing-publisher-proxy.
publisher.​replicasobjectReplicas defines the scaling min/max for eventing-publisher-proxy.
publisher.​replicas.​maxintegerMax defines maximum number of replicas.
publisher.​replicas.​minintegerMin defines minimum number of replicas.
publisher.​resourcesobjectResources defines resources for eventing-publisher-proxy.
publisher.​resources.​claims[]objectClaims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers.
publisher.​resources.​claims.​name (required)stringName must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
publisher.​resources.​claims.​requeststringRequest is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request.
publisher.​resources.​limitsmap[string]{integer or string}Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
publisher.​resources.​requestsmap[string]{integer or string}Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/

Status:

ParameterTypeDescription
activeBackend (required)stringActiveBackend shows the backend currently used by the Eventing module.
conditions[]objectConditions contains the list of status conditions for this resource.
conditions.​lastTransitionTime (required)stringlastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
conditions.​message (required)stringmessage is a human readable message indicating details about the transition. This may be an empty string.
conditions.​observedGenerationintegerobservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
conditions.​reason (required)stringreason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
conditions.​status (required)stringstatus of the condition, one of True, False, Unknown.
conditions.​type (required)stringtype of condition in CamelCase or in foo.example.com/CamelCase.
publisherServicestringPublisherService is the Kubernetes Service for the Eventing Publisher Proxy.
specHash (required)integerBackendConfigHash is a hash of the spec.backend configuration, used internally to detect changes.
state (required)stringState defines the overall status of the Eventing custom resource. It can be Ready, Processing, Error, or Warning.