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

What's the difference between create and createOrReplace? #2696

Closed
yangjinlogic opened this issue Dec 24, 2020 · 2 comments
Closed

What's the difference between create and createOrReplace? #2696

yangjinlogic opened this issue Dec 24, 2020 · 2 comments
Labels
question status/stale Waiting on feedback Issues that require feedback from User/Other community members

Comments

@yangjinlogic
Copy link

What's the difference between create and createOrReplace?Whether if the RC existed it will replace it?

@rohanKanojia
Copy link
Member

@yangjinlogic : Hi, as per current implementation create just does a POST request to APIServer. createOrReplace also does POST but it has a fallback approach of doing a PUT in case 409 is received in the initial POST request. We are discussing to refactor createOrReplace(#2454 ) to behave more like kubectl apply(which ignores updates when there is no modification as compared to previous applied resource). Would appreciate it if you could share feedback on that.

@manusa manusa added question Waiting on feedback Issues that require feedback from User/Other community members labels Dec 30, 2020
@manusa
Copy link
Member

manusa commented Dec 30, 2020

Whether if the RC existed it will replace it?

Yes

...behave more like kubectl apply(which ignores updates when there is no modification as compared to previous applied resource)...

If the applicable resource was created previously using kubectl apply (The resource contains an annotation kubectl.kubernetes.io/last-applied-configuration with a JSON representation of the originally applied resource)

@stale stale bot closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question status/stale Waiting on feedback Issues that require feedback from User/Other community members
Projects
None yet
Development

No branches or pull requests

3 participants