headlamp icon indicating copy to clipboard operation
headlamp copied to clipboard

Edit Resource Default YAML Should Not Include Non-Editable Fields (status, managedFields)

Open Guilamb opened this issue 8 months ago • 0 comments

Problem Description

When editing a Custom Resource Definition (CRD) in Headlamp, we have observed that certain sections in the YAML, such as status and managedFields, are not editable. Including these fields in the YAML editor is not helpful as they are not meant to be modified manually and would generate errors if edited.

Proposed Solution

To enhance the user experience and prevent potential errors, it would be beneficial to exclude non-editable fields like status and managedFields from the default YAML editor view when editing a CRD.

Kubernetes Documentation References

  • Status Field: The status field is used by the Kubernetes control plane to indicate the current state of the resource. It should not be edited manually by users. For more details, refer to the Kubernetes API Conventions.
  • ManagedFields Field: The managedFields field is used to track changes to the resource for server-side apply. More information can be found in the Server-Side Apply Documentation.

There was an issue on the kubernetes repo, but the change haven’t been made server side, so changes have to be made on the client size :

https://github.com/kubernetes/kubernetes/issues/90066

https://github.com/kubernetes/kubernetes/issues/90066#issuecomment-814461277

Guilamb avatar Jun 10 '24 09:06 Guilamb