-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Unexpected behavior in "append" to array patch operation #5944
Comments
/area topology |
Let start documenting this for now @sbueringer |
/kind documentation |
I also have a situation where an add all array operation would be very useful. My template includes branching logic when skipping image repository tls verification. This could potentially be pulled out into separate patch definitions but it really complicates the logic and we need to make sure the ordering is correct so the system restart is called after the conditionally added values.
|
Thx for the additional use case. I think our main problem is how we would model this in the API. Currently, we are pretty close to the JSON patch spec (RFC 6902). |
We documented the limitation in "Writing a ClusterClass" (https://cluster-api.sigs.k8s.io/tasks/experimental-features/cluster-class/write-clusterclass.html) Let's close this issue in favor of #6245 regarding a potential implementation. /close |
@sbueringer: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
An append or prepend operation when attempting to patch a Cluster with ClusterClass can not be used to append or prepend one array onto an existing array. Currently the operation only supports adding a single value to the array. In a case where multiple values are required there needs to be a patch for each value.
If an array is added as a variable in an append operation reconciliation fails and an error like the below occurs:
For reference this error occurs with a patch and variable combination as below:
As a user I would expect the items in the variables array to be added to the target array by the patch. Instead I get a repeated error during reconciliation.
Possible solutions:
The text was updated successfully, but these errors were encountered: