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

[client.secrets] createOrReplace is deprecated but its in the doku #4580

Closed
teimyBr opened this issue Nov 16, 2022 · 3 comments · Fixed by #4582
Closed

[client.secrets] createOrReplace is deprecated but its in the doku #4580

teimyBr opened this issue Nov 16, 2022 · 3 comments · Fixed by #4582
Assignees
Labels
doc good first issue Easy hack; Good issue for new contributors
Milestone

Comments

@teimyBr
Copy link

teimyBr commented Nov 16, 2022

Describe the bug

The method createOrReplace(Secret) from the type ItemWritableOperation is deprecated

but this is in the doku
Create or Replace an existing Secret:
Secret createdSecret = client.secrets().inNamespace("default").createOrReplace(secret1);
at https://github.com/fabric8io/kubernetes-client/blob/master/doc/CHEATSHEET.md#secret

Can you remove it and write something how to do it.

So i can i replace a secret ?

delete and create ?

Fabric8 Kubernetes Client version

6.2.0

Steps to reproduce

Look at the doku

Create or Replace an existing Secret:
Secret createdSecret = client.secrets().inNamespace("default").createOrReplace(secret1);

Expected behavior

Doku is right

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.23

Environment

Linux

Fabric8 Kubernetes Client Logs

No response

Additional context

No response

@manusa
Copy link
Member

manusa commented Nov 16, 2022

Secret createdSecret = client.secrets().inNamespace("default").createOrReplace(secret1);

Should be changed to

Secret createdSecret = client.secrets().inNamespace("default").resource(secret1).createOrReplace();

@manusa manusa added doc good first issue Easy hack; Good issue for new contributors labels Nov 16, 2022
@teimyBr
Copy link
Author

teimyBr commented Nov 16, 2022

Yes thanks now it works.

@SaumyaBhushan
Copy link
Contributor

Hi @manusa Can I take this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc good first issue Easy hack; Good issue for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants