-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When creating a pod, switching between config view and yaml view breaks the pod spec #10171
Comments
There appears to be quite a few issues with the "Edit as YAML" button for the Pod form. Most of these problems have to deal with design intricacies of incorporating a Workload (Pod) into a form primarily designed for Workload Resources (Deployments, ReplicaSet, StatefulSets, etc.) 1. Clicking "Edit as YAML" generates an invalid pod spec while both creating and editing a pod. This issue seems to trace back to the form's inception 2. As mentioned in the issue description, the root cause lies in the form's expectation of data shaped as To address this problem in the form, we currently mutate the shape of I'm considering several approaches to tackle this issue:
I'm not sold on either approach at the moment and I think this problem requires more thought and design before moving forward to fix it. I'll continue to investigate and will follow up with more details as I learn more. Footnotes |
This will be a big thing to tackle since we should refactor how we handle pods. |
Also reported in #12938 so I'll close that and leave this in place but we should consider if a back port is feasible, mindful that earlier we thought this may be a substantial undertaking. |
To reproduce:
Result:
The pod now has
spec.template.spec.containers
defined instead ofspec.containers
and creation fails.Additional Context
spec.template.spec.containers
would be correct for a workload. There appear to be some shenanigans going on behind-the-scenes with pod creation/editing in order to use the same form as workloads.https://github.com/rancher/dashboard/blob/master/shell/edit/workload/mixins/workload.js#L181-L202
The text was updated successfully, but these errors were encountered: