-
Notifications
You must be signed in to change notification settings - Fork 181
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
volume-requested-topology annotation should be YAML string for better readability #3109
Comments
cc @SandeepPissay , @akutz |
Please note the use of the |
A demonstrationFor what it is worth, here are steps to reproduce the multi-line YAML string as the annotation value:
CompatibilityYAML is a superset of JSON and thus it is possible to convert between the two. For example, the above object could also support setting JSON values in the annotation: 🌟 Please note
This example illustrates how a mutation webhook could be used to translate JSON --> YAML on any non-empty values for the annotation This way users can specify both JSON and YAML for input, but the output can always be YAML for improved readability. |
Thanks @aruneshpa @akutz for detailed feature request. |
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
The current way to specify the list of zones where a volume would be available is to specify a JSON blob as a value of the
volume-requested-topology
annotation. While this works, this quickly becomes unreadable for any human interaction and consumption. A cleaner way would be to use YAML strings. Here a comparison of both current and the proposed approach:Consider a scenario where a PVC is being made available in 5 zones (for illustration purpose). The value of the annotation starts to becomes unreadable.
The same PVC will look like this using the proposed YAML string approach:
YAML as a string also has an advantage of being able to identify any mistakes while crafting the object (essential for non automation/machine users).
What you expected to happen:
N/A
How to reproduce it (as minimally and precisely as possible):
Create a multi zone PVC and observe the JSON blob in the annotation.
Anything else we need to know?:
N/A
Skipping the env section since this is present on main.
The text was updated successfully, but these errors were encountered: