Skip to content
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

fix(kube-api): add 'forceApply' parameter to kube-api #25

Closed
wants to merge 1 commit into from

Conversation

self-transition
Copy link
Member

@self-transition self-transition commented Nov 16, 2023

In the original implementation, we would call the put and patch api in applyYaml to get whether the current resource exists or not, but at the time we assumed that all applyYaml's carried the '--force' parameter.
However, when two resources with the same name are placed by different users, the latter will be incorrectly called by the patch api and override the earlier.
In this MR, we have added the forceApply parameter and set it to false when calling create.When it's not forceApply and the resource exists, throw an error.

@self-transition self-transition added the enhancement New feature or request label Nov 16, 2023
@Yuyz0112
Copy link
Member

没太懂这个 flag 的预期。使用场景是什么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants