Files
spinifex/contracts/eks/v1/README.md
T
joshsiv-mulga 692d929b4a refactor: extract EKS add-on guest wire contract
Move the add-on status subject, delivery phase, status report, staged
manifest and internal add-ons response into contracts/eks/v1 and use it
from the handler, gateway and gatewayfetch, replacing the agent's
duplicate. Wire bytes are unchanged, including the internal add-ons body
that the SDK renderer emits with Go field names; compatibility tests pin
the JSON, the guest printf form and the TSV.
2026-10-08 23:02:20 +10:00

1.7 KiB

EKS v1 contracts

This package owns the deployed EKS add-on contract between the control-plane guest (the on-VM addon-sync agent, eks-gateway-fetch and eks-gateway-publish) and the host (the AWS gateway and the cluster reconciler). It is not an AWS tenant-facing API.

Delivery report

AddonStatusSubject retains the deployed eks.addon.<account>.<cluster>.status route. The guest's mulga-eks-addon-sync.sh builds an AddonStatusReport with printf, so it always sends message (possibly empty); the gateway relays the payload verbatim on the addon channel of internal-publish. AddonDeliveryPhase is the closed set applied, ready, failed.

Staged manifests

InternalAddonsResponse is the body of GET /clusters/{name}/internal-addons/{account}. The gateway renders it with the AWS SDK REST-JSON marshaller (jsonutil.BuildJSON), which ignores json tags, so the deployed body uses Go field names and always includes empty strings, for example {"Addons":[{"AddonName":"x","AddonVersion":"1","ServiceAccountRoleArn":"","ConfigurationValues":""}]}. The guest decodes it with encoding/json, which matches keys case-insensitively, then emits it as tab-separated lines for the shell agent.

The json tags on StagedAddonManifest are the host-internal NATS form used between the gateway and the daemon (eks.ListStagedAddonManifests). They do not describe the guest-facing body.

Compatibility boundary

The subject, phase values, both JSON forms and Go field names are wire compatibility; addon_status_test.go and addon_manifest_test.go pin them with literal bytes. A generation-aware or otherwise incompatible delivery protocol needs a successor version; it is not a v1 change.