Skip to content

Commit

Permalink
Document Warning State (#317)
Browse files Browse the repository at this point in the history
* Document Warning State
Write documentation in which cases Eventing CR state gets Warning state

* Improve for review comments

* Improve doc for second review
  • Loading branch information
muralov authored Dec 12, 2023
1 parent 2036473 commit 949ce03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 9 additions & 5 deletions api/operator/v1alpha1/eventing_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,15 @@ type Eventing struct {

// EventingStatus defines the observed state of Eventing.
type EventingStatus struct {
ActiveBackend BackendType `json:"activeBackend"`
BackendConfigHash int64 `json:"specHash"`
State string `json:"state"`
PublisherService string `json:"publisherService,omitempty"`
Conditions []kmetav1.Condition `json:"conditions,omitempty"`
ActiveBackend BackendType `json:"activeBackend"`
BackendConfigHash int64 `json:"specHash"`
// Can have one of the following values: Ready, Error, Processing, Warning. Ready state is set
// when all the resources are deployed successfully and backend is connected.
// It gets Warning state in case backend is not specified and NATS module is not installed or EventMesh secret is missing in the cluster.
// Error state is set when there is an error. Processing state is set if recources are being created or changed.
State string `json:"state"`
PublisherService string `json:"publisherService,omitempty"`
Conditions []kmetav1.Condition `json:"conditions,omitempty"`
}

// EventingSpec defines the desired state of Eventing.
Expand Down
8 changes: 6 additions & 2 deletions docs/user/02-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ The CustomResourceDefinition (CRD) `eventings.operator.kyma-project.io` describe

View the complete [Eventing CRD](https://github.com/kyma-project/eventing-manager/blob/main/config/crd/bases/operator.kyma-project.io_eventings.yaml) including detailed descriptions for each field.

The CRD is equipped with validation rules and defaulting, so the CR is automatically filled with sensible defaults. You can override the defaults. The validation rules provide guidance when you edit the CR.
The CRD is equipped with validation rules and defaulting, so the CR is automatically filled with default values.

You can override the defaults. However, you must make sure that a backend is set; otherwise the Eventing Manager does not create any resources and goes into warning state.

The validation rules provide guidance when you edit the CR. For example, you are not allowed to delete an existing backend.

## Examples

Expand Down Expand Up @@ -69,6 +73,6 @@ Use the following sample CRs as guidance. Each can be applied immediately when y
| **conditions.​type** (required) | string | type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) |
| **publisherService** | string | |
| **specHash** (required) | integer | |
| **state** (required) | string | |
| **state** (required) | string | Can have one of the following values: Ready, Error, Processing, Warning. Ready state is set when all the resources are deployed successfully and backend is connected. It gets Warning state in case backend is not specified and NATS module is not installed or EventMesh secret is missing in the cluster. Error state is set when there is an error. Processing state is set if recources are being created or changed. |

<!-- TABLE-END -->

0 comments on commit 949ce03

Please sign in to comment.