Closed goern closed 4 years ago
To achieve the desired goal of ignoring the SSL certificate validity, please use @kopf.on.login()
handlers to produce a kopf.ConnectionInfo(..., verify=False, ...)
instance.
To make it more simple, kopf.login_via_pykube()
and kopf.login_via_client()
can be used inside of the handler instead of own config parsing, of which the returned ConnectionInfo
object can be modified with dataclasses.replace(result, verify=False)
.
Few examples can be found here:
The custom authentication methods were pre-released in kopf>=0.23rc1
and will be normally released (kopf>=0.23
) in few days. See the 0.23rc1 release notes.
Please report any issues with the new custom authentication methods if they do not work as expected.
Expected Behavior
Kopf does not validate the SSL certs, so that it will not fail with
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)
Actual Behavior
SSL certs validation is enforce, and
kopf run
fails with[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1056)
if run out of cluster.Steps to Reproduce the Problem
kopf run app.py --verbose --standalone
Specifications
Platform: PRETTY_NAME="Fedora 30 (Workstation Edition)"
Kubernetes version:
Python version: Python 3.7.3
Python packages installed: