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

Remove requirement for certificate authority and certificate authority data in kubeconfig. #222

Merged
merged 2 commits into from
Dec 12, 2018

Conversation

twitchax
Copy link
Contributor

@twitchax twitchax commented Dec 6, 2018

This PR addresses #220.

Basically, we remove the requirement upon validation (and the impacted test) for certificate authority data in the kubeconfig file. The kubeconfig will work just fine in kubectl without this data if the CA is well-known (e.g., LetsEncrypt). Therefore, this PR removes that validation step, thereby pushing any failures due to unknown CA issues to the time of negotiation.

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Dec 6, 2018
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 6, 2018
@twitchax
Copy link
Contributor Author

twitchax commented Dec 6, 2018

I already signed an agreement and linked to GitHub. Maybe it needs time to propagate?

@brendandburns
Copy link
Contributor

@twitchax your commits have a different email address, I think, see:
https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Dec 6, 2018
@twitchax
Copy link
Contributor Author

twitchax commented Dec 6, 2018

@brendandburns, I see. Fixed and force pushed. Thanks!

Copy link
Contributor

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

I was a bit confused by the title - it looks like we're actually addressing the case where there is neither certificate-authority nor certificate-authority-data (previously it would work without certificate-authority-data but only if certificate-authority was provided, which it wasn't in the test config). Is that correct or have I misunderstood? If that is the intent, might be good to update the PR title/commit message. But "Ivan has misunderstood" is more likely I suspect...

@@ -155,45 +155,32 @@ private void SetClusterDetails(K8SConfiguration k8SConfig, Context activeContext

if (clusterDetails?.ClusterEndpoint == null)
{
throw new KubeConfigException($"Cluster not found for context {activeContext} in kubeconfig");
throw new KubeConfigException($"Cluster not found for context `{activeContext}` in kubeconfig");
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change for consistency with other error messages, or just personal preference? I feel backticks are a bit unusual in C# messages; if we do want to change, is there a reason to prefer them over single quotes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The backticks are personal preference, but I do think that specific names of things referenced in an error message should be delimited in one manner or another. Switch to single quotes or remove?

@twitchax twitchax changed the title Remove requirement for certificate authority data in kubeconfig. Remove requirement for certificate authority and certificate authority data in kubeconfig. Dec 6, 2018
@twitchax
Copy link
Contributor Author

twitchax commented Dec 6, 2018

@itowlson, correct on the confusing title. Fixed.

Update casing of `URL` at @itowlson suggestion.

Co-Authored-By: twitchax <twitchax@gmail.com>
@twitchax
Copy link
Contributor Author

@itowlson, ping. :)

@brendandburns
Copy link
Contributor

This looks good to me. @itowlson are you ok with the tick-marks?

@itowlson
Copy link
Contributor

I don't feel strongly enough about the use of backticks to think it's worth holing this PR for. I'd like to have a convention for how we delimit names but it can wait.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 10, 2018
@twitchax
Copy link
Contributor Author

@itowlson, I do not mind updating the PR for single quotes or removing them. Just let me know.

@itowlson
Copy link
Contributor

@twitchax Let's get this PR merged as is, and come back to the delimiter stuff as a separate issue across the codebase. And apologies for not getting back earlier on this.

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, twitchax

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 12, 2018
@k8s-ci-robot k8s-ci-robot merged commit b7f79c9 into kubernetes-client:master Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants