Skip to content

CR editor does not automatically set the storage apiVersion #4223

@damsien

Description

@damsien

Describe the bug

When creating, updating or viewing the yaml of a custom resource. It automatically sets the apiVersion of the editor to the first item in the list of versions of the associated CustomResourceDefinition. The best practice would be to automatically set the storage version.

To Reproduce

Prerequisites:
Having a CRD that have multiple versions installed on the cluster

Steps to reproduce the bug:

  1. Go to the 'Custom Resources' page of that CRD
  2. Click 'Create' to enter in the editor
  3. See the apiVersion not set to the actual storage version of the CRD

Environment (please provide info about your environment):

  • Installation type: In-Cluster via Hemù
  • Headlamp Version: 0.38.0

Are you able to fix this issue?

Yes, here is the associated PR: #4224

Additional Context

The CRD versions:
Image

The apiVersion automatically set when creating the Custom Resource:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions