Editing the type of a Secret that already exists should not be allowed
Created by: serenashe
Describe the bug An error message from the backend appears when I try to change the Secret type.
The following screenshots show the issue:
To Reproduce Steps to reproduce the behavior:
- Log in to the KubeSphere console and go to your cluster.
- On the left navigation pane, click Configurations > Secrets.
- On the Secret page, click the three dots on the right of a Secret, and then select Edit Secret.
- Under Type, select a different type on the drop-down list and click √.
- See an error message from the backend.
Expected behavior In my opinion, users should be prevented from editing or selecting a different Secret type because as you can see from the backend error message, this field is immutable.
Please take a look, thanks :)