-
Bug
-
Resolution: Unresolved
-
Major
-
4.19.z, 4.20
-
None
Description of problem:
When updating a NetworkAttachmentDefinition with an empty spec, the validation returns an error preventing you from updating the object. Error from server (Forbidden): network-attachment-definitions.k8s.cni.cncf.io "empty-spec" is forbidden: expression 'oldObject == null || object == null || object.spec != oldObject.spec' resulted in error: no such key: spec
Version-Release number of selected component (if applicable):
4.19.7, 4.20
How reproducible:
Easily
Steps to Reproduce:
1. Create a NetworkAttachmentDefinition with an empty spec apiVersion: k8s.cni.cncf.io/v1 kind: NetworkAttachmentDefinition metadata: name: empty-spec namespace: default 2. Try and update it: kubectl patch network-attachment-definitions.k8s.cni.cncf.io empty-spec --type=json -p '[{"op": "add", "path": "/metadata/annotations/test", "value": "val"}]'
Actual results:
Error from server (Forbidden): network-attachment-definitions.k8s.cni.cncf.io "empty-spec" is forbidden: expression 'oldObject == null || object == null || object.spec != oldObject.spec' resulted in error: no such key: spec
Expected results:
Successful update
Additional info:
Issue is not present on 4.19.6 but shows up in 4.19.7 and on 4.20
- account is impacted by
-
CORENET-6292 Track bugs
-
- Closed
-
- blocks
-
OCPBUGS-60534 Error while validating NetworkAttachmentDefinition with empty spec
-
- Closed
-
- is cloned by
-
OCPBUGS-60534 Error while validating NetworkAttachmentDefinition with empty spec
-
- Closed
-
- links to