-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Bug: in-cluster config is passing ssl_ca_cert file path instead of the content of the file #2143
Comments
Yeah.. Is there a way to pass cert data instead of ca file path for config.ssl_ca_cert? |
Agreed it seems to be a bug that the code is only passing the filename instead of reading the content. Would be good if we can have a test to catch the bug. /help |
@roycaihw: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
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. |
This is still a bug, cannot use ansible k8s_info on a k3s node where the ~/.kube/config just contains |
I also need the solution on the same, we have the requirement to pick the CA certificates from the databases as we are managing thousands of kubernetes clusters and could not maintation CA or kubeconfig file individually for each. |
@roycaihw I can help on this one. Want me to draft PR? |
When using kubectl the go library defaults to reading both settings, but the python client only reads the certificate-authority setting in the get_cluster_info. I found test cases mentioning certificate-authority-data but its never tested. Would the approach be similar to kubectl to add support for certificate-authority-data in this codebase? |
This line is giving ssl_ca_cert the file path instead of the content of the file
https://github.com/kubernetes-client/python/blame/36cfbe68a509d9b9d33395b22b6fa94d7d46c30f/kubernetes/base/config/incluster_config.py#L85C4-L85C4
The text was updated successfully, but these errors were encountered: