Releases: nubank/k8s-api
Version 1.0.0
Features
Filter Kubernetes API Groups and Versions
You can filter the paths from the OpenAPI specification. This is useful when you want to use a specific version of the
api, or when you want to use a specific group of resources.
(def k8s (k8s/client "http://some.host" {:token "..."
:apis ["some.api/v1alpha1", "another.api"]}))
Warning
[BREAKING] If you use this library to interact with CRDs, you need to explicit set the :apis
. If you need both (CRDs and k8s resources), you can use kubernetes-api.core/default-apis
to select k8s default apis too.
This might break some clients, but it's required to make our client more resilient. Right now, the addition of any openapi schema (which is done automatically when you install a CRD or Aggregated API) can break the client even if you're not interacting with it.
Authentication
Support for certificates and keys as base64-encoded strings
We have 3 new fields:
:certificate-authority-data - a base64 encoded string with the certificate
authority data
:client-certificate-data - a base64 encoded string with the client certificate
alternative to :client-cert
:client-key-data - a base64 encoded string with the client key alternative
to :client-key
These new fields can be used interchangeably with the existing fields :client-cert/:ca-cert/:client-key
, meaning that you can mix and match file references and base64-encoded strings.
Self-Signed CA Certificate
Before this release, if you created a client with :token
and :ca-cert
, it would ignore the :ca-cert
since we required the 3 components for a mTLS connection: CA certificate, client key and client cert.
Now you can set CA certificate independently, which means you can have secure connections over self-signed CAs, assuming you have a safe way of distributing such certificate.
0.3.0
Full Changelog: 0.2.1...0.3.0
Version 0.2.1
Features
Patch strategies
Now the client has support for all Kubernetes patch strategies:
application/json-patch+json
application/merge-patch+json
application/strategic-merge-patch+json
application/apply-patch+yaml
You can look Kubernetes Documentation about patchs here
=> (k8s/explore client :ConfigMap)
[:ConfigMap
[:list "list or watch objects of kind ConfigMap"]
[:create "create a ConfigMap"]
[:deletecollection "delete collection of ConfigMap"]
[:list-all "list or watch objects of kind ConfigMap"]
[:get "read the specified ConfigMap"]
[:update "replace the specified ConfigMap"]
[:delete "delete a ConfigMap"]
[:patch/json "update the specified ConfigMap using RFC6902"]
[:patch/strategic "update the specified ConfigMap using a smart strategy"]
[:patch/json-merge "update the specified ConfigMap using RFC7286"]
[:apply/server
"create or update the specified ConfigMap using server side apply"]]