r/platformengineering • • 19d ago

Design review: a shell as the self-service interface to a platform, where every default is visible through explain. Is this a golden path or a footgun?

I'm designing Convoy Fleet Manager, a POSIX-like shell over Kubernetes, and I'd like platform engineers to review it before any code exists. The pitch to developers is "use the verbs you already know". The pitch to platform teams is "you set the defaults, and your users can always see them".

How it splits the work between the platform team and its users:

  • The platform owns the defaults. Storage classes, queues, packages, budgets, the release path, the provenance each environment requires, whether debugging is allowed: all of these are platform settings. Every command's explain prints the defaults it picked up and where each came from, so "why did my job land there" has an answer without a ticket.
  • Profiles are per environment. A test mount can accept images built in the cluster (provenance: session), while production accepts only CI-attested digests, refuses debug agents, and with release_diff=refuse refuses a release whose plan differs from where the digest last passed.
  • Groups own things, people act. Objects belong to groups, and processes run as svc:<group>. The person is recorded as the actor on every receipt.
  • Approvals are objects, not chat buttons. A policy (say, release to prod-*) creates an approval on the process. It pins the explain output it shows the approver, and only a different person can answer it, from their own session.
  • Cost is part of the plan. It's a band at plan time, a column in ps while running, and a receipt at the end that tightens the next estimate. Budgets are enforced at plan time, not discovered on the bill.
  • There's a typed escape hatch. Unknown commands still run, on one node, and explain says why. Nothing is blocked for lack of an annotation, but nothing gets parallelized by guessing.

It's design-only. The repo has 22 ADRs, nine workload walkthroughs and 24 persona-driven user stories (SRE, platform engineer, data engineer, ML engineer, auditor, app developer...). Their 181 findings have each been applied, drafted or accepted.

What I'd like from this community:

  1. Does a shell belong in an internal developer platform next to Backstage-style portals and golden-path templates, or does it undercut them?
  2. Is "every default is visible and attributed" enough governance, or do platform teams need defaults the user can't see?
  3. Who should own the command annotation database (which commands can be split, how their outputs merge): the platform team, the tool authors, or both?
  4. Would you hand the cost band and budget enforcement to a shell, or keep them in FinOps tooling?
  5. What's missing for you to offer this to your users?
0 Upvotes

3 comments sorted by

1

u/Torutofu_Raeva 19d ago

the unknown-command path is the bit i'd want to pressure-test: can it still reach prod credentials or persistent data, or is that fence enforced outside the shell?

1

u/bright-polaris 19d ago

In my humble opinion that would be a golden path to power users. But most developers hate the terminal. So it would depend on the kind of developers you are working with.

Generally speaking, I think most people prefer GUI when it comes to the tools that provide abstraction. Like ArgoCD for example, the cli is useful when you intend for another tool to use it programmatically. But almost all end users prefer to use the graphical UI.

1

u/Current-Secretary-52 12d ago

The explain part is the best idea in here. "Why did my job land there" is most of the tickets a platform team gets, and printing the default plus where it came from answers it without anyone opening a YAML file.

Where I'd expect it to turn into a footgun:

  1. Familiar verbs with different semantics. rm on a pod is a restart, rm on a namespace is everything in it, and a delete with a finalizer that never clears just hangs. If the shell keeps POSIX names, it has to be louder than kubectl about what a verb does to that kind of object, not quieter. mv across namespaces is the one I'd drop or make very explicit, because it's a copy and a delete, not an atomic move.
  2. explain and admission drifting apart. If the defaults explain prints come from your own config, but the real decision is made at admission (Kyverno, Gatekeeper, a mutating webhook, a LimitRange), the two will disagree the first time someone edits a policy and not the profile. I'd make explain read from the same source admission uses, or say plainly which parts it can't see.
  3. Profiles per environment are good, as long as the gap is visible before the release. provenance: session in test and CI-attested only in production means anything built in a test session can never be promoted. That's the right rule, but people find it at the production step unless explain shows it on the test run.
  4. Who did it. "Groups own things, people act" works if the audit log shows the person, not only svc:something. If the shell talks to the API as a service account, use impersonation so the human ends up in the audit event.
  5. The escape hatch. Someone will need kubectl during an incident. Decide now whether that's allowed and whether it shows up in explain afterwards, or the shell becomes the second source of truth the first time it's bypassed.

So, golden path if it stays a thin layer that shows its work, footgun if it becomes a second API that lags the real one. What happens today when a user runs something the profile doesn't cover: refuse, or fall through to plain Kubernetes?