From 232c19a197f9e4a2c4cee249f293f94a45acd162 Mon Sep 17 00:00:00 2001 From: Mansur Uralov Date: Thu, 14 Dec 2023 07:18:59 +0100 Subject: [PATCH 1/5] Document Eventing States More Detailed --- api/operator/v1alpha1/eventing_types.go | 2 +- docs/user/02-configuration.md | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/api/operator/v1alpha1/eventing_types.go b/api/operator/v1alpha1/eventing_types.go index 64879ab2..25a44090 100644 --- a/api/operator/v1alpha1/eventing_types.go +++ b/api/operator/v1alpha1/eventing_types.go @@ -107,7 +107,7 @@ type EventingStatus struct { 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. + // It gets Warning state in case backend is not specified, 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"` diff --git a/docs/user/02-configuration.md b/docs/user/02-configuration.md index 902add5a..21d7e5ff 100644 --- a/docs/user/02-configuration.md +++ b/docs/user/02-configuration.md @@ -73,6 +73,17 @@ 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 | 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** (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, 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. See the next section for more details. | + +

More Details about Eventing CR state

+In the table below there is more information about the overall state of the Eventing CR. The State column has the overall state of the Eventing CR. The Backend Config column is part of the eventing CR that is either available or mistakenly not specified by a user. The Backend State column describes the state of the NATS backend or EventMesh secret existence. As indicated in the table, warnings are set in all cases where user action is required, e.g. the user needs to install the NATS module or create an EventMesh secret. + +| Backend Config | Backend State | State | +|---------------------------|---------------------------|----------------| +| available | no NATS backend available | Warning| +| not available | | Warning | +| available | no EventMesh secret | Warning | +| available | error cases not caused by a user | Error | +| available | creating/updating eventing module | Processing | \ No newline at end of file From aee0a294b85c433b2642e4f8cb3cf5a791b9ed15 Mon Sep 17 00:00:00 2001 From: Mansur Uralov Date: Thu, 14 Dec 2023 11:33:37 +0100 Subject: [PATCH 2/5] Improve for Code Review Comments --- api/operator/v1alpha1/eventing_types.go | 2 +- docs/user/02-configuration.md | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/operator/v1alpha1/eventing_types.go b/api/operator/v1alpha1/eventing_types.go index 25a44090..aa454928 100644 --- a/api/operator/v1alpha1/eventing_types.go +++ b/api/operator/v1alpha1/eventing_types.go @@ -107,7 +107,7 @@ type EventingStatus struct { 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, NATS module is not installed or EventMesh secret is missing in the cluster. + // It gets Warning state in case backend is not specified, 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"` diff --git a/docs/user/02-configuration.md b/docs/user/02-configuration.md index 21d7e5ff..db59998a 100644 --- a/docs/user/02-configuration.md +++ b/docs/user/02-configuration.md @@ -78,7 +78,12 @@ Use the following sample CRs as guidance. Each can be applied immediately when y

More Details about Eventing CR state

-In the table below there is more information about the overall state of the Eventing CR. The State column has the overall state of the Eventing CR. The Backend Config column is part of the eventing CR that is either available or mistakenly not specified by a user. The Backend State column describes the state of the NATS backend or EventMesh secret existence. As indicated in the table, warnings are set in all cases where user action is required, e.g. the user needs to install the NATS module or create an EventMesh secret. +The following table provides more details on the overall state of the Eventing CR: +- The State column has the overall state of the Eventing CR. +- The Backend Config column is part of the eventing CR that is either available or mistakenly not specified by a user. +- The Backend State column describes the state of the NATS backend or EventMesh Secret existence. + +Warnings indicate that user action is required, that is, the user must install the NATS module or create an EventMesh Secret. | Backend Config | Backend State | State | |---------------------------|---------------------------|----------------| From 4ddd68594aa0d8846031a094f0dfa57890c2bdc3 Mon Sep 17 00:00:00 2001 From: Mansur Uralov Date: Mon, 18 Dec 2023 15:15:36 +0100 Subject: [PATCH 3/5] Improve for Code Review Comments --- docs/user/02-configuration.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/user/02-configuration.md b/docs/user/02-configuration.md index db59998a..f30d0f55 100644 --- a/docs/user/02-configuration.md +++ b/docs/user/02-configuration.md @@ -77,7 +77,7 @@ Use the following sample CRs as guidance. Each can be applied immediately when y -

More Details about Eventing CR state

+

More Details About Eventing CR State

The following table provides more details on the overall state of the Eventing CR: - The State column has the overall state of the Eventing CR. - The Backend Config column is part of the eventing CR that is either available or mistakenly not specified by a user. @@ -85,10 +85,12 @@ The following table provides more details on the overall state of the Eventing C Warnings indicate that user action is required, that is, the user must install the NATS module or create an EventMesh Secret. -| Backend Config | Backend State | State | -|---------------------------|---------------------------|----------------| -| available | no NATS backend available | Warning| -| not available | | Warning | -| available | no EventMesh secret | Warning | -| available | error cases not caused by a user | Error | -| available | creating/updating eventing module | Processing | \ No newline at end of file +| Backend Config | Backend State | Backend Type | Eventing State | Addition comment | +|---------------------------|---------------------------|----------------|----------------|----------| +| exists | Error (NATS ist unavailable or cannot be connected) | NATS | Warning | no events will be accepted / dispatched | +| exists | Missing | NATS | Warning | no events will be accepted / dispatched | +| exists | Warning (NATS deletion blocked) | NATS | Ready | events will be accepted / dispatched | +| missing | | NATS/EventMesh | Warning | no events will be accepted / dispatched | +| exists | Error (secret for EventMesh missing) | EventMesh | Warning | no events will be accepted / dispatched | +| exists | Error (cases not caused by a user) | NATS/EventMesh | Error | | +| exists | Processing (creating/updating eventing module) | NATS/EventMesh | Processing | | \ No newline at end of file From 779208d2e6e78438a2b385effa32595f411bde5d Mon Sep 17 00:00:00 2001 From: Mansur Uralov Date: Thu, 15 Feb 2024 12:03:42 +0100 Subject: [PATCH 4/5] Add more examples and sort the cases --- docs/user/02-configuration.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/user/02-configuration.md b/docs/user/02-configuration.md index f30d0f55..c98fef04 100644 --- a/docs/user/02-configuration.md +++ b/docs/user/02-configuration.md @@ -85,12 +85,12 @@ The following table provides more details on the overall state of the Eventing C Warnings indicate that user action is required, that is, the user must install the NATS module or create an EventMesh Secret. -| Backend Config | Backend State | Backend Type | Eventing State | Addition comment | +| Backend Config | Backend State | Backend Type | Eventing State | Impact on event flow | |---------------------------|---------------------------|----------------|----------------|----------| | exists | Error (NATS ist unavailable or cannot be connected) | NATS | Warning | no events will be accepted / dispatched | -| exists | Missing | NATS | Warning | no events will be accepted / dispatched | -| exists | Warning (NATS deletion blocked) | NATS | Ready | events will be accepted / dispatched | | missing | | NATS/EventMesh | Warning | no events will be accepted / dispatched | | exists | Error (secret for EventMesh missing) | EventMesh | Warning | no events will be accepted / dispatched | -| exists | Error (cases not caused by a user) | NATS/EventMesh | Error | | -| exists | Processing (creating/updating eventing module) | NATS/EventMesh | Processing | | \ No newline at end of file +| exists | Error (cases not caused by a user, e.g. cannot create EPP deployment or cannot start subscription manager although backend is available) | NATS/EventMesh | Error | no events will be accepted / dispatched | +| exists | Processing (mainly happens during initialization and backend switching) | NATS/EventMesh | Processing | no events will be accepted / dispatched | +| exists | Missing | NATS | Warning | no events will be accepted / dispatched | +| exists | Warning (NATS deletion blocked) | NATS | Ready | events will be accepted / dispatched | \ No newline at end of file From c27b4548cce53f282f3540d6ad72de507b6d1d01 Mon Sep 17 00:00:00 2001 From: Mansur Uralov Date: Thu, 15 Feb 2024 13:28:19 +0100 Subject: [PATCH 5/5] Apply the suggested order --- docs/user/02-configuration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user/02-configuration.md b/docs/user/02-configuration.md index c98fef04..086028a1 100644 --- a/docs/user/02-configuration.md +++ b/docs/user/02-configuration.md @@ -87,10 +87,10 @@ Warnings indicate that user action is required, that is, the user must install t | Backend Config | Backend State | Backend Type | Eventing State | Impact on event flow | |---------------------------|---------------------------|----------------|----------------|----------| +| exists | Warning (NATS deletion blocked) | NATS | Ready | events will be accepted / dispatched | +| exists | Processing (mainly happens during initialization and backend switching) | NATS/EventMesh | Processing | no events will be accepted / dispatched | | exists | Error (NATS ist unavailable or cannot be connected) | NATS | Warning | no events will be accepted / dispatched | | missing | | NATS/EventMesh | Warning | no events will be accepted / dispatched | +| exists | Missing | NATS | Warning | no events will be accepted / dispatched | | exists | Error (secret for EventMesh missing) | EventMesh | Warning | no events will be accepted / dispatched | | exists | Error (cases not caused by a user, e.g. cannot create EPP deployment or cannot start subscription manager although backend is available) | NATS/EventMesh | Error | no events will be accepted / dispatched | -| exists | Processing (mainly happens during initialization and backend switching) | NATS/EventMesh | Processing | no events will be accepted / dispatched | -| exists | Missing | NATS | Warning | no events will be accepted / dispatched | -| exists | Warning (NATS deletion blocked) | NATS | Ready | events will be accepted / dispatched | \ No newline at end of file