Skip to content

Releases: haxsaw/hikaru

Adds support for 1.21 Python K8s client

13 Feb 16:57
Compare
Choose a tag to compare

This is the most recent version of Hikaru that is a catch-up for the releases of the Python K8s client that have come out while Hikaru's build system was reimplemented. This latest version of Hikaru adds support for K8s 1.21 APIs and models and includes support for the black code formatter's first full release.

This release also drops support for the 1.17 release of the K8s Python client, and support for the 1.18 release is deprecated.

Full details on changes are in the release notes.

Adding support for 1.20 K8s Python client

29 Jan 17:05
Compare
Choose a tag to compare

No new functionality, but getting caught up with the new K8s Python client versions. Note that support for 1.16 of the client is dropped with this release. See the release notes for a more comprehensive description of what has been updated.

v0.9.0b

23 Jan 18:33
Compare
Choose a tag to compare

This release may produce some breaking changes due to changes in the K8s swagger.

This release has taken a while as the 1.19 version of the K8s Python client is
based on a swagger file that breaks some of the build system's assumptions.
This has required consideration as to how to address the changes as well as a
rebuild of the build system for Hikaru, a non-trivia task.

The changes that have caused the breakage is the emergence of identically-named
resources in different groups but within the same version. It has appeared that up
to this K8s release resources with the same names only appeared in different
versions, and hence Hikaru was able disregard group names, offering a single
namespace per version so that it is easier to find the resource classes required.

Release 1.19 of the K8s Python client is based on a swagger file that introduces
a small number of resource definitions with the same name in the same version,
but in different groups. Since we don't want to introduce the concept of 'group'
into Hikaru at this point due to the disruption it would cause existing users,
options for addressing this problem had to be weighed along with implementation
impact.

In the end, a new build system was created that allows for the manual
specification of a single resource class to be the 'primary' resource with that
name, and all other resources with the same name are renamed to have the
conflicting name, followed by '_', followed by the group name (if it can be
determined).

Full details of the impact of this are in the release notes.

This release also has the following additional changes:

  • Python 3.10 has been added as a supported version of Python.

  • The lastest version of the black code formatter (21.12b0) has been verified
    to work with Hikaru and is now accepted as a version that satisfies the package's
    requirements.

  • The Response object has been modified to be a generic type, with the type
    parameter serving as a means to establish a type annotation on the 'obj'
    attribute of this class. This allows the assignment of the
    attribute's value to an appropriately typed variable without a cast. This
    applies to all K8s versions supported in this Hikaru release.

  • A policy of only supporting four releases of the underlying K8s Python client
    has been established; this is because the generated code is getting quite
    large, making the overall package grow substantially with each new supported
    K8s release. Given that most of the previous K8s releases no longer have
    support, this seems a reasonable constraint. The oldest supported release
    will output a deprecation warning when imported, instructing the user that
    the imported version will be dropped in the next release of Hikaru and
    encouraging the migration to a newer release. In 0.9.0b, this message is
    output if rel_1_16 is imported.

Known bugs

The 1.19 release of the K8s Python client has a bug that was reported here:
kubernetes-client/python#1616. The problem appears
to be a regression in properly handling turing off client side validation for
the EventList resource; an exception is thrown in the K8s Python client code
upon receipt of data from Kubernetes saying that 'event_time' must not be None.
Trying to change default client configs, or specifying a different client
config for the APIClient doesn't seem to have any effect, and the K8s maintainers
acknowledge this is a regression. This bug impacts the listNamespacedEvent()
and listEventForAllNamespaces() methods of the EventList class. We haven't
been able to find a workaround for this bug, and hopefully it will be addressed
in upcoming K8s client releases.

v0.8.1b

13 Nov 20:11
Compare
Choose a tag to compare

Bugfix and maintenance. See release notes for changes.

0.8b

12 Sep 17:29
Compare
Choose a tag to compare

This release adds support for the 1.18 release of the K8s Python client. NOTE: a version of K8s objects has been dropped in this release, so please consult the release notes for details of this to determine if you will be impacted. The notes make a detailed list of impacted objects and methods available.

Additionally, this release of Hikaru adds support for the newest version of the black code formatter.

Support for K8s watches: monitor K8s activity

16 Aug 20:09
Compare
Choose a tag to compare

The main feature of this release is the new watch facility that provides the means to easily establish watches that receive a stream of events containing Hikaru model objects that reflect K8s activity. This provides operational insight into your cluster, using the same ecosystem of objects that you use for modelling, templating, inspecting, and instructing K8s.

This release also fixes a bug that introduces a breaking change. Certain of the 'list' methods were assigned to the wrong class, and in support of watches they needed to be put in the right place. So if you are a user of this functionality be sure to consult the release notes where there is a full listing of which methods are affected, and includes the old and new classes they are now associated with.

Approved use of newest release of black, 21.7b0

20 Jul 14:01
Compare
Choose a tag to compare

A maintenance release that formalizes Hikaru's compatibility with black 21.7b0.

Support for the K8s 1.17 Python client

05 Jul 13:26
Compare
Choose a tag to compare

This release adds support for the newest K8s Python client, 1.17. You can now select which version of the client to use when creating Hikaru objects yourself, when when Hikaru creates them for you when parsing YAML.

NOTE: this is not a drop in replacement, as some import changes have been necessary to keep existing behaviours in IDEs while adding support for multiple releases. See the ReleaseNotes for the change you need to make. Happily, you can make the changes in code that currently works with Hikaru 0.5x and then simply upgrade Hikaru. If you have already import specific releases of models then you won't have any changes to make at all.

Additionally, the release allows the use of the newest version of the 'black' code formatter.

Bug fix, support new release of black

07 Jun 10:49
Compare
Choose a tag to compare

This is a patch release that supports the new version of the 'black' code formatter and fixes a bug in processing DaemonEndpoint down inside NodeStatus. This patch does update the name of that class's 'port' attribute to 'Port' which matches the official swagger spec.

CRUD methods added to HikaruDocumentBase subclasses

27 May 11:43
Compare
Choose a tag to compare

The main feature of this release is the addition of CRUD-style methods to many of the HikaruDocumentBase subclass such as Pod, ReplicaSet, and so on. This provides for simpler access to the corresponding underlying Kubernetes operations while still making available the full power of those operations. Classes that support update() on their instances are now also context managers, and when the context scope closes the update happens automatically. You can also establish a rollback to the initial state of the object if an error arises during the with block. Further requested features and bug fixes are part of this release; please see the release notes for details.