operator

module
v0.0.0-...-4091499 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: Apache-2.0

README

TAMOSS Operator

This directory contains the TAMOSS Kubernetes operator. Public install and operations guidance lives under ../docs/; this README is for maintainers working on operator code and generated artefacts.

Public Docs

Common Commands

Run commands from the repository root:

task operator:build
task operator:test
task operator:manifests
task operator:template

Run operator e2e tests:

task operator:e2e:chainsaw KUBECONFIG=/path/to/kubeconfig
task operator:e2e:chainsaw:up

Inner Loop

Fast iteration helpers for controller development. Make targets own the Go toolchain (build, test, lint, codegen); task targets own clusters, e2e suites, and CI orchestration. Reach for make when you are editing Go, and for task when you need a cluster or the full gate.

Run the envtest suite without regenerating code or running fmt/vet:

make -C operator test-fast        # envtest suite only; run `make test` before pushing
go test ./internal/controller/... # single package, from operator/

Reload a controller change into an existing Kind cluster without rerunning task kind:up (rebuilds the image, loads it, restarts the deployment):

task kind:operator:reload

Run the controller manager on the host against a cluster:

task operator:run KUBECONFIG=tams.kubeconfig

Caveats: operator:run scales the in-cluster operator to zero (scale it back up when finished) and sets ENABLE_WEBHOOKS=false, so the delete-protection webhook server is not started on the host. If the in-cluster webhook configuration is installed, deletes of Tamoss/StorageBackend resources will be rejected while the deployment is scaled down (failurePolicy: Fail).

Focus a single chainsaw test instead of the full suite:

task operator:e2e:chainsaw:focus KUBECONFIG=/path/to/kubeconfig -- <test-dir-name-or-regex>
task operator:e2e:chainsaw:focus KUBECONFIG=/path/to/kubeconfig SELECTOR='test.tamoss.io/suite=smoke'

Generated Artefacts

  • CRDs, RBAC, and webhook manifests are generated from Go API/controller code.
  • The public operator Kustomize install is rendered under deploy/operator.

Regenerate after changing API types, RBAC markers, or webhook configuration:

task operator:manifests
task operator:install-manifest

Release catalogue

spec.version selects an entry in the operator installation's immutable catalogue.json. The release workflow builds the current entry from compatibility.yaml and image build digests, then embeds it in install.yaml. It also publishes the catalogue and records its checksum in release.json.

When preparing a release, declare its schema revision, Alembic revision, runtime images and supported predecessor in compatibility.yaml. Copy each supported predecessor's published runtime record from release.json into releases/<version>.json. Preserve those historical records unchanged, including any supported prerelease whose schema differs from the final release.

After changing current metadata, regenerate the development catalogue and installation:

python3 .github/scripts/release-catalogue.py --development --output operator/config/releases/catalogue.json
task operator:install-manifest

Local builds use spec.version: dev. task kind:up generates a separate catalogue with the locally built operand tag and schema target. Published installations use exact releases as described in the installation guide. The resources in config/samples/ target local builds; replace dev with a supported release when adapting them for a published installation.

License

Licensed under the Apache License 2.0. See ../LICENSE.

Installation defaults

TAMOSS_INSTANCE_DEFAULTS points to an optional mounted YAML file. The default installation mounts an empty immutable ConfigMap; generated environment overlays replace the volume reference with their own hashed ConfigMap. Kustomize changes the Pod template when the file changes, so the manager reads it once at startup. All instance controllers use the same resolver. See Runtime Configuration for supported settings and precedence.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the tamoss v1alpha1 API group +kubebuilder:object:generate=true +groupName=tamoss.livewyer.io
Package v1alpha1 contains API Schema definitions for the tamoss v1alpha1 API group +kubebuilder:object:generate=true +groupName=tamoss.livewyer.io
cmd
console-api command
internal
controller/workload_renderer
Package workload_renderer converts Tamoss custom resources into Kubernetes workload objects owned by the TAMOSS operator.
Package workload_renderer converts Tamoss custom resources into Kubernetes workload objects owned by the TAMOSS operator.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL