Beta and stability

What beta means here, and what 1.0 waits for.

Beta. The CRDs are v1, but until 1.0 a change that cannot be additive is named in the changelog. What that means.

What beta means here

The CRDs are served as kubeassistant.taumatix.dev/v1: DeviceBinding, ClusterDeviceBinding, HomeAssistantMirror, HomeAssistantDevice and HomeAssistantEntityBinding. The aim is that changes within v1 are additive only: a new optional field, a newly accepted value, a newly supported domain, and a binding that one release accepts keeps being accepted and keeps meaning the same thing.

Until 1.0 that is an intention rather than a promise. A change that cannot be additive ships in a minor release and is named under "Changed" in the changelog, so read it before you upgrade. From 1.0 a breaking change needs a v2 API version and a MIGRATION.md, with v1 still served across at least one minor release.

The operator is tested against a real Home Assistant, a real MQTT broker and a real API server on every pull request. It has had little use outside those suites.

What the API is built around

These are the last things to change:

  • A Secret is refused as a target, by the API server, whatever the RBAC says.
  • target.selector is required. {} selects every object of the kind; leaving it out is an error rather than a silent "everything".
  • Device ids are ns_<namespace>_<binding>_<object> for a DeviceBinding and cluster_<binding>[_<namespace>]_<object> for a ClusterDeviceBinding, with a . in any name part encoded as __. Home Assistant keys a device's entities on its id, so a changed id would orphan every entity and its history.
  • Path syntax: .-separated keys, with ["c.d"] for a key that contains a dot, as in .a.b["c.d"]. List indices are not accepted; supporting them later is additive.
  • Commands are written as a JSON merge patch of the one field the entity maps, with field manager home-assistant, converted to the type the target kind's schema declares.
  • State encoding: a string as is, a number in decimal, a bool as the domain's payloadOn/payloadOff (default ON/OFF), a map or list as JSON, and an absent field publishes nothing.

For mirroring:

  • Off unless asked for. Nothing connects to Home Assistant without --ha-url, and nothing operates a device without both --ha-control and the mirror's control: true.
  • Selection: every list of spec.selector that is set must match, any value within a list does, and {} selects every enabled device.
  • Object names and labels: a mirrored device is named <slug of the integration's name for it>-<first 8 characters of its id> and labelled kubeassistant.taumatix.dev/mirror and kubeassistant.taumatix.dev/device-id. Renaming a device in Home Assistant does not rename the object.
  • Deletion only from a live read: a HomeAssistantDevice is deleted when Home Assistant's registry, read over a live connection, no longer has the device or the mirror no longer selects it. An outage deletes nothing.
  • Commands are edge-triggered: an entry of spec.entities is sent once when it changes, and status.commands records the hash it was sent under, so neither a restart nor a change made in Home Assistant sends it again.
  • Attribute encoding: a string as is, anything else as JSON; an access token is never copied and token= in a URL is redacted.
  • Entity bindings write a JSON merge patch with field manager home-assistant-mirror, typed from the target's schema, and never write unavailable or unknown.

One exception is outside kubeassistant's control: platform and options are generated from Home Assistant's own configuration, so a domain or option Home Assistant removes leaves the schema when UPSTREAM.md moves to that release. The changelog names any such removal.

Known limitations

The README lists them, from reconcile cost on a large cluster to the Home Assistant configuration fields the CRDs leave out. Mutual TLS to the broker is not supported yet.

What 1.0 waits for

The beta label comes off when four things have shipped, because they decide what a binding accepts and reports: paths validated against the target's CRD when a binding is applied, CEL value expressions, bindings checked against the Home Assistant they target, and a status to troubleshoot from. And when someone other than the author has run the install on a cluster and the issues that turned up are closed. The roadmap has them in order.