k8s-api icon indicating copy to clipboard operation
k8s-api copied to clipboard

Add support for base64 secrets and settings self-signed CA certificate

Open RafaeLeal opened this issue 5 months ago • 0 comments

Context

Right now, you don't have the option of using self-signed certificates when using token, token-fn or basic-auth authentication. You can only set the CA certificate if you set also the client certificates.

Feature

  • Enable users to set either :ca-cert (filename) or :certificate-authority-data (base64 encoded string) alongside all other authentication methods.

Example:

(k8s/client url {:token token :ca-cert "/root/.kube/some-ca.crt"})
  • Allow setting base64 encoded secrets alternatives. Example:
(k8s/client url {:certificate-authority-data (get-ca-from-eks-api ...)
                 :client-certificate-data    (get-from-secret-providers ...)
                 :client-key-data            (get-from-secret-providers ...)}

You can mix and match base64-encoded secrets (:certificate-authority-data, client-certificate-data and :client-key-data) and the existing file configurations (:ca-cert, :client-cert, and :client-key)

RafaeLeal avatar Mar 06 '24 23:03 RafaeLeal