All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add support for nanocpu (
n) units inK8s.Resource.Utilization.cpu. Issue #373
- Add support for passing kubeconfig as a YAML string with K8s.Conn.from_string/2 #364
- allow http body types in the Base runner return #354
- With the upgrade to
mint1.6.0, there's no need for settinginsecure_skip_tls_verify: trueanymore in most cases. (elixir-mint/mint#418). Documentation and examples were adapted.
- Many
K8s.Conn.Authproviders now cache values, and periodically refresh their values. #302. because of this clusters using Exec commands to generate auth tokens will see greatly improved performance.
K8s.Conn- Add namespace info in case of service account connection. #291
K8s.Client.Mint.HTTPAdapter- Only stop the process if the connection is closed for reading (and writing). - #280, #285
K8s.Client.wait_until/2- Allow passing DELETE operations in order to wait for deletion. - #262
K8s.Client.connect/4- Support connecting topods/logsubresource. - #254, #255K8s.Conn.from_env/2- Generates configuration from a file defined by an env variable. - #251K8s.Conn- Better hexdocs
K8s.Conn.Auth.Exec- Define default value for:args- #240
- Added further PATCH mechanisms - #229
- Add
optstoK8s.Conn.from_file/NandK8s.Conn.from_service_account/Nin order to be able to pass:insecure_skip_tls_verifyoption directly. - #230, #203
- A regression introduced in 2.0.2: superfluous call to
Genserver.reply()was removed.
This version comes with some breaking changes. Please refer to the migrations guide for help on how to migrate your projects to this version.
K8s.Selector.label_not/N,K8s.Selector.field/NandK8s.Selector.field_not/N- Support for field selectors (#117)K8s.Client.Provider.stream/5callback was added to the behaviourK8s.Client.Runner.Base.stream/3K8s.Client.Provider.stream_to/6callback was added to the behaviourK8s.Client.Runner.Base.stream_to/4K8s.Client.MintHTTPProvider- The mint client implementationK8s.Client.HTTPTestHelper- to be used in tests (resides inlib/so it can be used by dependents)- Open
:connectoperations (connections) now accept messages to be sent to pods if usingK8s.Client.stream_to/N K8s.Client.put_conn/2to add pielining support to the Client API
K8s.Client.Providerbehaviour was adapted to the new internal architectureK8s.Client.watch/Nnow returns a:watchor:watch_all_namespacesoperation to be passed toK8s.Client.stream/NWebsockexwas replaced byMint.WebSocket
K8s.Client.HTTPProviderwas removed in favor ofK8s.Client.MintHTTPProvider- The
:stream_toinhttp_optswas removed in favor ofK8s.Client.stream_to/NandK8s.Client.stream/N. K8s.Client.DynamicWebSocketProviderwas removed. UseK8s.Client.DynamcHTTPProvider.websocket*functions instead .
- Tests using the
DynamicHTTPProviderwhich work withwatch_and_streamare going to need to be changed. The HTTP mocks now need to implement thestream/5callback. (SeeK8s.Client.Runner.Watch.StreamTeston this branch for examples)d. K8s.Client.DynamicWebSocketProviderwas removed in favor ofK8s.Client.DynamcHTTPProvider.websocket*functions.- The
:stream_toinhttp_optsis not supported anymore. UseK8s.Client.stream/NandK8s.Client.stream_to/Ninstead. - Errors are encapsulated in
K8s.Client.HTTPError headers/1callback was removed fromK8s.Client.Providerbehaviour.K8s.Client.HTTPProvider(HTTPoison implementation) was removed.K8s.Client.watch/Nnow returns a:watchor:watch_all_namespacesoperation to be passed toK8s.Client.stream/N
- Update
PKI.cert_from_map/2to support fully qualified domain names (FQDN) - Fix forK8s.Conn.from_file/1(#164)
- Unable to parse response (invalid JSON) (#215)
K8s.Client.Mint.HTTPAdapter- Handle Elixir streams separately fromstream_to.
:poolboy- Pooling for HTTP/1 connectionsK8s.Client.Mint.HTTPAdapter- Monitor caller and cleanup state upon:DOWN
K8s.Client.Mint.ConnectionRegistry- closed connections were not re-established.K8s.Client.Mint.Request.HTTP- Add missing struct field:waiting
K8s.Client.Mint.HTTPAdapter- A GenServer handlingMint.HTTPconnections.K8s.Client.Mint.ConnectionRegistry- The registry for openHTTP/2connections
K8s.Client.Mint.WebSocket- Close websocket if process is terminated
This version comes with some breaking changes. Please refer to the migrations guide for help on how to migrate your projects to this version.
K8s.Selector.label_not/N,K8s.Selector.field/NandK8s.Selector.field_not/N- Support for field selectors (#117)K8s.Client.Provider.stream/5callback was added to the behaviourK8s.Client.Runner.Base.stream/3K8s.Client.Provider.stream_to/6callback was added to the behaviourK8s.Client.Runner.Base.stream_to/4K8s.Client.MintHTTPProvider- The mint client implementationK8s.Client.HTTPTestHelper- to be used in tests (resides inlib/so it can be used by dependents)- Open
:connectoperations (connections) now accept messages to be sent to pods K8s.Client.put_conn/2to add pielining support to the Client API
K8s.Client.Providerbehaviour was adapted to the new internal architectureK8s.Client.watch/Nnow returns a:watchor:watch_all_namespacesoperation to be passed toK8s.Client.stream/NWebsockexwas replaced byMint.WebSocket
K8s.Client.HTTPProviderwas removed in favor ofK8s.Client.MintHTTPProvider- The
:stream_toinhttp_optswas removed in favor ofK8s.Client.stream_to/NandK8s.Client.stream/N. K8s.Client.DynamicWebSocketProviderwas removed. UseK8s.Client.DynamcHTTPProvider.websocket*functions instead .
- Tests using the
DynamicHTTPProviderwhich work withwatch_and_streamare going to need to be changed. The HTTP mocks now need to implement thestream/5callback. (SeeK8s.Client.Runner.Watch.StreamTeston this branch for examples)d. K8s.Client.DynamicWebSocketProviderwas removed in favor ofK8s.Client.DynamcHTTPProvider.websocket*functions.- The
:stream_toinhttp_optsis not supported anymore. UseK8s.Client.stream/NandK8s.Client.stream_to/Ninstead. - Errors are encapsulated in
K8s.Client.HTTPError headers/1callback was removed fromK8s.Client.Providerbehaviour.K8s.Client.HTTPProvider(HTTPoison implementation) was removed.K8s.Client.watch/Nnow returns a:watchor:watch_all_namespacesoperation to be passed toK8s.Client.stream/N
- Update
PKI.cert_from_map/2to support fully qualified domain names (FQDN) - Fix forK8s.Conn.from_file/1(#164)
K8s.Selector.label_not/N,K8s.Selector.field/NandK8s.Selector.field_not/N- Support for field selectors (#117)K8s.Client.connect/3- Executes a command in a Pod #190
K8s.Client.run/2: spec updated to includet:K8s.Discovery.Error.t/0in possible error structs
K8s.Client.run/2: spec updated to includet:K8s.Client.APIError.t/0in possible error structs (#189)K8s.Operation.Path.build/1: Allow namespace to benil
K8s.Client.watch_and_stream/2: Get resource vesrion before creating the Stream resource in order to not miss anything. (#187)
- Fix protocol implementations in Elixir 1.14.1: Replace
__MODULE__with actual module name. #185 - Match subresources when the kind does not equal the subresource (#184)
K8s.Resourse.label/2: spec updated to accept label maps as a second argument #177K8s.Discovery.Driver.File: Useconn.discovery_optsin file discovery driver (#180)K8s.Client.DynamicHTTPProvider.request/5: Fix converting PID to string inside error message (#181)
K8s.Client.watch_and_stream/2: 410 Gone not rescued #159K8s.Client.watch/3:getoperations should be transformed tolistBEFORE retrieving the resource version #160
K8s.Client.watch_and_stream/2: Request BOOKMARK events and process them when watching resource collections. #159
- Fix more authorization headers that are not keyword lists #148
- Fix default value in
K8s.Client.Runner.Watch.run/4andK8s.Client.Runner.Watch.stream/3
- Support for FQDN K8s API servers and Root CA chains #144
- Wrong exception raised by
K8s.Resource.from_file!/2#137, #143 K8s.Client.Runner.Watch.stream/3- convert:getto:listoperation with field selector.- Make Logger metadata
library: :k8savailable at compile time.
- Initialize authorization header as valid keyword list #142
- Restore deprecated
K8s.Sys.Eventmodule.
K8s.Client.Runner.Watch.stream/3- watches a resource and returns an elixir Stream of events #121K8s.Client.apply/2- Create a server-side apply operation
- Handle generic kubernetes response Failure without a reason #120
- Replace Notion with Telemetry and improve Logging #128
K8s.Client.HTTPProvider.headers/2was deprecated in favor ofK8s.Client.HTTPProvider.headers/1K8s.Client.DynamicHTTPProvider.headers/2was deprecated in favor ofK8s.Client.DynamicHTTPProvider.headers/1
- Preserve namespace in
get_to_list/1#122, #123 - Fix obsolete doc on wait operation #118
- Dialyzer errors with K8s.Client functions #119
- Enable peer certificate authentication #127. Be aware, this will break configurations that have been using incorrect certificate(s) up to this point.
K8s.Resource.NamedList.access!/1raises if item is missing- K8s.Operation.put_label_selector/2
- K8s.Operation.get_label_selector/1
- Per connection http provider configuration
- K8s.Operation now uses keyword lists for query_params instead of maps
- error tuples refactored away from binary and atom to exception modules
- removed dialyzer exceptions
K8s.Conn.from_file/2now returns an ok or error tupleK8s.Conn.from_service_account/Nnow returns an ok or error tupleK8s.Conn.t()is now the first argument in all runners.K8s.Operation.t()is now the second.- deprecated K8s.http_provider/0
- deprecated K8s.Discovery.default_opts/0
- deprecated K8s.Discovery.default_driver/0
- Refactored cluster names to strings
K8s.Resource.NamedList.access/1deals better with missing items now- Removed K8s.Client.run/4, use
K8s.Client.run/3to pass options to HTTP provider - Middleware moved to K8s.Conn.Middleware
- K8s.Conn.lookup/1
- config.exs based cluster registration is no longer supported, build K8s.Conn using K8s.Conn module
- environment variable based cluster registration has been removed and may be moved to an external library
- Added auth
execsupport
- K8s.Operation struct
query_paramsfield - BasicAuth auth provider
- Deprecated HTTPoison options being passed to K8s.Client.Runner.base
- K8s.Operation.put_query_param/3 to add query parameters by key
- K8s.Operation.get_query_param/3 to get a query parameter by key
- DigitalOcean authentication
K8s.Resource.NamedList.access/1- Accessor for lists with named items (containers, env, ...) (#82)
- Refactored old references to
cluster_nametoconn
- #42 Request middleware support
- #43 Just in time discovery: K8s.Discovery
- #44 Support for ad-hoc connections. K8s.Conn based functions. Build your own Conn at runtime or config mix/env vars. No more Cluster registry.
- K8s.Resource.from_file/2 and K8s.Resource.all_from_file/2 - non-exception versions
- Boot time discovery K8s.Cluster.Discovery
- K8s.Cluster.base_url/1
- Remove K8s.Cluster*
- Renamed
K8s.ConftoK8s.Conn - Refactored
:confconfiguration key to:conn
K8s.Selector.match_expressions?/2to check if a resource matches expressionsK8s.Selector.match_labels?/2to check if a resource matches labels
K8s.Resourcefunctions moved to submodule
- text/plain response handling
- K8s.Selector - labelSelector support for K8s.Operation
K8s.Client.DynamicHTTPProviderto allow per-process registering of HTTP request handlers.K8s.Cluster.Discoverydiscovery interfaceK8s.Cluster.Discovery.api_versions/1- queries a cluster for all apiVersionsK8s.Cluster.Discovery.resource_definitions/1- queries a cluster for all resource definitionsK8s.Cluster.Discovery.HTTPDriverfor discovery via k8s REST APIK8s.Cluster.Discovery.FileDriverfor discovery via a file, used for testing, shipped to help dependent libraries mock discovery- Support for creating subresources
- Support for getting subresources
- Support for updating subresources
- Refactored tests on DynamicHTTPProvider
- Refactored discovery to use
K8s.Cluster.Discovery - Set correct content-type for patch operations (#32)
- Refactored Operation.kind -> Operation.name
- Group.cluster_key/2 -> Group.lookup_key/2
- K8s.Cluster.Group :ets data structure changed to map
- K8s.Cluster.Group module encompases access to :ets table
- Refactored Operation.resource -> Operation.data. The term
resourceis a bit overloaded in this repo, since the operation is encapsulating the HTTP request,datafeels a bit more clear. - Refactored internal references to "group version" to "api version"
- K8s.Cluster.base_url/1
- First K8s.Client.Runner.Stream evaluation made lazy
- K8s.Resource.api_version/1
- K8s.Resource.cpu/1 parses cpu resource requests/limits strings to number
- K8s.Resource.memory/1 parses cpu resource requests/limits strings to number
- K8s.Client.Runner.Stream for producing elixir streams from k8s list results
- K8s 1.15 swagger file
- Reversed pattern matching in functions from
var=patterntopattern=var - Added make target for fetching master swagger before running tests
- Kubernetes resources, groups, and CRDs are autodiscovered at boot time. No swagger file to include or override.
- Client supports standard HTTP calls, async batches, wait on status, and watchers
- Supports multiple clusters
- Supports multiple kubernetes APIs in the same runtime
- serviceaccount authentication
- token authentication
- certificate authentication
- auth-provider authetnicati
- Tested against kubernetes swagger specs: 1.10+ and master
- CRD support
- Kubernetes resource and version helper functions
- Kube config file parsing
- Pluggable auth providers