missing CR status when invalid option specified

Description

I have specified wrong option in the cr: "allowUnsafeConfigurations: aaa".
The operator logs are filled with this message:

But there is no status for custom resource:

Environment

None

Smart Checklist

Activity

Dmytro Zghoba November 24, 2021 at 9:30 AM

The issue is in parsing JSON stored in etcd. K8S API uses CRDs to validate CRs before storing them in etcd. but we do not provide any validation rules therefore allow any values to be stored in etcd. On operator side we cannot handle invalid types in JSON as CRDs validation rules are designed to be used for this and the feature is not supported by controller-runtime. we need to generate CRDs validation rules to never allow invalid types.

 

currently generation CRDs cannot be done. we need to make code changes to fix it. however, it requires a lot of testing because we can break current logic.

 

the work on it is postponed.

Dmytro Zghoba November 19, 2021 at 9:16 AM

I was not able to generate CRD with validation to prevent storing such invalid resources in etcd

Duplicate

Details

Assignee

Reporter

Needs Review

Yes

Needs QA

Yes

Affects versions

Priority

Smart Checklist

Created June 23, 2021 at 8:54 AM
Updated March 5, 2024 at 4:51 PM
Resolved March 7, 2023 at 3:44 PM