Closed ericsyh closed 3 months ago
After a discussion, we may consider another way to add a new column called the "Policy Status" which indicates to the topic, namespace policies API setting status.
NAME RESOURCE_NAME GENERATION OBSERVED_GENERATION READY POLICY_STATUS
deploy-pulsar-entities-entities-0d34fb75 persistent://cc/cdr/cdr-rated-ha 1 1 True True
READY
: only check the topic, ns critrical APIs like create, permission setting, delete. And if critrical APIs are good to execute will set the READY
status as true
which means the topic pubsub has no problem to work. POLICY_STATUS
: other APIs like policies setting, geo_replication enable etc will be checking under this status, if these APIs call fail the POLICY_STATUS
will be marked as false
.
Background
The current status for resources only have
true
orfalse
two options and resource-operator will check all API actions work will make that resource astrue
. But in some cases, a topic can works for pubsub but sometimes the configuration API call may fail for example to enable the topic level replication but this fail won't block the topic pubsub usage.Suggestion
So, we want to introduce a new status call the "warn" which defines the topic works for the create, permission setting API but fails on other topic policies API. The "warn" status means the topic can work for pubsub but other policies setting are failed so the client, app won't be impacted.