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

kubectl --export is deprecated #669

Conversation

zburgermeiszter
Copy link

@zburgermeiszter zburgermeiszter commented Aug 4, 2021

kubectl --export is deprecated since kubectl v1.14 and has been removed in v1.18.

The new command is emulating the behavior of the deprecated --export flag using yq.

There is another kubectl command line with --export flag, but in our cluster the email address was provided as an environmental variable rather than a ConfigMap, therefore no tested command for it, but similar commands should work for both.

Signed-off-by: Zoltan Burgermeiszter zoltan@backenddoctor.com

…oved in v1.18.

The new command is emulating the behavior of the deprecated `--export` flag using `yq`.

Signed-off-by: Zoltan Burgermeiszter <zoltan@backenddoctor.com>
@jetstack-bot jetstack-bot added the dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. label Aug 4, 2021
@jetstack-bot
Copy link
Contributor

Hi @zburgermeiszter. Thanks for your PR.

I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@jetstack-bot jetstack-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 4, 2021
@netlify
Copy link

netlify bot commented Aug 4, 2021

✔️ Deploy Preview for cert-manager-website ready!

🔨 Explore the source changes: 417625c

🔍 Inspect the deploy log: https://app.netlify.com/sites/cert-manager-website/deploys/610c17732de88200070732b4

😎 Browse the preview: https://deploy-preview-669--cert-manager-website.netlify.app/docs/tutorials/acme/migrating-from-kube-lego

@jetstack-bot jetstack-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 4, 2021
@zburgermeiszter
Copy link
Author

/assign @jakexks

@jetstack-bot jetstack-bot added dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. and removed dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Aug 5, 2021
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zburgermeiszter
To complete the pull request process, please ask for approval from jakexks after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

…been removed in v1.18."

This reverts commit 6e7e5b4.

Signed-off-by: Zoltan Burgermeiszter <zoltan@backenddoctor.com>
Signed-off-by: Zoltan Burgermeiszter <zoltan@backenddoctor.com>
@jetstack-bot jetstack-bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. and removed dco-signoff: no Indicates that at least one commit in this pull request is missing the DCO sign-off message. labels Aug 5, 2021
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @zburgermeiszter

I haven't tested this, but I trust that you have.

I left a few comments and suggestions which you can address or ignore as you please.

@@ -88,16 +88,21 @@ the value of the `LEGO_SECRET_NAME` environment variable.
You should download a copy of this secret resource and save it in your local
directory:

Install [yq](https://kislyuk.github.io/yq/#installation) then run the command below:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two versions of yq when I googled for it. This seems to be the original version and according to my colleague @maelvls, it is the better of the two : cert-manager/cert-manager#3996 (comment)

The other tool that might be even better is kubectl neat which is mentioned in this SO article: https://stackoverflow.com/questions/61392206/kubectl-export-is-deprecated-any-alternative
and in kubernetes/kubernetes#90066

In that issue they also complain about the managedFields content which is apparently ommitted by kubectl get since v1.21 kubernetes/kubernetes#96878

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately with my current setup I'm unable to verify the behavior of the tools with the managedField. The cluster is still on 1.18.20and mykubectlversion is1.19.13`.

kubectl neat is a krew plugin and krew needs to be installed separately.
It feels an overkill for me compared to a simple yq installation.

What would be your preference?

@wallrj
Copy link
Member

wallrj commented Aug 12, 2021

/ok-to-test

@jetstack-bot jetstack-bot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 12, 2021
@zburgermeiszter
Copy link
Author

/retest

@jetstack-bot
Copy link
Contributor

@zburgermeiszter: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-cert-manager-website-verify 417625c link /test pull-cert-manager-website-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@jetstack-bot jetstack-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 13, 2022
@jetstack-bot
Copy link
Contributor

@zburgermeiszter: PR needs rebase.

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.

@zburgermeiszter zburgermeiszter deleted the fix/deprecated-export-flag branch May 22, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants