Skip to content

Re-Write the Kubernetes and NATS extensions - #110

Merged
colinjlacy merged 2 commits into
runtimeconditions:mainfrom
itvi-1234:handwritten-kubernetes-nats
Dec 3, 2026
Merged

colinjlacy merged 2 commits into
runtimeconditions:mainfrom
itvi-1234:handwritten-kubernetes-nats

Conversation

@itvi-1234

@itvi-1234 itvi-1234 commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

What this changes

Like S3 in #107, the Kubernetes and NATS extensions were made by compilers. Each compiler joined a source (the Kubernetes OpenAPI document, or a hand-kept NATS operations inventory) with a hand-written "semantic bridge". Now both are written by hand, like every other extension. After this PR, no bridge, compiler or generated file is left in the catalog.

Removed

  • both compilers and their tests
  • both semantic bridges
  • the Kubernetes OpenAPI projection, the generated service mappings and the review reports
  • the Kubernetes maintenance manifest and the compiler docs
  • SERVICE_OPERATIONS_SEMANTIC_BRIDGES.md, since no extension uses a bridge any more

The Tests workflow no longer checks out the service-operations-inventories repository, and CONTRIBUTING no longer asks you to clone it. EXTENSION_RELEASES.md now says that every release is written by hand.

New releases, with docs in simple English

Extension Release What's new
Kubernetes API 0.2.0 Same schema as 0.1.0. Adds descriptions for every field, verb, scope and HTTP method, and examples: a ConfigMap reader, a Deployment controller, and exec into a Pod plus /healthz
NATS 0.3.0 Same schema as 0.2.0. Adds descriptions for all 26 operations, every field and configuration setting, and examples: an event publisher and a JetStream worker
  • The schemas are unchanged apart from the descriptions, and all examples validate against them.
  • Both READMEs are rewritten with a usage example and the profile it produces.
  • Kubernetes doesn't need a new release for new Kubernetes versions: it describes resources by group, version and name, not by a fixed list, and custom resources (CRDs) work the same way.

Packages

Package Before After
kubernetes-api Go 0.1.1, Python/TypeScript/Java 0.1.0 0.2.0 in every language
nats-service Go 0.2.1, Python/TypeScript 0.2.0, Java 0.1.0 Go/Python/TypeScript 0.3.0, Java 0.2.0

…docs

Like S3, the Kubernetes and NATS extensions came from compilers that joined a
source model (the Kubernetes OpenAPI document, a hand-kept NATS operations
inventory) with a hand-written semantic bridge. They are now written by hand
like every other extension, so no bridge, compiler or generated file is left
in the catalog.

Removed: both compilers and their tests, both semantic bridges, the
Kubernetes OpenAPI projection, the generated service mappings and review
reports, the Kubernetes maintenance manifest, the compiler-centred docs, and
SERVICE_OPERATIONS_SEMANTIC_BRIDGES.md. The Tests workflow no longer checks
out the service-operations-inventories repository, CONTRIBUTING no longer asks
for it, and EXTENSION_RELEASES.md says that every release is written by hand.

Kubernetes API 0.2.0 and NATS 0.3.0 keep the schemas of 0.1.0 and 0.2.0
exactly, and add documentation in simple English: what the extension is for,
every field, every verb, scope, method, resource, action and setting, one
line for each of the 26 NATS operations, and examples that validate against
the schemas. Both READMEs are rewritten with a usage example and its profile
output. Kubernetes needs no new release for new Kubernetes versions, because
it describes resources by group, version and name rather than by a fixed list.

The kubernetes-api packages move to 0.2.0 in every language. The nats-service
packages move to 0.3.0 for Go, Python and TypeScript, and 0.2.0 for Java.
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Publishing setup

For maintainers. Do these steps before these packages are published, or the publish run fails for them. They need an account with write access to the package.

npm: add a trusted publisher

@runtimeconditions/kubernetes-api has no trusted publisher, because the latest version was not published by the publish workflow. Without one, npm answers that workflow with a 404. Run (asks for 2FA):

npm trust github @runtimeconditions/kubernetes-api --file binding-publish-npm.yml --repo runtimeconditions/extensions --allow-publish --allow-stage-publish --yes

npm drops a trusted publisher that is not used within 2 days, so run the publish workflow soon after. If the package's npm settings already show the publisher as Pending validation, it is set; skip it.

No setup needed (3)
  • runtimeconditions-kubernetes-api 0.2.0: trusted publishing is set
  • runtimeconditions-nats-service 0.3.0: trusted publishing is set
  • @runtimeconditions/nats-service 0.3.0: trusted publishing is set

Go and Maven Central need no setup.

After the merge

Package Registry Now After the merge What happens
kubernetes-api Go 0.1.1 0.2.0 publishes 0.2.0
kubernetes-api PyPI 0.1.0 0.2.0 publishes 0.2.0
kubernetes-api npm 0.1.0 0.2.0 publishes 0.2.0
kubernetes-api Maven Central 0.1.0 0.2.0 publishes 0.2.0
nats-service Go 0.2.1 0.3.0 publishes 0.3.0
nats-service PyPI 0.2.0 0.3.0 publishes 0.3.0
nats-service npm 0.2.0 0.3.0 publishes 0.3.0
nats-service Maven Central 0.1.0 0.2.0 publishes 0.2.0

@itvi-1234
itvi-1234 requested a review from colinjlacy December 3, 2026 05:30
Kubernetes API 0.2.0 gets two more examples: listing nodes, to show the
cluster scope, and creating a cert-manager Certificate, to show that a custom
resource is declared like a built-in one. NATS 0.3.0 gets three: subscribing
with the orders.> wildcard together with a request, which is not a publish;
creating a stream with its subjects and writing to an object store; and
configuration alternatives, NATS_URL or NATS_HOST with NATS_PORT. All ten
examples validate against the schemas, which are unchanged.

@colinjlacy colinjlacy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this! Long overdue, and cleans up a mess I made a long time ago. Much appreciated @itvi-1234

@colinjlacy
colinjlacy merged commit 5b2ade2 into runtimeconditions:main Dec 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants