-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Raw CustomResource API: Unable to edit CustomResource via InputStream #2717
Raw CustomResource API: Unable to edit CustomResource via InputStream #2717
Comments
Your code is not describing an edit procedure but a replacement procedure. What you are expecting (if I'm not mistaken) is that the client gets the resource defined in your YAML and replaces the one in the cluster. What I see is that this operation should either not be allowed, or perform a diff operation on both resources. The outcome of this issue should either be: A) Remove these methods where I accept an InputStream as an argument to the edit methods. B) Create some sort of logic that will retrieve the edited resource from the cluster, and a merge operation will be performed with the resource loaded from the local YAML. Fields defined in the local YAML should prevail on top of those existent in the cluster defined resource. |
I think we can cover B separately by providing better patching support #2645 |
…tionsImpl taking InputStream arguments As discussed in fabric8io#2717, it's not a good idea to take InputStream for edit() methods which simply does a PATCH to Kubernetes APIServer.
let's say I have a CustomResource
Dummy
present in my kubernetes cluster like this:If I try to edit
first-dummy
by providing contents via anInputStream
like this:I'm getting this error:
I don't face this error when providing the edited resource as a string or Hashmap.
The text was updated successfully, but these errors were encountered: