-
Notifications
You must be signed in to change notification settings - Fork 255
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
Remove k8s client validity check from pkg/flags #1807
Remove k8s client validity check from pkg/flags #1807
Conversation
With the addition of `cli/pkg/cli/prerun` to `pkg/cmd/bundle` in tektoncd#1575 the validity of the Kubernetes REST client is checked via invocation of `pkg/flags.InitParams` where it fails with: ``` Error: Couldn't get kubeConfiguration namespace: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable ``` A valid Kuberenets configuration should not be supplied for `tkn bundle` commands, so this removes verifying that the Kuberenets configuration is valid from `pkg/flags.InitParams`. Seems that the same check for validity is preformed whenever invocation of `pkg/cli.Params.Clients` is used regardless, so having a check in the `InitParams` needlessly enforces the requirement of valid Kubernetes configuration.
Hi @zregvart. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the 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. |
For `tkn bundle push` a k8s client is initialized, if the command is run without a valid Kubernetes configuration it'll fail. This provides a fake Kubernetes configuration file, and using the `KUBECONFIG` environment variable configures the k8s client to use it. See tektoncd/cli#1807
/ok-to-test |
/retest |
For `tkn bundle push` a k8s client is initialized, if the command is run without a valid Kubernetes configuration it'll fail. This provides a fake Kubernetes configuration file, and using the `KUBECONFIG` environment variable configures the k8s client to use it. See tektoncd/cli#1807
For `tkn bundle push` a k8s client is initialized, if the command is run without a valid Kubernetes configuration it'll fail. This provides a fake Kubernetes configuration file, and using the `KUBECONFIG` environment variable configures the k8s client to use it. See tektoncd/cli#1807
For `tkn bundle push` a k8s client is initialized, if the command is run without a valid Kubernetes configuration it'll fail. This provides a fake Kubernetes configuration file, and using the `KUBECONFIG` environment variable configures the k8s client to use it. See tektoncd/cli#1807
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @pradeepitm12 @piyush-garg @vdemeester
we might have to cut a patch release for this
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vinamra28 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
#1806 | [vinamra28] Bump chocolatey package to 0.28.0 | 2022/11/25-07:58 #1805 | [vinamra28] Bump version to v0.28.0 in README and releases.md | 2022/11/27-12:04 #1809 | [dependabot[bot]] Bump golang.org/x/sys from 0.2.0 to 0.3.0 | 2022/12/06-12:48 #1810 | [dependabot[bot]] Bump go.uber.org/zap from 1.23.0 to 1.24.0 | 2022/12/06-13:24 #1807 | [Zoran Regvart] Remove k8s client validity check from pkg/flags | 2022/12/06-13:58 #1811 | [dependabot[bot]] Bump github.com/sigstore/cosign from 1.12.1 to 1.13.1 | 2022/12/06-15:38 #1812 | [dependabot[bot]] Bump github.com/sigstore/sigstore from 1.4.5 to 1.4.6 | 2022/12/06-16:16 #1813 | [dependabot[bot]] Bump golang.org/x/net from 0.2.0 to 0.3.0 | 2022/12/07-06:52 #1815 | [dependabot[bot]] Bump golang.org/x/time from 0.2.0 to 0.3.0 | 2022/12/07-07:24 #1816 | [dependabot[bot]] Bump github.com/hashicorp/go-hclog from 1.3.1 to 1.4.0 | 2022/12/07-08:22 null | [Piyush Garg] Bump tektoncd/pipeline to v0.42.0 | 2022/12/07-09:30 null | [dependabot[bot]] Bump golang.org/x/crypto from 0.3.0 to 0.4.0 | 2022/12/07-15:24 null | [dependabot[bot]] Bump golang.org/x/net from 0.3.0 to 0.4.0 | 2022/12/08-13:22 null | [dependabot[bot]] Bump github.com/hashicorp/go-plugin from 1.4.6 to 1.4.8 | 2022/12/08-14:26 null | [dependabot[bot]] Bump k8s.io/api from 0.25.4 to 0.25.5 | 2022/12/09-12:14 null | [dependabot[bot]] Bump github.com/sigstore/sigstore from 1.4.6 to 1.5.0 | 2022/12/12-07:04 null | [dependabot[bot]] Bump go.uber.org/multierr from 1.8.0 to 1.9.0 | 2022/12/13-11:20 null | [Piyush Garg] Fix e2e test broken | 2022/12/19-15:21 null | [dependabot[bot]] Bump github.com/docker/cli | 2022/12/19-16:11 null | [dependabot[bot]] Bump github.com/docker/docker | 2022/12/19-17:03 null | [dependabot[bot]] Bump github.com/hashicorp/vault/sdk from 0.6.1 to 0.6.2 | 2022/12/22-09:25 null | [Piyush Garg] Fix pipeline version to v0.42.0 in e2e | 2022/12/26-12:35 null | [vinamra28] Add support to pass CSI workspace | 2022/12/26-13:21 null | [Yongxuan Zhang] fix trusted resources docs error | 2023/01/05-08:29 null | [Piyush Garg] Bump tektoncd/chains to v0.14.0 | 2023/01/05-09:31 null | [dependabot[bot]] Bump golang.org/x/sys from 0.3.0 to 0.4.0 | 2023/01/05-10:11 null | [dependabot[bot]] Bump golang.org/x/term from 0.3.0 to 0.4.0 | 2023/01/05-10:53 null | [dependabot[bot]] Bump golang.org/x/net from 0.4.0 to 0.5.0 | 2023/01/05-11:27 null | [dependabot[bot]] Bump golang.org/x/crypto from 0.4.0 to 0.5.0 | 2023/01/05-12:01 null | [dependabot[bot]] Bump github.com/hashicorp/go-retryablehttp from 0.7.1 to 0.7.2 | 2023/01/05-12:37 Signed-off-by: Piyush Garg <pgarg@redhat.com>
Changes
With the addition of
cli/pkg/cli/prerun
topkg/cmd/bundle
in #1575 the validity of the Kubernetes REST client is checked via invocation ofpkg/flags.InitParams
where it fails with:A valid Kuberenets configuration should not be supplied for
tkn bundle
commands, so this removes verifying that the Kuberenets configuration is valid frompkg/flags.InitParams
. Seems that the same check for validity is preformed whenever invocation ofpkg/cli.Params.Clients
is used regardless, so having a check in theInitParams
needlessly enforces the requirement of valid Kubernetes configuration.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes