Skip to content

Component live status is CloudFormation-shaped end to end, so k8s, helm, gcp and azure components can never report #1495

Closed

Description

@lex00

chant components status <env> --live can only ever answer for a component that deploys a CloudFormation stack. Not because the other substrates are unobservable — chant already observes them — but because every link in the chain between "a component" and "its live state" is named after CloudFormation.

Surfaced by kubemicrovm-ops, an AWS + Kubernetes estate. Four components, one of them AWS:

aws-plane     good     live and chant-owned
golden-image  accent   no release record and nothing observed live
operator      neutral  no release record and nothing observed live
workload      neutral  no release record and nothing observed live

operator (a Helm release) and workload (Kubernetes custom resources) are permanently neutral against a fully converged estate — image SUCCESSFUL, connector ACTIVE, replicas at the floor. Downstream, behold paints them grey forever, which reads as "not deployed" for resources that are demonstrably running.

The chain, and where each link is AWS-shaped

1. No deploy-unit capability exists for k8s or helm. The registered verbs:

cfn-deploy  code-deploy  lambda-deploy  ecs-update-service  emr-start-job-run

Every deploy-family verb is AWS. There is no kubectl-apply, no helm-upgrade. So a Kubernetes component cannot name what it deploys — kubemicrovm-ops' workload and operator compose shell steps, with a reason, because that is the only verb that fits.

Worth noting chant is not missing the ability: the k8s lexicon ships typed server-side apply (#1075), reachable as ApplyTarget: "kubectl". It just is not exposed as a capability a component can compose. #1449 covers the adjacent write-path gap.

2. The deploy-unit walk string-matches one verb. cfnDeployStacks (cli/handlers/components.ts:230):

if (s.kind === "cfn-deploy" && typeof s.stack === "string") stacks.add(s.stack);

and its caller:

const stacks = cfnDeployStacks(component.deploy);
if (stacks.length === 0) continue;   // no evidence recorded at all

A component whose steps are anything else contributes nothing and is skipped — not "unobserved", not "unknown", simply absent from the result. This function is also exported and used by chant graph --live, so both readers inherit it.

3. describeStackStatus is implemented by exactly one lexicon.

lexicon describeResources describeStackStatus
aws yes yes
k8s yes no
gcp yes no
azure yes no
helm no no

This is the part that shows it is not a Kubernetes problem. GCP and Azure both observe resources and neither can report a deploy unit either. The contract was written to CloudFormation's shape and only CloudFormation implements it.

What each substrate would need

k8s — nearly free, because the identity is already stamped. Every object chant emits carries its deploy unit in labels:

labels:
  app.kubernetes.io/managed-by: chant
  chant.intentius.io/stack: kubemicrovm-ops
  chant.intentius.io/env: dev

So a Kubernetes deploy unit is a label selector, and StackStatusObservation maps onto it directly: present = anything matches chant.intentius.io/stack=<stack>,chant.intentius.io/env=<env>; healthy = every matching object Ready. No new identity concept, no new marker — chant already writes it and describeResources already reads through ownershipChannel.

helm — the closest analogue of all, and unimplemented. A Helm release has a name, a presence, and a native status (deployed, failed, pending-upgrade) that lands on StackStatusObservation almost field-for-field. A helm-upgrade capability naming its release would give a Helm component the same evidence a cfn-deploy component has, and it is the thing that would make kubemicrovm-ops' operator report rather than sit grey.

gcp / azure are in the same position as k8s and would follow the same shape once the walk is generic.

Sizing

Four pieces, roughly independent:

  1. Generalize the deploy-unit walk — ask a step what unit it targets rather than matching "cfn-deploy". Smallest, and unblocks the rest.
  2. A kubectl-apply capability naming its stack, over the applier that already exists.
  3. describeStackStatus on the k8s lexicon, over the labels already stamped.
  4. A helm-upgrade capability + describeStackStatus on the helm lexicon.

(1) alone changes nothing visible; (1)+(2)+(3) is what makes a Kubernetes component report like an AWS one.

Not filing a PR because this is a contract change across the capability registry and four lexicons, and the decomposition is worth agreeing before anyone writes code. Happy to take any of the four. kubemicrovm-ops is a working two-substrate test case — ./go prod-ha, four minutes, no AWS account.

Activity

  1. lex00 commented on Aug 5, 2026

    @lex00
    ContributorAuthor

    Correcting this — the diagnosis above is right about the CloudFormation shape but wrong about what a Kubernetes component needs in order to report. It needs much less.

    A component does not need describeStackStatus to report

    componentStatusColor prefers the {total, present, absent, unobserved} rollup over stack evidence and only falls back to the CFN-shaped path when the rollup is missing. The rollup is built from describeResources, which k8s, gcp and azure all implement. So the deploy-unit chain in the description is one way to report, not the only one — and the substrates without describeStackStatus already have the other.

    What was actually stopping it, both now fixed

    1. The consumer never declared what its components own. liveEvidenceFromChangeSet joins by entity name and falls back to component-name == entity-name. kubemicrovm-ops has no entity called workload or aws-plane, and none of its components set Component.liveNames, so the join matched nothing and every component — the AWS one included — reported resources: null. That was the tell I initially misread as a substrate gap: had it been one, the AWS component would still have had a rollup. Fixed consumer-side, no chant change.

    2. #1483's defect in four more handlers. lifecycle snapshot, lifecycle diff, lifecycle plan and components status --live all built the declared side on parameter defaults, so the rollup was computed against the wrong estate. Fixed in #1498.

    Together, against a converged prod-ha estate:

    before   workload  resources: null                      -> neutral
    after    workload  {total: 6, present: 6, absent: 0}    -> good
    

    A Kubernetes component now reports exactly like an AWS one, with none of the four items in the description done.

    What is still true here

    The four items stand, with the priority reduced — they are about a second evidence source, not the only one:

    • No kubectl-apply/helm-upgrade capability, so a k8s or Helm component cannot name a deploy unit and composes shell.
    • cfnDeployStacks still string-matches one verb.
    • describeStackStatus still aws-only; stackObserver is still plugins.find(...), singular, so a multi-substrate project gets one observer.
    • helm implements neither hook.

    The one with real remaining value is helm. operator in that estate is a Helm release owning no chant-declared entities, so no rollup will ever exist for it and it stays neutral forever — a correct estate showing a permanently grey node. A helm-upgrade capability plus describeStackStatus over helm status is the only route for that component, and a Helm release maps onto StackStatusObservation almost field-for-field.

    Retitling would be fair: this is "components can only report through CloudFormation-shaped evidence when there is no rollup", and the case that actually needs it is Helm.

  2. lex00 commented on Aug 5, 2026

    @lex00
    ContributorAuthor

    Piece 1 is up as #1499, cut along this issue's own decomposition — the registry seam plus the per-lexicon observer selection, no visible behaviour change. Pieces 2 (kubectl-apply naming its stack) and 3 (k8s describeStackStatus over the stamped labels) are next on the same seam; the registry already carries their inert rows so each lands as a capability + a 30-line observer.

  3. added
    area:core
    enhancement
    on Aug 23, 2026
  4. lex00 commented on Aug 25, 2026

    @lex00
    ContributorAuthor

    Shipped: generic deploy-unit walk (deployUnits), describeStackStatus implemented for k8s (lexicons/k8s/src/describe-stack-status.ts) and helm, and observeComponentStacks now dispatches per-unit-lexicon observers generically — code and tests cite #1495 pieces 3/4. Closing as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions