ArchyRWS architecture
Menu
Search Archy…

Search Archy

CLaaS tenant lifecycle design — request, provisioning, change and retirement

HLDDraftReview not recorded

Work in progress according to its author.

Local drafting workspace

CLaaS tenant lifecycle design — request, provisioning, change and retirement

Automation/tenant-lifecycle-design.md

Local draft — not saved or submitted. Download and use the Git/PR workflow. Changes stay in this page’s memory, never alter the published note, and are lost on reload. The .md download contains the narrative only; preserve the original frontmatter in Git. The preview is not publication validation.

Preview

Images and raw HTML are disabled. Preview links do not navigate. Markdown links are checked when the source is built, not here.

Published source loaded. No local changes.

View source & provenance

1. Introduction and Goals

This HLD describes how a CLaaS tenant cluster moves through its life:

  • an approved request becomes reviewed desired state;
  • desired state becomes a running cluster with its external dependencies;
  • the provider changes and upgrades that cluster;
  • the cluster is retired completely.

It covers the four automation SBBs:

The platform those flows act on is described in the CLaaS platform design.

The intent-to-runtime note defines the generic contract: intent → validate and render → review → apply within authority → observe. This HLD turns that into a concrete tenant journey, with:

  • a named writer for every resource;
  • explicit handoffs to external systems;
  • partial-failure and retry rules;
  • readback evidence;
  • the points where nothing can be undone.

The separate qualities of an offering (catalogue, isolation, recovery) were learned from an earlier workbench's practice of keeping the consumer offering apart from platform internals (CLaaS offering at rws-arch-wb d224d15, lines 35–39). That lesson is reused here. None of its content or approvals are.

This is a draft proposal. No pipeline, repository rule, job template, Argo CD project, credential or external integration has been created by this document. The proposer reports a commit-triggered development path with broad reusable provisioning. That is reported progress. It is not evidence of the reviewed production activation boundary. No failure scenario below has been tested.

Quality goals:

  1. Authorized activation only. Nothing provisions unless an approved request has reached a protected-branch merge reviewed by a second platform engineer, and AAP has then activated that exact revision after its preconditions passed (§8.7). A merge alone is accepted intent; it changes nothing at runtime.
  2. One writer per resource. No two automation systems reconcile the same desired state.
  3. Idempotent, resumable execution. A rerun converges to the same result where the target allows it; a partial run is visible and can be resumed or compensated; a step with an unknown outcome is reconciled, never replayed blindly.
  4. Evidence over status. "Done" is decided by readback of the actual target, not by a job's success flag.
  5. Complete exit. Retirement removes every tenant-owned resource and handles retained data under policy, without touching shared assets.

2. Constraints

Constraint Source Consequence
TOPdesk approval → an engineer's merge request in external GitLab → review by a second platform engineer → protected merge activates AAP Service boundary, automation flow The protected-branch merge is the event that starts AAP. It records accepted intent. Runtime change happens only when AAP promotes that revision through the activation gate (§8.7). TOPdesk has no API connector; the request link is recorded by hand.
Secure-lifecycle SAK: at least two reviewers and signed commits on protected branches (L-SSSL-02); central PAM for privileged access (L-IAM-09) SAK assurance, tenant isolation U3 and U12 The current intent of one second-engineer review is unchanged, but it is not accepted until the security policy owner decides U12. Commit signing and PAM for the AAP activation identity and Argo CD break-glass are open gaps, not satisfied controls.
No arbitrary commit may provision Same The trigger must check the branch and the merge provenance (§8.1).
An Archy documentation merge is not an infrastructure instruction CLaaS index Architecture and operational repositories are separate. Nothing in this vault activates anything.
AAP principally directs provider GitOps and performs external-system work only where needed AAP SBB Kubernetes desired state goes through Argo CD. External systems use explicit, named adapters.
One writer per resource; AAP and Argo CD never reconcile the same state Automation flow The ownership table in §5 is part of the design, not a convention.
Tenant Argo CD: administration of its own instance; no access to central Argo CD; cannot change provider-managed resources Tenant GitOps The provider baseline is protected from the tenant controller as well as from the tenant user (§8.4).
Tailored tenant-admin, not cluster-admin; a non-bypassability qualification gate HCP tenant controls Provisioning hands over the tailored role only, never the admin kubeconfig.
Worker capacity fixed after provisioning; profiles vary by capacity only Service boundary No resize flow exists. A profile change is a new request with its own decision.
Upgrades run by the provider at times the tenant agrees, within policy constraints that are not yet agreed Service boundary The upgrade flow has a negotiation step and an override rule that is still open (§6 L5).
NetScaler publication and storage-quota increases use existing organizational processes Automation flow These are external handoffs with completion evidence, not automated calls.
Network and fabric automation only through Nexus Dashboard, after that service exists Automation flow No direct switch writer in Phase 1 tenant flows.
Provider bootstrap is external and engineer-run, before AAP or GitOps exist Provider bootstrap Tenant lifecycle automation never bootstraps or recovers its own hosting.
Retirement is complete, approved, and handles data and backups under policy. Values are unresolved. Tenant retirement The flow carries an explicit disposition step that cannot be completed by deletion alone.

GitLab's merge-request approval rules are documented as a Premium/Ultimate feature. Protected branches with "Allowed to merge" restrictions are documented for all tiers (G1, G2). The GitLab edition in use is unknown. If approval rules are unavailable, the second-reviewer rule needs another enforcement mechanism (§8.1). The rule must not be assumed to hold. A recorded acceptance of a weaker control would be a risk decision by the policy owner, not evidence that the SAK requirement is met.

3. Context and Scope

Tenant provisioning from approved request to runtime evidence: TOPdesk approval, engineer merge request in external GitLab, second-engineer protected merge, AAP on DCS, then provider GitOps writing MCE, Virtualization and tenant-baseline desired state in parallel with explicit external-system adapters, ending in runtime and readback evidenceView full-size image (opens in a new tab)

How to read the figure. It is an overview, not the full contract; where it is simpler than the text, the text governs:

  • Steps 1–3 are human authorization. The figure marks the protected merge as the activation boundary. In this design the merge produces accepted intent; AAP then promotes that revision to the activated revision at the gate in §8.7. The figure does not draw that gate separately.
  • Step 4 (AAP) splits into two paths:
    • 5b: named external-system adapters, each needing its target, action and owner identified first. NetScaler is shown as a manual organizational process. External prerequisites are read back before the gate opens.
    • 5a: Kubernetes desired state reconciled by provider GitOps, at the activated revision only. The figure's "accepted revision" label on 5a means the revision after AAP has activated it.
  • Step 6 records three separate observations: AAP success, GitOps sync and a usable tenant cluster. These are not one green light.

Tenant and service lifecycle stages and evidence gates: approve, provision, qualify, operate, upgrade and retire, over a platform-readiness band of external bootstrap, role readiness, production assurance and coordinated recoveryView full-size image (opens in a new tab)

The lifecycle figure orders the stages. Each stage records evidence before the next is treated as done. The bottom band is platform readiness that every tenant stage relies on. Its reported dates are not readiness evidence.

In scope: create, baseline change, upgrade, repair hand-off and retirement of one tenant cluster, with its external dependencies. Out of scope:

Actor or system Interface Lifecycle role
Tenant requester TOPdesk request (profile, purpose, contacts) Initiates create, change or retire; agrees upgrade windows
TOPdesk approver (still to be identified) TOPdesk approval Authorizes the request. This is not technical review.
Platform engineer (author) GitLab merge request against the tenant record Translates the request; links the TOPdesk reference
Second platform engineer (reviewer) Merge-request review, protected merge Technical review and activation
External GitLab Protected branch; merge event Desired-state source of truth
AAP on DCS Job triggered by the merge Orchestration, validation, external adapters, readback
Provider Argo CD on the central cluster Applications per tenant Continuous reconciliation of provider Kubernetes desired state
MCE / HyperShift HostedCluster, NodePool Hosted-cluster lifecycle (runtime reconciler)
External systems Infoblox, external Ceph, external OpenBao, Keycloak on DCS Tenant-scoped allocations and identities
Organizational processes NetScaler publication, storage-quota approval, backup policy owner Manual handoffs with completion evidence
Tenant Argo CD Instance inside the tenant cluster Tenant applications only

4. Solution Strategy

  1. One tenant record per tenant. The operational repository holds one declarative record per tenant: identifier, profile, network, DNS, storage and identity parameters, upgrade window, lifecycle state (active, retiring, retired) and the TOPdesk reference. Every downstream artifact is rendered from that record. Nothing is typed in by hand downstream. This applies the earlier lesson that intent, rendered artifact, reconciliation and evidence are distinct things (intent-to-runtime flow at rws-arch-next 9fd9a04, lines 51–56). That flow's NetBox synchronization model is not adopted.

  2. The merge accepts intent; AAP activates it. CI on the merge request validates schema, allocation conflicts and profile limits. It has no side effects. Only a merge to the protected branch starts AAP. AAP checks the merge provenance before it acts. The merge SHA is the accepted revision. Nothing at runtime changes until AAP promotes it to the activated revision at the activation gate (§8.7).

  3. AAP orchestrates and does not hold desired state. AAP renders and commits nothing to the activation branch. It reads the merged revision, runs the external adapters in a fixed order and reads them back, checks the window, and then pins the tenant's provider Argo CD Applications to that exact commit SHA. Argo CD then auto-syncs and self-heals continuously, but only at the pinned SHA. AAP records readback.

    • Provider Argo CD reads rendered manifests from the same repository: from a generated path, or from the record through a renderer plugin. This is open choice LD-2. Either way, the content must be fully determined by the pinned commit.
    • AAP is the single writer of the tenant Application objects. It never writes the Kubernetes objects those Applications deploy.
  4. External adapters converge and are idempotent where the target allows. Each adapter:

    • looks the resource up by its tenant identifier, or by the external resource ID recorded in the execution record where the target cannot tag;
    • creates or updates it to match the record;
    • tags it with the tenant identifier and revision, where the target has a field for that;
    • reads it back.

    Steps that a target cannot make idempotent follow the unknown-outcome rule in §6 L2.

    Each adapter has one scoped identity and one target. There is no "run anything" credential.

  5. The control-plane runtime is separate from desired objects. Provider Argo CD owns the spec of HostedCluster/NodePool. HyperShift owns everything it derives from that spec. Argo CD is configured to ignore controller-written fields, so the two never fight.

  6. The baseline is provider-owned; applications are tenant-owned. The in-cluster provider baseline is delivered by provider Argo CD from the hub, not by the tenant's Argo CD. The tenant Argo CD's own service account is denied the baseline namespaces and provider-reserved cluster-scoped objects (class C in tenant isolation). Tenant cluster-scoped objects (class TC) arise only through the controlled Operator path, not through the tenant Argo CD service account. The non-bypassability gate decides whether this holds (§8.4).

  7. Evidence is separate from status. Every run writes an execution record: revision, request, steps, per-target outcome and readback, plus the remaining open conditions. "Usable" is decided by tenant-facing checks.

  8. Undo is a forward change. A Git revert is a new desired state. It does not reverse external changes, issued credentials or deleted data. Reversal means a compensating, reviewed change or a recovery operation.

5. Building Block View

5.1 Single-writer ownership table

Resource Desired-state source Writer (applies changes) Runtime reconciler Readers Must never be written by
Tenant record GitLab protected branch Human merge (author + reviewer) — CI, AAP, Argo CD AAP, Argo CD, tenant
Tenant's provider Argo CD Application objects on the hub, including the gate field targetRevision (on every source), syncPolicy and the deletion-approval annotation The activated revision (§8.7) AAP activation step only, after the §8.7 preconditions pass Argo CD application controller (status and operation state only) Operations, assurance App of Apps, ApplicationSet, any Application that tracks a branch, tenant, engineers outside a recorded emergency (§8.7)
Per-tenant Argo CD AppProject (allowed source repository and destinations) Provider platform configuration Provider platform-configuration path, outside tenant activation (LD-5) — Argo CD AAP, tenant
HostedCluster/NodePool spec on MCE Rendered from the record at the activated revision Provider Argo CD HyperShift (status, derived objects) AAP readback, ACM AAP directly; tenant
Provider-owned infrastructure inputs: the per-tenant MCE namespace that holds HostedCluster/NodePool; the per-tenant infra namespace object on the Virtualization cluster; its ResourceQuota/LimitRange; the RBAC that scopes the infra credential; the infra credential's ExternalSecret Rendered from the record at the activated revision Provider Argo CD — HyperShift HyperShift, AAP, tenant
Infra credential Secret value OpenBao external-secrets, from the ExternalSecret — HyperShift Argo CD (writes only the ExternalSecret), AAP, tenant
Generated runtime objects: the hosted control-plane namespace and everything in it; in the infra namespace, the KubeVirt VMs, VM root-disk volumes and the backing PVCs that KubeVirt CSI creates for tenant volumes; machine objects Derived by HyperShift and the controllers it drives (KubeVirt, KubeVirt CSI) from the spec and from tenant PVC requests HyperShift and those controllers Same Observability, retirement inventory Argo CD, AAP, tenant directly
Provider baseline inside the tenant cluster (cert-manager, ExternalDNS, external-secrets, MetalLB, monitoring/log forwarding, tenant Argo CD instance and its protected configuration, admission/security policy) Rendered from the record and the pinned release set, at the activated revision Provider Argo CD (hub → tenant destination) Each Operator Tenant (read-only where allowed) Tenant user, tenant Argo CD, AAP directly
Tenant applications and tenant-allowed namespaces Tenant's own GitLab repository Tenant Argo CD (scoped) Tenant workloads Tenant Provider Argo CD (by policy, PD)
Infoblox tenant subzone and delegation Record AAP Infoblox adapter — ExternalDNS (records inside the subzone) ExternalDNS outside the subzone
DNS records inside the subzone Kubernetes resources in the tenant cluster ExternalDNS (provider-managed) — — AAP after handover
Ceph pools/quotas, client identities, RGW account Record (quota values through the storage process) AAP Ceph adapter, or the storage team's process Ceph ceph-csi / KubeVirt CSI Tenant
OpenBao tenant paths, policies, PKI roles Record AAP OpenBao adapter — Tenant (own paths), provider external-secrets (provider paths) Tenant writing provider paths
Keycloak tenant group existence and attributes, and the cluster's OIDC client Record AAP Keycloak adapter — Tenant cluster OAuth Tenant writing provider roles or clients
Keycloak tenant group membership Tenant's delegated administration after handover Tenant (delegated) — Tenant cluster OAuth AAP adapter after handover
NetScaler publication Organizational request NetScaler owner — — AAP (not automated in Phase 1)
Execution record and evidence Produced per run AAP — Operations, assurance Manual editing

No two automation systems write the same field. Operators and controllers that derive runtime objects (HyperShift, KubeVirt, KubeVirt CSI, external-secrets, the baseline Operators) are legitimate runtime writers of what they derive; they are not second desired-state writers. Four splits need care.

Application objects versus deployed objects. AAP writes the tenant's Application objects and nothing those Applications deploy. Provider Argo CD writes the deployed objects and never its own Applications' gate field.

Provider inputs versus generated objects. Provider Argo CD owns the infra namespace object, its quota and the credential scope. It does not own, prune or self-heal what HyperShift and KubeVirt create inside that namespace.

Keycloak memberships. The adapter creates the tenant's groups. The tenant then manages memberships. The adapter's later runs must not overwrite memberships; it reconciles only the group's existence and attributes.

External-secrets. Provider Argo CD owns the ExternalSecret object. External-secrets writes the resulting Secret. OpenBao owns the value.

5.2 Components

Component Responsibility in this flow
Tenant record schema and CI validation Required fields, profile catalogue membership, unique identifiers, no allocation collision, lifecycle-state transitions allowed (for example active → retiring only with a retirement TOPdesk reference)
AAP workflow per lifecycle operation create, change, upgrade, retire. Each runs: precondition checks → external adapters and their readback → activation gate (§8.7) → wait for Argo CD at the activated revision → readback → evidence
Adapter roles One per external system, idempotent where the target allows, with scoped credentials (§4.4); non-idempotent steps follow §6 L2
Provider Argo CD projects One project per tenant, or a destination restriction per tenant. Destinations limited to that tenant's MCE namespace, infra namespace and tenant cluster. Source limited to the operational repository. The project bounds what the AAP-written Applications can reach; it does not limit which commit they name (§8.7).
Tenant Argo CD instance Delivered by the provider. Tenant is admin inside the instance. Its controller service account has only tenant-allowed rights.
Evidence store Holds execution records. Its location is open (LD-6), but must not be the activation branch.

6. Runtime View

The scenarios are the intended design. None has been executed.

L1 — Create a tenant cluster (happy path)

  1. Approve. The requester raises a TOPdesk request naming a catalogue profile. The approver approves it.

  2. Propose. A platform engineer opens a merge request adding the tenant record, with the TOPdesk reference. CI validates it.

  3. Accept. A second platform engineer reviews and merges to the protected branch. The merge SHA is now the tenant's accepted revision. The merge event triggers AAP with that SHA. No provider Argo CD Application points at it yet, so nothing is synced.

  4. Preconditions. AAP checks:

    • the commit is on the protected branch;
    • the merge carries the required approval from someone other than the author;
    • the record is in state active;
    • no other run holds the tenant's lock.

    It then takes the per-tenant lock (§8.8).

  5. External adapters, in dependency order. Each records the target, action, identifier and readback. Each is idempotent where the target allows; the others follow L2:

    • Infoblox: tenant subzone and delegation;
    • OpenBao: tenant paths, policies and PKI roles;
    • Ceph: pools, quotas and client identities, plus the RGW account;
    • Keycloak: tenant groups and the cluster's OIDC client.
  6. Activation gate. AAP runs the §8.7 checks: external readback complete, change window open where one applies, the SHA is the run's own SHA and a descendant of the currently activated SHA, and no newer accepted revision for this tenant is waiting. It then writes the tenant's provider Argo CD Applications with targetRevision set to that full commit SHA, using a conditional update. That SHA is now the activated revision.

  7. Kubernetes desired state. Provider Argo CD auto-syncs the tenant's Applications at the activated SHA. It applies the namespaces, credential references and HostedCluster/NodePool on MCE. HyperShift creates the control plane and the worker VMs (platform R1).

  8. Baseline. Once the hosted API is available, provider Argo CD applies the baseline to the tenant cluster destination, from an Application pinned to the same activated SHA.

  9. Readback. AAP checks:

    • HostedCluster is available at the requested release;
    • the node count matches the profile;
    • baseline applications are synced and healthy at the activated SHA;
    • the subzone resolves;
    • storage classes provision a test volume;
    • OIDC login works for a test identity;
    • the private API is reachable from permitted sources only.
  10. Handover. The tenant-admin group mapping is activated. The tenant receives the tailored role. The admin kubeconfig stays provider-held. The execution record is closed with its open conditions. TOPdesk is updated by hand. The lock is released.

  11. Organizational follow-ups, if requested: NetScaler publication and quota above the profile go through their processes. Completion evidence is attached to the record before the publication is relied on.

L2 — Partial failure and retry

A run can stop at any step. Steps that converge to the record follow the rule rerun the same revision: the rerun either finds the resource already in the desired state (no-op) or completes it. Steps whose outcome cannot be determined by looking the resource up do not follow that rule; they follow the unknown-outcome rule below.

Failure point State left behind Safe response
Before any adapter Nothing Rerun
After some converging adapters Some tenant allocations exist, found by tag or by the external resource ID in the execution record Rerun the same revision; adapters no-op on existing resources
During a non-idempotent step (for example one-time credential issuance) Unknown outcome: the target may have acted without the result being stored Unknown-outcome rule below. No blind rerun.
Before the activation gate External allocations exist; nothing activated; Argo CD still at the previous activated SHA Rerun the same revision, or record it as superseded (§8.7)
Argo CD sync failed or degraded after activation Some objects applied; HyperShift may be mid-creation Fix the cause with a new reviewed revision, or resync the same activated SHA. Do not delete and recreate HostedCluster as a retry.
HyperShift stuck (for example VMs not scheduling) Control plane up, nodes missing Platform diagnosis; the run stays open; no automatic retry loop
AAP lost mid-run (DCS outage) Lock held by a run whose executor state is unknown; unknown progress Lock takeover procedure in §8.8. The lock is not released merely because the parent job record says failed or lost.
Readback fails Resources exist but a check failed Run marked not usable; no handover

Rules:

  • No automatic retry of a non-idempotent step. One-time credential issuance is the main example. Issuing at the target and storing the value in OpenBao are two writes to two systems. They are not atomic, even inside one adapter step.
  • Unknown-outcome rule. Before calling the target, the adapter records its intent and a request identifier in the execution record. If the run is lost between issue and store, the step is marked outcome unknown and reconciled by a person or a dedicated reconcile run, never by replaying the issue call:
    1. Query the target for credentials of this identity, by tag or by the recorded external resource ID, and read OpenBao's stored version for the path (for KV version 2, its version metadata; writing with check-and-set, O1, then refuses a silent second write).
    2. Target shows nothing issued: issue once, store, record.
    3. Issued and stored, with matching identifiers: record as done.
    4. Issued but the value is not stored and cannot be recovered from the target: a deliberate, coordinated rotation. Issue a replacement, store it, deliver it, and verify that every consumer has adopted it. Only then revoke the orphaned credential. Existing consumers keep their working credential until the replacement is proven (secrets management).
    5. The target cannot be queried, or the result is ambiguous: the step stays blocked with its record open.
  • A newer revision does not overtake an in-progress run. The lock serializes runs per tenant. A run whose revision has been superseded by a newer accepted revision for the same tenant stops before the activation gate and is recorded as superseded, not silently skipped. The newer revision then runs from its own start (§8.7).
  • Abandoning a failed create is a retirement. It goes through L6 with its own record. It is never a "delete what the job made" shortcut.

L3 — Conflicting writers and drift

  • A change made directly to a resource owned by provider Argo CD shows up as drift and is reverted by self-heal. The exception is a recorded emergency change with reconciliation suspended (platform §8.6).
  • Self-heal does not cover the tenant's Application objects themselves, because no parent Application manages them (§8.7). A direct edit of their gate field is detected by AAP, which compares each Application's targetRevision with the activated SHA in the execution record at the start of every run and in readback. A mismatch blocks further activation for that tenant until it is explained and reconciled. How often the comparison also runs between lifecycle operations is an LLD choice; no scheduler is designed here.
  • If an adapter finds an external resource with the tenant's identifier but a different owner tag, it stops and reports a conflict. It does not take the resource over.
  • Argo CD's FailOnSharedResource sync option fails a sync when another Application has already applied a resource (A1). It is proposed for provider applications, so two tenants' records cannot claim the same object.

L4 — Baseline or configuration change

The same path as L1, with the record changed by a reviewed merge request:

  • AAP runs only the adapters whose inputs changed;
  • AAP activates the new revision at the gate (§8.7); Argo CD then syncs it;
  • readback covers the changed scope plus a fixed smoke set.

A merge that changes only a tenant's record does not reach that tenant's cluster until AAP activates it. A merge that touches several tenants is activated per tenant, each under its own lock.

Baseline changes that apply to every tenant come from a change to the pinned release set. They roll out to a bounded set of tenants first, then wider, as fleet policy delivery proposes.

L5 — Provider-run upgrade with a tenant-agreed window

  1. A new release set is qualified and pinned (platform §8.7). Management-side steps (MCE cluster, MCE, Virtualization) are provider maintenance (platform R9).

  2. Each tenant record carries an agreed window. The tenant agrees it through TOPdesk or a recorded contact. A merge request sets the target release for that tenant. The merge is accepted intent only. Because the tenant's Applications stay pinned to the previously activated SHA, the merge cannot start the upgrade outside the window.

  3. In the window, AAP:

    • checks the version-skew preconditions;
    • pauses NodeHealthCheck remediation;
    • re-checks that the window is still open, then activates the revision that changes the HostedCluster release (§8.7). A second revision, or a second activation step, changes the NodePool. Each is a separate gate.
    • reads back the skew condition and tenant smoke tests.

    If the window closes before the gate, nothing is activated and the run stays pending. If it closes after activation, the change already in progress is not reversed; the remaining steps wait for the next window.

  4. If the tenant does not agree a window before a security deadline, a policy decides. That policy (deadline, notification, escalation, forced window) is not agreed. The design reserves a provider-override path that is recorded, approved and visible to the tenant, and does not exercise it until the policy exists.

  5. There is no rollback claim. Failure handling is forward fix or recovery.

L6 — Approved complete retirement

Retirement separates three kinds of access and revokes them at different points: tenant people and new requests; tenant reconcilers that could re-create resources; and the provider identities and application integrations still needed to quiesce, back up, export and clean up. Revoking everything at once would leave the final backup or the cleanup unable to run. The storage-side ordering is in the storage and recovery design (D-S8, D-S9); the network-side ordering is in the network design. This flow follows both.

  1. Approve. A TOPdesk retirement request is approved. The data-disposition decision is recorded with the policy owner for each data unit: export, retention, legal hold or deletion.

  2. Stop new public traffic. The NetScaler publication is withdrawn through its organizational process. Readback confirms the publication is gone and the backend is unreachable from the perimeter before anything destructive happens.

  3. Freeze people and reconcilers. A merge request sets the record to retiring; AAP activates it (§8.7). AAP:

    • stops new requests for this tenant (the record state blocks them in CI);
    • removes tenant human write access: the tenant-admin group mapping and tenant logins through the Keycloak client. If the disposition requires the tenant to export its own data, that export is completed before this step, or is done through a provider-mediated, read-only path recorded in the disposition;
    • stops tenant reconciliation: disables the tenant Argo CD applications and removes their repository credentials, so nothing re-creates resources;
    • keeps the provider Argo CD Applications pinned at the activated SHA, with pruning and deletion requiring confirmation (step 6).

    Tenant application secrets, the provider backup identity (OADP), the backup destination credential, the CSI driver identity and any application integration that quiescence or export needs stay valid at this point.

  4. Protect data. For each data unit, under the agreed disposition: quiesce the application where needed, run the final backup or export, and verify that the bytes are at the destination and restorable, not only that the job succeeded (workload protection). A data unit that must be retained in place is moved out of the deletion scope first (step 6). Only then are the remaining tenant machine credentials revoked: OpenBao tenant tokens, tenant S3 keys, any tenant-readable Ceph identity. Provider cleanup identities stay.

  5. Decommission gate. Before the parent HostedCluster is deleted, AAP records and a platform engineer confirms:

    • an inventory of every data unit and every generated runtime object (§5.1) for the tenant, from the targets rather than from the record;
    • each data unit's disposition is complete and verified, or the unit is an explicit retained allocation: identified, protected from cascade (for example detached from the infra namespace or held under a Retain reclaim policy, per D-S9 and LD-10), with an owner and expiry;
    • no step of this tenant is in outcome unknown (L2) and no other run holds the lock (§8.8).

    A failure blocks deletion.

  6. Remove runtime. AAP activates the revision that removes HostedCluster/NodePool, runs a prune sync at that same activated SHA, and sets the Application deletion approval that Prune=confirm waits for (A1). Provider Argo CD then prunes them. The vendor removal path for OpenShift Virtualization deletes the managed-cluster resource and the hosted cluster with its backend resources (P8 §16.3). Readback confirms no VMs or PVCs remain in the infra namespace except the explicit retained allocations. Remove the infra namespace, quota and credential only after every retained allocation has a qualified lifecycle and access path independent of them. Otherwise retain the required namespace, quota and scoped access under the approved disposition, and block their deletion.

  7. Remove external allocations, after runtime readback:

    • Keycloak client and groups;
    • Ceph/RGW backend scope, through storage operations, following the disposition. Retained data stays, under a recorded access boundary and expiry. Provider cleanup identities are revoked last, after the backend readback;
    • OpenBao tenant paths, policies and PKI roles;
    • MetalLB advertisements and leaf filters, ExternalDNS records, the Infoblox subzone, then IPAM and VLAN allocations under DDI's reuse rule.

    Identifiers and allocations (addresses, VLANs, subzone name, tenant identifier) are not released for reuse while any step for this tenant is in outcome unknown or any retained allocation still refers to them.

  8. Verify and close. Readback confirms:

    • no tenant-tagged resource, or resource recorded by ID, remains in any target, except recorded retained items;
    • shared assets are untouched: the parent zone, other tenants, the provider baseline.

    The emptied tenant Application objects are removed in a recorded step. The record becomes retired and is kept as history. TOPdesk is closed.

What the Argo CD options protect, and what they do not. Prune=false, Prune=confirm and Delete=confirm (A1) act only on Argo CD's own prune and delete operations: a sync that would prune a resource, or deletion of an Application with the cascading finalizer (A6). They do not stop:

  • HyperShift deleting the hosted control-plane namespace, VMs and backend resources when the HostedCluster is deleted (P8 §16.3);
  • KubeVirt CSI or the CSI driver removing backing volumes under a Delete reclaim policy;
  • Kubernetes deleting every object in a namespace when that namespace is deleted, or garbage-collecting dependents whose owner is deleted (K2).

That is why the decommission gate (step 5) and the per-data-unit disposition come before the parent HostedCluster or any namespace is deleted. The Argo CD options remain useful against an accidental prune; they are not the data-protection control.

Retirement is not complete while backups, audit records or legal holds stay unresolved. Those carry their own expiry and disposal owner (tenant retirement). The retention values are not agreed.

L7 — Something the tenant cannot do

These attempts must be refused, and each refusal is a qualification test (§10):

  • a tenant Argo CD sync that targets a baseline namespace, a provider-reserved cluster-scoped object (class C), any cluster-scoped object at all (the tenant Argo CD service account holds no cluster-scoped write rights), or its own controller's RBAC. Tenant cluster-scoped objects (class TC, for example CRDs from an allowed tenant Operator) are created only through the controlled Operator path under the admission rules in tenant isolation §8.4. Whether that path itself is safe is part of the non-bypassability gate, not a settled fact;
  • a tenant-admin change to the tenant Argo CD instance's protected configuration (for example widening its service account);
  • tenant use of the provider-held admin kubeconfig or the infra credential — neither is ever delivered to the tenant;
  • an unreviewed commit to the protected branch;
  • any change to the provider Argo CD Applications or AppProjects for its cluster.

7. Deployment View

Element Placement Depends at runtime on Notes
Operational repository External GitLab GitLab service Initial choice. Forgejo on DCS is only a possible later move, never a second writable source.
AAP controller and execution environments DCS DCS, OpenBao (credentials), GitLab (source), target APIs AAP's own hosting and start-up do not need ACM, so AAP keeps running and can run external-system jobs during a hub outage. The normal provisioning workflow does need the hub: its activation gate writes the provider Argo CD Applications on the hub, and Argo CD there applies the Kubernetes state. Execution identities come from OpenBao or native identities.
Provider Argo CD Central ACM/Global Hub cluster Hub cluster, GitLab, destination APIs Unavailable during a hub outage, which stops all provisioning and change (platform R6). AAP runs reaching the activation gate during the outage wait; they do not activate by another route.
Tenant Argo CD Inside each tenant cluster Tenant cluster, organizational GitLab Tenant-scoped
Execution records Location open (LD-6) — Must survive AAP loss and be reachable during recovery
Bootstrap tooling External engineer workstation/environment Approved registries, OpenBao, GitLab Separate from tenant automation (bootstrap)

The tenant lifecycle depends on the following being up together:

  • GitLab;
  • DCS (AAP and Keycloak);
  • the hub (provider Argo CD);
  • MCE and Virtualization;
  • OpenBao, Infoblox and Ceph.

Provisioning availability is therefore the product of those availabilities. That is acceptable because provisioning is not a running-workload dependency. It must still be communicated: a hub or DCS outage blocks every lifecycle operation, including emergency retirements and upgrades.

8. Crosscutting Concepts

8.1 Activation integrity

The activation boundary has three parts, and each must be enforced, not assumed:

  1. Branch protection. Nobody can push to the activation branch; only listed roles can merge (G2, available on all tiers).
  2. Second-engineer review. A required approval from someone other than the author (G1, Premium/Ultimate). If that tier is not available, the AAP precondition check (L1 step 4) must verify an approval by someone other than the author through the GitLab API before it acts. That is a weaker, detective control, and the decision to accept it is open (LD-1).
  3. Trigger authenticity. AAP accepts a trigger only for the protected branch and only for an authenticated GitLab source. It then fetches the commit itself rather than trusting event content.
  4. Activation gate. A merge is accepted intent. Runtime state changes only when AAP promotes the revision through the gate in §8.7.

Commit signing and a second reviewer, as the secure-lifecycle SAK requires (L-SSSL-02), are an open policy decision (tenant isolation U12, SAK assurance). The one-second-engineer intent is kept as the design input. It is not treated as meeting the SAK until the policy owner decides.

The TOPdesk reference in the record is checked for presence and format. Whether it can be checked against TOPdesk without an API is open. The current answer is "by the reviewer".

8.2 Credentials

Identity Holder Scope Notes
GitLab read token for AAP/Argo CD AAP, provider Argo CD Read the operational repository Cannot push to the activation branch
AAP → Argo CD (activation identity) AAP Create, update and delete the tenant's Application objects in that tenant's project, plus read and refresh. Sync only at the revision already in the Application. Not Argo CD admin; no project, repository, cluster or key administration; no override. Not field-scoped: neither Argo CD RBAC nor Kubernetes RBAC can limit an update to targetRevision (A4, K1), so this identity can change any part of the tenant's Applications within the AppProject bounds. That is a recorded residual risk (§8.7), not a sync-only credential.
Argo CD → MCE Provider Argo CD Tenant namespaces and HostedCluster/NodePool Not cluster-admin on MCE
Argo CD → tenant cluster Provider Argo CD Baseline namespaces and the cluster-scoped resources the baseline needs Created at handover; stored on the hub; revoked at retirement
Adapter identities (Infoblox, Ceph, OpenBao, Keycloak) AAP One system, one action set each Per-tenant scoping where the target supports it
Hosted cluster admin kubeconfig MCE (HyperShift) Full tenant cluster Provider break-glass only; not used by automation day to day

Values live in OpenBao. Delivery, rotation and break-glass custody are in the identity and trust design.

8.3 Idempotence keys and tagging

Where the target has fields for it, every external resource carries:

  • the tenant identifier;
  • a managed-by marker naming the adapter;
  • the last-applied revision.

Not every target supports such fields on every resource type. Where it does not, the execution record holds the external resource ID returned by the target, and that ID is the lookup key. Adapters look resources up by tag or recorded ID, never by name guess. Readback compares what exists with the record. Retirement uses the same tags and IDs to find what to remove (§6 L6). A resource that is neither tagged nor recorded is never deleted automatically.

8.4 Protecting the provider baseline from tenant Argo CD

Argo CD acts through a controller service account. That account must hold the rights for everything it deploys, and tenants can escalate through the controller's privileges (feasibility claim 4, OpenShift GitOps 1.22 multitenancy). The design therefore:

  • gives the tenant Argo CD controller an explicitly bounded role, not cluster-admin;
  • keeps that instance's configuration (its CR and its RBAC) under provider Argo CD, so tenant-admin cannot edit it;
  • has provider Argo CD reconcile the baseline from the hub, so a tenant change to a baseline object is reverted. Reverting is detection plus correction, not prevention; prevention is the role design.

Whether the tailored tenant-admin role can still change the instance's configuration, or obtain the controller's rights indirectly (for example through an Operator install), is exactly the non-bypassability qualification gate. If that gate fails, the tenant Argo CD service ceiling must be renegotiated. It must not be presented as protected. The permission model is in tenant isolation.

8.5 Evidence

An execution record holds:

  • TOPdesk reference, merge SHA and approver identities (no secrets);
  • the accepted SHA, the previously activated SHA and the newly activated SHA (or the reason the run stopped before the gate: superseded, window closed, blocked);
  • the lock holder, run identifier and fencing epoch (§8.8);
  • the operation, and per-step target, action, identifier (tag or external resource ID), outcome (done, no-op, failed, outcome unknown) and readback;
  • Argo CD sync revision and health for each application;
  • tenant smoke-test results;
  • open conditions;
  • links to organizational handoff completions.

It is the input for production assurance and for retirement inventory. A green AAP job, a synced Argo CD application and a usable cluster are recorded as three separate facts.

8.6 Lifecycle dependency independence

Tenant lifecycle automation runs on DCS and the hub. It must never be the way those provider clusters are restored: their recovery uses external bootstrap and break-glass access. DCS does not bootstrap itself. After a provider recovery, tenant runs resume from their execution records (L2), not from assumptions.

8.7 Activation gate: accepted revision versus activated revision

Problem. Provider Argo CD reconciles continuously and self-heals. If its Applications tracked the protected branch, a merge would be synced within the polling interval (A2), before AAP had read back external prerequisites, checked an upgrade window or checked that no newer revision is pending. The merge would then be the runtime activation, and AAP's checks would only run afterwards.

Proposed contract. Two revisions are kept apart for every tenant:

Revision Meaning Where it is held Who sets it
Accepted Reviewed intent: the protected-branch merge SHA The protected branch and the execution record Human merge (author + reviewer)
Activated The commit provider Argo CD may apply for this tenant targetRevision on each of the tenant's provider Argo CD Applications, as a full commit SHA, mirrored in the execution record AAP activation step only

The mechanism uses standard Argo CD behaviour only; no extra service or engine is introduced:

  1. Pinning. Each tenant's provider Applications name a full commit SHA in targetRevision, on every source. Argo CD documents that an Application pinned to a commit changes live state only when its tracking revision is changed (A3). The Applications never track a branch, tag or HEAD.
  2. Continuous reconciliation at the pinned SHA. The Applications use automated sync with self-heal (A2). Argo CD keeps reconciling and correcting drift continuously, but only towards the activated SHA. A new merge on the branch is never observed by these Applications.
  3. Single writer of the gate field. The tenant's Applications are standalone objects written only by the AAP activation identity. They are not generated by an ApplicationSet and not managed by an App of Apps or any other Application that tracks Git; either would overwrite the gate field from a branch. AAP renders each Application from the template in the operational repository at the SHA being activated, so the Application definition is itself reviewed content. The tenant's AppProject is written by a separate provider platform-configuration path and limits source repository and destinations (LD-5).
  4. No sync to another revision. Argo CD 3.2 and later can require the override privilege for a sync that names a revision other than the Application's own (application.sync.requireOverridePrivilegeForRevisionSync), and an override sync is not possible while auto-sync is enabled (A4). The design sets this option and grants override to no automation identity. Support of this option in the pinned OpenShift GitOps release is not verified.
  5. Promotion. AAP promotes an accepted SHA to activated only after these checks pass, in this order, inside the run that holds the tenant's lock (§8.8):
    • the SHA is the run's own SHA, fetched by AAP from GitLab (§8.1), on the protected branch, with the required approval;
    • the SHA is a descendant of the currently activated SHA, so an older or replayed trigger cannot roll the tenant back. A new tenant has no activated SHA yet; AAP creates its Applications at the first activation, and the other checks still apply;
    • no newer protected-branch commit that changes this tenant's rendered inputs exists; if one does, this run stops and is recorded as superseded;
    • every external prerequisite for this revision has been read back (L1 step 5), and no step of this tenant is in outcome unknown (L2);
    • the change window applies and is open, where the change needs one (L5);
    • each Application's current targetRevision equals the activated SHA in the execution record. A mismatch means someone else wrote the gate field; the run stops.
  6. Conditional write. AAP writes each Application with an update that carries the resourceVersion it read. Kubernetes rejects a stale update with 409 Conflict (K3). On conflict AAP re-reads and re-runs the checks; it never overwrites blindly. A tenant has several Applications (MCE-side, infrastructure-side, baseline), because each Application has one destination. Their updates are not atomic together. A run interrupted between them leaves activation partial, recorded per Application; it is completed by writing the same SHA to the remaining Applications, which is idempotent, or superseded by a newer activation.
  7. Emergency and break-glass. A person may change a tenant's Applications only under the recorded emergency procedure (platform §8.6). The next AAP run detects the mismatch (L3) and stops until it is reconciled.

Residual risk, recorded rather than hidden. Neither Argo CD RBAC nor Kubernetes RBAC can restrict an update to one field of an Application (A4, K1). The AAP activation identity therefore holds update rights on the whole of each tenant Application. Within the AppProject bounds, a compromised or faulty activation identity can name any commit in the operational repository, including an unreviewed merge-request commit, and change sync options. The branch, approval and descendant checks are performed by AAP itself, so they are detective controls inside the system being protected (compare LD-1). Mitigations proposed: the activation identity is used only by the activation step; Argo CD audit of Application changes is forwarded; readback compares targetRevision with the protected branch; and, if the policy owner adopts signed commits (U12), Argo CD source-integrity verification (A5) could refuse unsigned commits. That last control proves a signature, not branch membership.

Alternatives (LD-3):

  • Branch tracking with automated sync, and AAP checking afterwards. Rejected: this is the contradiction described above.
  • Branch tracking with automated sync off, and AAP triggering every sync. No continuous self-heal; drift persists until the next AAP run, and a manual sync from the branch still picks up the newest merge rather than the checked one.
  • AAP promotes by pushing a separate "activated" branch or tag per tenant that Argo CD tracks. Equivalent gate, but AAP then needs Git write access. That conflicts with "AAP commits nothing" (§4.3) and moves the residual risk to a Git credential. Kept as the fallback if Application-level pinning fails qualification (T13–T19).

8.8 Per-tenant serialization and lock takeover

Runs for one tenant are serialized. The lock record holds the tenant, run identifier, executor identity, accepted SHA, a fencing epoch that increases on every takeover, and the time taken. It must survive the loss of AAP and be readable during recovery, together with the execution record (LD-6).

Mechanism: an LLD gap (LD-9). This HLD does not select or verify a lock store, and does not claim strong compare-and-set for one. The two candidates are:

  • Non-concurrent workflow template. AWX documents that job templates run one at a time unless concurrent jobs are enabled (W1). That serializes all tenants, not only one, and is simple. AAP equivalence for the pinned release is not verified.
  • A per-tenant lock object written with a conditional update. For example a Kubernetes object on the hub, using the resourceVersion precondition (K3). Per-tenant, but one more object to own.

Either way: a run that finds the lock held is queued or recorded as deferred, never dropped silently. Every run ends as completed, superseded or blocked. There is no time-based automatic release of the lock and no timer service is designed.

Takeover when the holder is lost. A lost AAP job, a DCS outage or a failed parent workflow does not release the lock by itself. Child jobs and their executors may still be running, and external calls may have completed without being recorded. A platform engineer takes over only after:

  1. Reconciling the old run. From AAP (when reachable) and the execution record: the parent job, every child job and every executor it started, and each one's last known state.
  2. Fencing the old writer. Cancelling those jobs and confirming that they ended is not enough on its own if the executor is unreachable. The old run is fenced by revoking or rotating the credentials it held (adapter identities and the activation identity) or by disabling its execution capacity, so a delayed executor cannot write after takeover.
  3. Reconciling side effects. Each step is reconciled against its target under the L2 unknown-outcome rule. Each tenant Application's targetRevision is compared with the record, to see whether the old run activated anything.
  4. Recording the takeover with a new fencing epoch. The new run then reruns or supersedes the old revision.

The fencing epoch is a record, not an enforcement point: the external targets do not check it. The enforcing fences are credential revocation and, for the gate field, the conditional Application update in §8.7. Adapter identities are scoped per system and possibly shared across tenants (§8.2), so revoking them can pause other tenants' runs. That cost is accepted over an unfenced writer.

If the old writer cannot be shown to be stopped or fenced, takeover is blocked. An unknown old writer is a blocker, not a delay to wait out.

9. Architectural Decisions

Proposals, not approved ADRs. LD-n are local shorthand only.

ID Decision Status Trade-off
LD-1 Enforce second-engineer review with GitLab approval rules; if unavailable, AAP verifies an approval by someone other than the author before acting Open (depends on GitLab tier) A preventive control versus a detective check performed by the system being protected
LD-2 Provider Argo CD consumes rendered manifests (committed by CI to a generated path) or renders from the record through a plugin Open Committed output is reviewable and reproducible, but a CI identity must be allowed to commit to a generated path without becoming a desired-state writer for the record. A plugin avoids the extra commits but hides the rendered state from review.
LD-3 Activation gate: provider Argo CD Applications pinned to the last activated commit SHA; AAP alone promotes an accepted SHA after its checks, window and external readback; Argo CD then auto-syncs and self-heals at that SHA; no App of Apps or ApplicationSet manages the tenant Applications (§8.7) Proposed (replaces "AAP triggers a sync at the merge SHA") Removes the contradiction between continuous auto-sync and an AAP gate, using standard Argo CD pinning. Costs: AAP holds update rights on whole tenant Applications (not field-scoped), Applications sit outside GitOps self-heal, and several Applications per tenant are not updated atomically. Fallback: an AAP-pushed per-tenant activation ref, which needs a Git write credential.
LD-4 Provider baseline in tenant clusters is delivered from the hub, not by the tenant Argo CD instance Proposed Keeps the baseline out of tenant authority. Baseline delivery stops during a hub outage; existing state keeps running.
LD-5 One provider Argo CD project or destination restriction per tenant Proposed Limits the blast radius of a bad record. More objects to manage at a few dozen tenants.
LD-6 Location of execution records Open Must survive AAP/DCS loss. A Git evidence repository, the AAP database, or an organizational records service each have different retention and access consequences.
LD-7 Forced-upgrade policy when no window is agreed Open, not agreed Security currency versus the tenant-agreed timing promise
LD-8 Retirement data disposition and retention values Open, owned by policy Cannot be decided by this design
LD-9 Per-tenant serialization mechanism: non-concurrent workflow template, or a per-tenant lock object with a conditional update (§8.8) Open, LLD Global serialization is simple but queues all tenants; a per-tenant lock adds an owned object. Neither is verified. No time-based lock release in either case.
LD-10 How a retained data unit is kept out of the cascade when its HostedCluster and infra namespace are deleted (for example a Retain reclaim policy, or moving the volume out of the namespace before deletion) Open, with storage D-S9 Must be decided before the first retirement with retained in-place data. Until then, the only safe disposition is verified backup or export before deletion.

10. Quality Requirements

None of these has been run. Targets marked unset have no agreed numbers.

ID Scenario Measure Pass condition
T1 Unreviewed change Push to the activation branch; merge without second-engineer approval; trigger AAP from a non-protected branch or a forged event All refused or ignored; nothing is provisioned; the attempt is logged
T2 Request traceability For a provisioned tenant, follow TOPdesk → merge request → merge SHA → AAP run → Argo CD revision → readback Complete chain, with no manual reconstruction
T3 Idempotent rerun Rerun the same revision after success No changes; all adapters report no-op
T4 Partial failure Interrupt AAP after each adapter in turn; rerun. For one-time credential issuance, interrupt between issue and store. Converging adapters reach the same end state with no duplicate allocations. The issue-store interruption is marked outcome unknown, is not replayed, and is resolved by reconciliation or a coordinated rotation with existing consumers still working
T5 Conflicting ownership Pre-create an external resource with the tenant identifier but another owner; and two tenant records claiming one object Adapter stops with a conflict; Argo CD sync fails on the shared resource
T6 Writer separation Edit a provider-owned field directly; edit a HyperShift-derived field through Argo CD Self-heal reverts the first; no ownership fight on the second (no repeated sync loop)
T7 Tenant Argo CD ceiling From tenant Argo CD: sync into a baseline namespace, a class C cluster-scoped object, any cluster-scoped object, and its own RBAC; from tenant-admin: edit the instance configuration All refused (feasibility claim 4 tests d–e). Class TC objects are tested separately on the Operator path (tenant isolation T-17)
T8 Upgrade in window Upgrade two tenants with different windows Each upgraded only in its window; the skew condition stays true; tenant smoke tests pass
T9 Retirement completeness Retire a representative non-production tenant No tenant-tagged or recorded resource remains except recorded retained items; shared assets unchanged; reconciliation cannot re-create anything
T10 Retirement safety Attempt retirement without approval, with a missing disposition decision, with an unverified final backup, with a step in outcome unknown, or with a public publication still active Blocked before any destructive step; the parent HostedCluster is not deleted
T11 Hub/DCS outage during a run Stop the hub or DCS mid-run; recover Execution record shows the exact state; takeover follows §8.8; rerun completes; no orphaned allocations
T12 Lead time Time from merge to usable cluster for the launch profile Measured and recorded; target unset
T13 Early sync denial Merge a change for a tenant while AAP is stopped; wait well past the Argo CD polling interval No tenant Application changes revision; live state unchanged; the merge appears only as accepted intent
T14 Wrong SHA Trigger AAP with an unmerged commit, a commit on another branch, and a SHA that differs from the one AAP fetched; attempt a sync naming another revision with the AAP identity Gate refuses each; the revision-sync attempt is refused without the override privilege
T15 Replay Replay an older, already activated trigger after a newer activation Refused: the SHA is not a descendant of the activated SHA; nothing rolls back
T16 Window closed Merge an upgrade outside the tenant's window; let the window close while a run waits at the gate Nothing activated outside the window; the run stays pending
T17 Newer revision during a run Merge revision B while the run for A is between adapters and the gate Run A stops before the gate and is recorded superseded; B runs from its start; A is never activated on its own
T18 Gate-field conflict Change one tenant Application between AAP's read and write; separately, edit targetRevision by hand The conditional update fails with a conflict and AAP re-checks; the hand edit is detected at the next run and blocks activation
T19 Lock takeover Kill the AAP parent job while a child job keeps running; attempt takeover before and after fencing Takeover blocked while the child can still write; allowed only after reconciliation and fencing; the epoch increases
T20 Cascade awareness In qualification, delete a HostedCluster whose infra namespace holds a test PVC under each candidate LD-10 mechanism, with and without Delete=confirm/Prune=false on it Records which mechanism keeps the volume. Confirms that the Argo CD options alone do not

11. Risks and Technical Debt

Risk Effect Response
Second-engineer review not enforced (tier or configuration) A single person can provision LD-1; T1 before production
Dev commit-triggered path carried into production unchanged Arbitrary commits provision T1; the activation boundary is a release gate
AAP and Argo CD both writing the same Kubernetes objects Endless overwrites, non-deterministic state Ownership table §5; T6
Merge synced before AAP's checks (branch-tracking Applications) External prerequisites, windows and supersession bypassed Activation gate with pinned SHAs (§8.7, LD-3); T13–T18
AAP activation identity can update whole tenant Applications (not field-scoped) A compromised identity could point a tenant at an unreviewed commit within the AppProject bounds Recorded residual risk; single-purpose identity; audit; readback against the branch; signed-commit verification if adopted (§8.7)
Non-idempotent adapter (one-time credential, create-only API) Duplicates, orphaned credentials or consumers broken on retry Unknown-outcome reconciliation, coordinated rotation with consumer adoption before revocation, tags or recorded IDs (§6 L2, §8.3); T4
Lock released after a lost job while an executor still writes Two writers for one tenant Takeover only after reconciliation and fencing (§8.8, LD-9); T19
Parent deletion cascades to data that should be retained Data loss despite Argo CD deletion options Decommission gate before parent deletion; LD-10; T20
Tenant Argo CD escalation through controller rights or Operator installs Provider baseline changed by the tenant Non-bypassability gate; renegotiate the ceiling if it fails
Manual organizational handoffs (NetScaler, quota, TOPdesk) Lifecycle "done" while a handoff is pending Completion evidence attached before reliance; open conditions in the record
Hub or DCS outage blocks all lifecycle actions No emergency retirement or upgrade Documented manual procedure with break-glass; recovery order
Retention policy values unknown Retirement cannot complete LD-8, owned by policy; retained-data boundary recorded meanwhile
Forced-upgrade policy unknown Security deadline conflicts with tenant timing LD-7
Execution record lost with DCS Retry relies on guesswork LD-6

Accepted debt: TOPdesk linkage is manual. NetScaler and quota increases are not automated. Tenant-cluster break-glass beyond the admin kubeconfig is stretch scope.

12. Glossary

Term Meaning here
Tenant record The declarative per-tenant desired state in the operational repository
Activation branch The protected branch whose reviewed merges trigger AAP
Accepted revision A reviewed protected-branch merge SHA: intent, not yet applied
Activated revision The commit SHA AAP has written into a tenant's provider Argo CD Applications after the gate checks; the only revision Argo CD applies for that tenant
Outcome unknown A step whose effect on its target cannot be determined from the execution record; reconciled, never replayed
Adapter An AAP role that converges one external system to the tenant record, with one scoped identity
Readback Reading the actual target state after a change and comparing it with the record
Execution record The per-run evidence of what was attempted, what happened and what remains open
Provider baseline The provider-owned components and policies inside each tenant cluster
Retirement disposition The approved decision about export, retention, holds and deletion of tenant data and backups

Sources consulted

Observed 2026-10-21. These are documentation statements, not tests of the operational repository or controllers.

Ref Source and section Version note
G1 GitLab: Merge request approval rules, page header tier statement Current documentation; the deployed GitLab edition and version are unknown
G2 GitLab: Protected branches, tier statement and "Push and merge permissions" Same
A1 Argo CD: Sync Options: "No Prune Resources", "Resource Pruning With Confirmation", "Resource Deletion With Confirmation", "Fail the sync if a shared resource is found" Upstream stable documentation. The OpenShift GitOps 1.22 support status of each option was not verified; the same applies to A2–A6.
A2 Argo CD: Automated Sync Policy: "Automatic Self-Healing", "Automated Sync Semantics" (one sync per commit SHA and parameters; default reconciliation interval 120 s plus jitter) Upstream stable documentation
A3 Argo CD: Tracking and Deployment Strategies: "Commit Pinning", "HEAD / Branch Tracking" Same
A4 Argo CD: RBAC Configuration: "The applications resource" (update/delete on the application versus its resources), "The override action" (requireOverridePrivilegeForRevisionSync, new since 3.2; no override sync with auto-sync enabled) Same. Argo CD RBAC actions apply to the whole Application; no field-level action is documented (inference from the listed actions)
A5 Argo CD: Git GnuPG signature verification Same; sourceIntegrity form since 3.5
A6 Argo CD: App Deletion: "About The Deletion Finalizer" Same
K1 Kubernetes: Using RBAC Authorization, "Referring to resources" RBAC rules name API groups, resources, resource names and verbs; no field-level rule exists (inference from the rule schema)
K2 Kubernetes: Garbage collection, "Cascading deletion"; Namespaces walkthrough, "Deleting a namespace" ("This deletes everything under the namespace") Upstream current documentation; behaviour present in 1.35
K3 Kubernetes: API concepts, "Resource versions" / update conflicts (stale resourceVersion → 409 Conflict) Same
O1 OpenBao: KV secrets engine version 2, check-and-set (cas) on write Upstream current documentation; the deployed OpenBao version and engine configuration are unknown
W1 AWX 24.6.1 user guide: Job Templates, "Concurrent Jobs" Upstream AWX; equivalence with the AAP release in use is not verified
P8 OpenShift 4.22 Hosted control planes, Ch. 16 Destroying a hosted cluster, §16.3.1 Latest GA line observed; not a deployed-version claim

Hosted-cluster lifecycle, update and storage references are cited in the platform design. The Argo CD controller-privilege and OLM evidence comes from the feasibility register with its stated limits. Historical workbench inputs are cited in §1 and §4 as lessons only.

Explore this note’s relationships 21 connected notes

Connections are authored references and declared relationships, not verified runtime dependencies or approval.

22 notes · 35 relationships

Every note and relationship is available in the list below. The interactive map requires JavaScript.

Outline is the note kindABBSBBHLDResearchNoteMarkdown referenceTyped relationship
Icon is the documented subjectIdentityNetworkStorageRecoveryAutomationInventoryFleetPlatformSecretsGeneral note
Notes and relationships Accessible list

Notes (22)

Relationships (35)

Source & provenance

This is the published reading view. The Markdown source and Git review workflow remain authoritative; publication is not architectural approval.

Source
Automation/tenant-lifecycle-design.md
Identifier
claas-tenant-lifecycle-design
Kind
High-level design
Status
Draft, as authored
Revision
a3203210221340f80866b0462f4d63b49ebc5aea

Review not recorded. A recorded review date is the author’s review of the whole note, not an edit date, build date or approval. Editing a local draft does not update it.

Read the Markdown source

Read-only narrative source. Authored labels and relationships are listed above; this view does not write to the vault.


# CLaaS tenant lifecycle design — request, provisioning, change and retirement

## 1. Introduction and Goals

This HLD describes how a CLaaS tenant cluster moves through its life:

- an approved request becomes reviewed desired state;
- desired state becomes a running cluster with its external dependencies;
- the provider changes and upgrades that cluster;
- the cluster is retired completely.

It covers the four automation SBBs:

- [operational Git](operational-git.md) (external GitLab);
- [AAP on DCS](ansible-automation-platform.md);
- central [provider GitOps](openshift-gitops.md) on the ACM/Global Hub cluster;
- the per-tenant [tenant GitOps](tenant-gitops.md) instance.

The platform those flows act on is described in the
[CLaaS platform design](../CLaaS/platform-design.md).

The [intent-to-runtime note](intent-to-runtime.md) defines the generic contract:
intent → validate and render → review → apply within authority → observe. This
HLD turns that into a concrete tenant journey, with:

- a named writer for every resource;
- explicit handoffs to external systems;
- partial-failure and retry rules;
- readback evidence;
- the points where nothing can be undone.

The separate qualities of an offering (catalogue, isolation, recovery) were
learned from an earlier workbench's practice of keeping the consumer offering
apart from platform internals
([CLaaS offering at rws-arch-wb `d224d15`, lines 35–39](https://forge.moeken.eu/MoekenIT/rws-arch-wb/src/commit/d224d15b83a46834560c3a3c7ecd3052ebc2b4f9/RWS-ARCH/70-togaf/offerings/clusters-as-a-service-offering.md#L35-L39)).
That lesson is reused here. None of its content or approvals are.

This is a **draft proposal**. No pipeline, repository rule, job template, Argo CD
project, credential or external integration has been created by this document.
The proposer reports a commit-triggered development path with broad reusable
provisioning. That is reported progress. It is **not** evidence of the reviewed
production activation boundary. **No failure scenario below has been tested.**

**Quality goals:**

1. **Authorized activation only.** Nothing provisions unless an approved request
   has reached a protected-branch merge reviewed by a second platform engineer,
   **and** AAP has then activated that exact revision after its preconditions
   passed (§8.7). A merge alone is accepted intent; it changes nothing at runtime.
2. **One writer per resource.** No two automation systems reconcile the same
   desired state.
3. **Idempotent, resumable execution.** A rerun converges to the same result
   where the target allows it; a partial run is visible and can be resumed or
   compensated; a step with an unknown outcome is reconciled, never replayed
   blindly.
4. **Evidence over status.** "Done" is decided by readback of the actual target,
   not by a job's success flag.
5. **Complete exit.** Retirement removes every tenant-owned resource and handles
   retained data under policy, without touching shared assets.

## 2. Constraints

| Constraint | Source | Consequence |
| --- | --- | --- |
| TOPdesk approval → an engineer's merge request in external GitLab → review by a second platform engineer → protected merge activates AAP | [Service boundary](../CLaaS/index.md#first-release-service-boundary), [automation flow](intent-to-runtime.md#first-claas-delivery-scope) | The protected-branch merge is the event that starts AAP. It records accepted intent. Runtime change happens only when AAP promotes that revision through the activation gate (§8.7). TOPdesk has no API connector; the request link is recorded by hand. |
| Secure-lifecycle SAK: at least two reviewers and signed commits on protected branches (`L-SSSL-02`); central PAM for privileged access (`L-IAM-09`) | [SAK assurance](../Security/sak-assurance.md#secure-lifecycle-and-technical-compliance-s-sssl-s-tcm), [tenant isolation U3 and U12](../Security/tenant-isolation.md#92-unresolved-decisions) | The current intent of one second-engineer review is unchanged, but it is **not accepted** until the security policy owner decides U12. Commit signing and PAM for the AAP activation identity and Argo CD break-glass are open gaps, not satisfied controls. |
| No arbitrary commit may provision | Same | The trigger must check the branch and the merge provenance (§8.1). |
| An Archy documentation merge is not an infrastructure instruction | [CLaaS index](../CLaaS/index.md) | Architecture and operational repositories are separate. Nothing in this vault activates anything. |
| AAP principally directs provider GitOps and performs external-system work only where needed | [AAP SBB](ansible-automation-platform.md) | Kubernetes desired state goes through Argo CD. External systems use explicit, named adapters. |
| One writer per resource; AAP and Argo CD never reconcile the same state | [Automation flow](intent-to-runtime.md#tool-responsibilities-in-the-first-release) | The ownership table in §5 is part of the design, not a convention. |
| Tenant Argo CD: administration of its own instance; no access to central Argo CD; cannot change provider-managed resources | [Tenant GitOps](tenant-gitops.md) | The provider baseline is protected from the tenant controller as well as from the tenant user (§8.4). |
| Tailored tenant-admin, not cluster-admin; a non-bypassability qualification gate | [HCP tenant controls](../Platform/hosted-control-planes.md#tenant-control-qualification) | Provisioning hands over the tailored role only, never the admin kubeconfig. |
| Worker capacity fixed after provisioning; profiles vary by capacity only | Service boundary | No resize flow exists. A profile change is a new request with its own decision. |
| Upgrades run by the provider at times the tenant agrees, within policy constraints that are not yet agreed | Service boundary | The upgrade flow has a negotiation step and an override rule that is still open (§6 L5). |
| NetScaler publication and storage-quota increases use existing organizational processes | [Automation flow](intent-to-runtime.md#effort-scenario-automation-flow) | These are external handoffs with completion evidence, not automated calls. |
| Network and fabric automation only through Nexus Dashboard, after that service exists | [Automation flow](intent-to-runtime.md#tool-responsibilities-in-the-first-release) | No direct switch writer in Phase 1 tenant flows. |
| Provider bootstrap is external and engineer-run, before AAP or GitOps exist | [Provider bootstrap](../Platform/provider-bootstrap.md) | Tenant lifecycle automation never bootstraps or recovers its own hosting. |
| Retirement is complete, approved, and handles data and backups under policy. Values are unresolved. | [Tenant retirement](../CLaaS/tenant-retirement.md) | The flow carries an explicit disposition step that cannot be completed by deletion alone. |

GitLab's merge-request **approval rules** are documented as a Premium/Ultimate
feature. Protected branches with "Allowed to merge" restrictions are documented
for all tiers (G1, G2). The GitLab edition in use is unknown. If approval rules
are unavailable, the second-reviewer rule needs another enforcement mechanism
(§8.1). The rule must not be assumed to hold. A recorded acceptance of a weaker
control would be a risk decision by the policy owner, not evidence that the SAK
requirement is met.

## 3. Context and Scope

![Tenant provisioning from approved request to runtime evidence: TOPdesk approval, engineer merge request in external GitLab, second-engineer protected merge, AAP on DCS, then provider GitOps writing MCE, Virtualization and tenant-baseline desired state in parallel with explicit external-system adapters, ending in runtime and readback evidence](../CLaaS/assets/tenant-provisioning.png)

How to read the figure. It is an overview, not the full contract; where it is
simpler than the text, the text governs:

- **Steps 1–3** are human authorization. The figure marks the protected merge as
  the activation boundary. In this design the merge produces **accepted intent**;
  AAP then promotes that revision to the **activated** revision at the gate in
  §8.7. The figure does not draw that gate separately.
- **Step 4 (AAP)** splits into two paths:
  - **5b:** named external-system adapters, each needing its target, action and
    owner identified first. NetScaler is shown as a manual organizational
    process. External prerequisites are read back **before** the gate opens.
  - **5a:** Kubernetes desired state reconciled by provider GitOps, at the
    activated revision only. The figure's "accepted revision" label on 5a means
    the revision after AAP has activated it.
- **Step 6** records three separate observations: AAP success, GitOps sync and
  a usable tenant cluster. These are not one green light.

![Tenant and service lifecycle stages and evidence gates: approve, provision, qualify, operate, upgrade and retire, over a platform-readiness band of external bootstrap, role readiness, production assurance and coordinated recovery](../CLaaS/assets/lifecycle-and-evidence.png)

The lifecycle figure orders the stages. Each stage records evidence before the
next is treated as done. The bottom band is platform readiness that every tenant
stage relies on. Its reported dates are not readiness evidence.

**In scope:** create, baseline change, upgrade, repair hand-off and retirement of
one tenant cluster, with its external dependencies. **Out of scope:**

- provider cluster bootstrap and recovery
  ([bootstrap](../Platform/provider-bootstrap.md),
  [coordinated recovery](../Recovery/coordinated-recovery.md));
- the tenant permission model itself
  ([tenant isolation](../Security/tenant-isolation.md));
- network and storage internals (the [network](../Network/claas-network-design.md)
  and [storage and recovery](../Storage/storage-recovery-design.md) designs);
- identity mechanisms ([identity and trust](../Identity/identity-trust-design.md));
- tenant application pipelines.

| Actor or system | Interface | Lifecycle role |
| --- | --- | --- |
| Tenant requester | TOPdesk request (profile, purpose, contacts) | Initiates create, change or retire; agrees upgrade windows |
| TOPdesk approver (still to be identified) | TOPdesk approval | Authorizes the request. This is not technical review. |
| Platform engineer (author) | GitLab merge request against the tenant record | Translates the request; links the TOPdesk reference |
| Second platform engineer (reviewer) | Merge-request review, protected merge | Technical review and activation |
| External GitLab | Protected branch; merge event | Desired-state source of truth |
| AAP on DCS | Job triggered by the merge | Orchestration, validation, external adapters, readback |
| Provider Argo CD on the central cluster | Applications per tenant | Continuous reconciliation of provider Kubernetes desired state |
| MCE / HyperShift | `HostedCluster`, `NodePool` | Hosted-cluster lifecycle (runtime reconciler) |
| External systems | Infoblox, external Ceph, external OpenBao, Keycloak on DCS | Tenant-scoped allocations and identities |
| Organizational processes | NetScaler publication, storage-quota approval, backup policy owner | Manual handoffs with completion evidence |
| Tenant Argo CD | Instance inside the tenant cluster | Tenant applications only |

## 4. Solution Strategy

1. **One tenant record per tenant.** The operational repository holds one
   declarative record per tenant: identifier, profile, network, DNS, storage and
   identity parameters, upgrade window, lifecycle state (`active`, `retiring`,
   `retired`) and the TOPdesk reference. Every downstream artifact is rendered
   from that record. Nothing is typed in by hand downstream. This applies the
   earlier lesson that intent, rendered artifact, reconciliation and evidence are
   distinct things
   ([intent-to-runtime flow at rws-arch-next `9fd9a04`, lines 51–56](https://forge.moeken.eu/MoekenIT/rws-arch-next/src/commit/9fd9a049a4df2e18760812723a8a27fc3c1fa8ed/RWS-ARCH/20-architecture/platform/intent-to-runtime-automation-flow.md#L51-L56)).
   That flow's NetBox synchronization model is not adopted.
2. **The merge accepts intent; AAP activates it.** CI on the merge request
   validates schema, allocation conflicts and profile limits. It has no side
   effects. Only a merge to the protected branch starts AAP. AAP checks the merge
   provenance before it acts. The merge SHA is the **accepted revision**. Nothing
   at runtime changes until AAP promotes it to the **activated revision** at the
   activation gate (§8.7).
3. **AAP orchestrates and does not hold desired state.** AAP renders and commits
   nothing to the activation branch. It reads the merged revision, runs the
   external adapters in a fixed order and reads them back, checks the window,
   and then **pins** the tenant's provider Argo CD Applications to that exact
   commit SHA. Argo CD then auto-syncs and self-heals continuously, but only at
   the pinned SHA. AAP records readback.
   - Provider Argo CD reads rendered manifests from the same repository: from a
     generated path, or from the record through a renderer plugin. This is open
     choice LD-2. Either way, the content must be fully determined by the pinned
     commit.
   - AAP is the single writer of the tenant Application objects. It never writes
     the Kubernetes objects those Applications deploy.
4. **External adapters converge and are idempotent where the target allows.**
   Each adapter:
   - looks the resource up by its tenant identifier, or by the external
     resource ID recorded in the execution record where the target cannot tag;
   - creates or updates it to match the record;
   - tags it with the tenant identifier and revision, where the target has a
     field for that;
   - reads it back.

   Steps that a target cannot make idempotent follow the unknown-outcome rule
   in §6 L2.

   Each adapter has one scoped identity and one target. There is no "run
   anything" credential.
5. **The control-plane runtime is separate from desired objects.** Provider
   Argo CD owns the *spec* of `HostedCluster`/`NodePool`. HyperShift owns
   everything it derives from that spec. Argo CD is configured to ignore
   controller-written fields, so the two never fight.
6. **The baseline is provider-owned; applications are tenant-owned.** The
   in-cluster provider baseline is delivered by provider Argo CD from the hub,
   not by the tenant's Argo CD. The tenant Argo CD's own service account is
   denied the baseline namespaces and provider-reserved cluster-scoped objects
   (class C in [tenant isolation](../Security/tenant-isolation.md#51-namespace-and-object-classes-in-a-tenant-cluster)).
   Tenant cluster-scoped objects (class TC) arise only through the controlled
   Operator path, not through the tenant Argo CD service account. The
   non-bypassability gate decides whether this holds (§8.4).
7. **Evidence is separate from status.** Every run writes an execution record:
   revision, request, steps, per-target outcome and readback, plus the
   remaining open conditions. "Usable" is decided by tenant-facing checks.
8. **Undo is a forward change.** A Git revert is a new desired state. It does
   not reverse external changes, issued credentials or deleted data. Reversal
   means a compensating, reviewed change or a recovery operation.

## 5. Building Block View

### 5.1 Single-writer ownership table

| Resource | Desired-state source | Writer (applies changes) | Runtime reconciler | Readers | Must never be written by |
| --- | --- | --- | --- | --- | --- |
| Tenant record | GitLab protected branch | Human merge (author + reviewer) | — | CI, AAP, Argo CD | AAP, Argo CD, tenant |
| Tenant's provider Argo CD `Application` objects on the hub, including the **gate field** `targetRevision` (on every source), `syncPolicy` and the deletion-approval annotation | The activated revision (§8.7) | **AAP activation step only**, after the §8.7 preconditions pass | Argo CD application controller (status and operation state only) | Operations, assurance | App of Apps, ApplicationSet, any Application that tracks a branch, tenant, engineers outside a recorded emergency (§8.7) |
| Per-tenant Argo CD `AppProject` (allowed source repository and destinations) | Provider platform configuration | Provider platform-configuration path, outside tenant activation (LD-5) | — | Argo CD | AAP, tenant |
| `HostedCluster`/`NodePool` spec on MCE | Rendered from the record at the activated revision | Provider Argo CD | HyperShift (status, derived objects) | AAP readback, ACM | AAP directly; tenant |
| **Provider-owned infrastructure inputs:** the per-tenant MCE namespace that holds `HostedCluster`/`NodePool`; the per-tenant infra namespace object on the Virtualization cluster; its `ResourceQuota`/`LimitRange`; the RBAC that scopes the infra credential; the infra credential's `ExternalSecret` | Rendered from the record at the activated revision | Provider Argo CD | — | HyperShift | HyperShift, AAP, tenant |
| Infra credential `Secret` **value** | OpenBao | external-secrets, from the `ExternalSecret` | — | HyperShift | Argo CD (writes only the `ExternalSecret`), AAP, tenant |
| **Generated runtime objects:** the hosted control-plane namespace and everything in it; in the infra namespace, the KubeVirt VMs, VM root-disk volumes and the backing PVCs that KubeVirt CSI creates for tenant volumes; machine objects | Derived by HyperShift and the controllers it drives (KubeVirt, KubeVirt CSI) from the spec and from tenant PVC requests | HyperShift and those controllers | Same | Observability, retirement inventory | Argo CD, AAP, tenant directly |
| Provider baseline inside the tenant cluster (cert-manager, ExternalDNS, external-secrets, MetalLB, monitoring/log forwarding, tenant Argo CD instance and its protected configuration, admission/security policy) | Rendered from the record and the pinned release set, at the activated revision | Provider Argo CD (hub → tenant destination) | Each Operator | Tenant (read-only where allowed) | Tenant user, **tenant Argo CD**, AAP directly |
| Tenant applications and tenant-allowed namespaces | Tenant's own GitLab repository | Tenant Argo CD (scoped) | Tenant workloads | Tenant | Provider Argo CD (by policy, PD) |
| Infoblox tenant subzone and delegation | Record | AAP Infoblox adapter | — | ExternalDNS (records inside the subzone) | ExternalDNS outside the subzone |
| DNS records inside the subzone | Kubernetes resources in the tenant cluster | ExternalDNS (provider-managed) | — | — | AAP after handover |
| Ceph pools/quotas, client identities, RGW account | Record (quota values through the storage process) | AAP Ceph adapter, or the storage team's process | Ceph | ceph-csi / KubeVirt CSI | Tenant |
| OpenBao tenant paths, policies, PKI roles | Record | AAP OpenBao adapter | — | Tenant (own paths), provider external-secrets (provider paths) | Tenant writing provider paths |
| Keycloak tenant group **existence and attributes**, and the cluster's OIDC client | Record | AAP Keycloak adapter | — | Tenant cluster OAuth | Tenant writing provider roles or clients |
| Keycloak tenant group **membership** | Tenant's delegated administration after handover | Tenant (delegated) | — | Tenant cluster OAuth | AAP adapter after handover |
| NetScaler publication | Organizational request | NetScaler owner | — | — | AAP (not automated in Phase 1) |
| Execution record and evidence | Produced per run | AAP | — | Operations, assurance | Manual editing |

No two automation systems write the same field. Operators and controllers that
derive runtime objects (HyperShift, KubeVirt, KubeVirt CSI, external-secrets,
the baseline Operators) are legitimate runtime writers of what they derive; they
are not second desired-state writers. Four splits need care.

**Application objects versus deployed objects.** AAP writes the tenant's
`Application` objects and nothing those Applications deploy. Provider Argo CD
writes the deployed objects and never its own Applications' gate field.

**Provider inputs versus generated objects.** Provider Argo CD owns the infra
namespace object, its quota and the credential scope. It does not own, prune or
self-heal what HyperShift and KubeVirt create inside that namespace.

**Keycloak memberships.** The adapter creates the tenant's groups. The tenant
then manages memberships. The adapter's later runs must not overwrite
memberships; it reconciles only the group's existence and attributes.

**External-secrets.** Provider Argo CD owns the `ExternalSecret` object.
External-secrets writes the resulting `Secret`. OpenBao owns the value.

### 5.2 Components

| Component | Responsibility in this flow |
| --- | --- |
| Tenant record schema and CI validation | Required fields, profile catalogue membership, unique identifiers, no allocation collision, lifecycle-state transitions allowed (for example `active` → `retiring` only with a retirement TOPdesk reference) |
| AAP workflow per lifecycle operation | `create`, `change`, `upgrade`, `retire`. Each runs: precondition checks → external adapters and their readback → activation gate (§8.7) → wait for Argo CD at the activated revision → readback → evidence |
| Adapter roles | One per external system, idempotent where the target allows, with scoped credentials (§4.4); non-idempotent steps follow §6 L2 |
| Provider Argo CD projects | One project per tenant, or a destination restriction per tenant. Destinations limited to that tenant's MCE namespace, infra namespace and tenant cluster. Source limited to the operational repository. The project bounds what the AAP-written Applications can reach; it does not limit which commit they name (§8.7). |
| Tenant Argo CD instance | Delivered by the provider. Tenant is admin inside the instance. Its controller service account has only tenant-allowed rights. |
| Evidence store | Holds execution records. Its location is open (LD-6), but must not be the activation branch. |

## 6. Runtime View

The scenarios are the intended design. **None has been executed.**

### L1 — Create a tenant cluster (happy path)

1. **Approve.** The requester raises a TOPdesk request naming a catalogue
   profile. The approver approves it.
2. **Propose.** A platform engineer opens a merge request adding the tenant
   record, with the TOPdesk reference. CI validates it.
3. **Accept.** A second platform engineer reviews and merges to the protected
   branch. The merge SHA is now the tenant's **accepted revision**. The merge
   event triggers AAP with that SHA. No provider Argo CD Application points at
   it yet, so nothing is synced.
4. **Preconditions.** AAP checks:
   - the commit is on the protected branch;
   - the merge carries the required approval from someone other than the author;
   - the record is in state `active`;
   - no other run holds the tenant's lock.

   It then takes the per-tenant lock (§8.8).
5. **External adapters, in dependency order.** Each records the target, action,
   identifier and readback. Each is idempotent where the target allows; the
   others follow L2:
   - Infoblox: tenant subzone and delegation;
   - OpenBao: tenant paths, policies and PKI roles;
   - Ceph: pools, quotas and client identities, plus the RGW account;
   - Keycloak: tenant groups and the cluster's OIDC client.
6. **Activation gate.** AAP runs the §8.7 checks: external readback complete,
   change window open where one applies, the SHA is the run's own SHA and a
   descendant of the currently activated SHA, and no newer accepted revision
   for this tenant is waiting. It then writes the tenant's provider Argo CD
   Applications with `targetRevision` set to that full commit SHA, using a
   conditional update. That SHA is now the **activated revision**.
7. **Kubernetes desired state.** Provider Argo CD auto-syncs the tenant's
   Applications at the activated SHA. It applies the namespaces, credential
   references and `HostedCluster`/`NodePool` on MCE. HyperShift creates the
   control plane and the worker VMs
   ([platform R1](../CLaaS/platform-design.md#r1--creating-a-tenant-cluster-platform-side)).
8. **Baseline.** Once the hosted API is available, provider Argo CD applies the
   baseline to the tenant cluster destination, from an Application pinned to the
   same activated SHA.
9. **Readback.** AAP checks:
   - `HostedCluster` is available at the requested release;
   - the node count matches the profile;
   - baseline applications are synced and healthy at the activated SHA;
   - the subzone resolves;
   - storage classes provision a test volume;
   - OIDC login works for a test identity;
   - the private API is reachable from permitted sources only.
10. **Handover.** The tenant-admin group mapping is activated. The tenant
    receives the tailored role. The admin kubeconfig stays provider-held. The
    execution record is closed with its open conditions. TOPdesk is updated by
    hand. The lock is released.
11. **Organizational follow-ups**, if requested: NetScaler publication and quota
    above the profile go through their processes. Completion evidence is attached
    to the record before the publication is relied on.

### L2 — Partial failure and retry

A run can stop at any step. Steps that converge to the record follow the rule
*rerun the same revision*: the rerun either finds the resource already in the
desired state (no-op) or completes it. Steps whose outcome cannot be determined
by looking the resource up do **not** follow that rule; they follow the
unknown-outcome rule below.

| Failure point | State left behind | Safe response |
| --- | --- | --- |
| Before any adapter | Nothing | Rerun |
| After some converging adapters | Some tenant allocations exist, found by tag or by the external resource ID in the execution record | Rerun the same revision; adapters no-op on existing resources |
| During a non-idempotent step (for example one-time credential issuance) | **Unknown outcome**: the target may have acted without the result being stored | Unknown-outcome rule below. No blind rerun. |
| Before the activation gate | External allocations exist; nothing activated; Argo CD still at the previous activated SHA | Rerun the same revision, or record it as superseded (§8.7) |
| Argo CD sync failed or degraded after activation | Some objects applied; HyperShift may be mid-creation | Fix the cause with a new reviewed revision, or resync the same activated SHA. Do not delete and recreate `HostedCluster` as a retry. |
| HyperShift stuck (for example VMs not scheduling) | Control plane up, nodes missing | Platform diagnosis; the run stays open; no automatic retry loop |
| AAP lost mid-run (DCS outage) | Lock held by a run whose executor state is unknown; unknown progress | Lock takeover procedure in §8.8. The lock is **not** released merely because the parent job record says failed or lost. |
| Readback fails | Resources exist but a check failed | Run marked **not usable**; no handover |

Rules:

- **No automatic retry of a non-idempotent step.** One-time credential issuance
  is the main example. Issuing at the target and storing the value in OpenBao
  are two writes to two systems. They are **not atomic**, even inside one
  adapter step.
- **Unknown-outcome rule.** Before calling the target, the adapter records its
  intent and a request identifier in the execution record. If the run is lost
  between issue and store, the step is marked *outcome unknown* and reconciled
  by a person or a dedicated reconcile run, never by replaying the issue call:
  1. Query the target for credentials of this identity, by tag or by the
     recorded external resource ID, and read OpenBao's stored version for the
     path (for KV version 2, its version metadata; writing with check-and-set,
     O1, then refuses a silent second write).
  2. Target shows nothing issued: issue once, store, record.
  3. Issued and stored, with matching identifiers: record as done.
  4. Issued but the value is not stored and cannot be recovered from the target:
     a **deliberate, coordinated rotation**. Issue a replacement, store it,
     deliver it, and verify that every consumer has adopted it. Only then
     revoke the orphaned credential. Existing consumers keep their working
     credential until the replacement is proven
     ([secrets management](../Secrets/secrets-management.md#capabilities)).
  5. The target cannot be queried, or the result is ambiguous: the step stays
     blocked with its record open.
- **A newer revision does not overtake an in-progress run.** The lock serializes
  runs per tenant. A run whose revision has been superseded by a newer accepted
  revision for the same tenant stops **before** the activation gate and is
  recorded as superseded, not silently skipped. The newer revision then runs
  from its own start (§8.7).
- **Abandoning a failed create is a retirement.** It goes through L6 with its own
  record. It is never a "delete what the job made" shortcut.

### L3 — Conflicting writers and drift

- A change made directly to a resource owned by provider Argo CD shows up as
  drift and is reverted by self-heal. The exception is a recorded emergency
  change with reconciliation suspended
  ([platform §8.6](../CLaaS/platform-design.md#86-change-drift-and-emergency-action)).
- Self-heal does not cover the tenant's `Application` objects themselves,
  because no parent Application manages them (§8.7). A direct edit of their gate
  field is detected by AAP, which compares each Application's `targetRevision`
  with the activated SHA in the execution record at the start of every run and
  in readback. A mismatch blocks further activation for that tenant until it is
  explained and reconciled. How often the comparison also runs between lifecycle
  operations is an LLD choice; no scheduler is designed here.
- If an adapter finds an external resource with the tenant's identifier but a
  different owner tag, it **stops and reports a conflict**. It does not take the
  resource over.
- Argo CD's `FailOnSharedResource` sync option fails a sync when another
  Application has already applied a resource (A1). It is proposed for provider
  applications, so two tenants' records cannot claim the same object.

### L4 — Baseline or configuration change

The same path as L1, with the record changed by a reviewed merge request:

- AAP runs only the adapters whose inputs changed;
- AAP activates the new revision at the gate (§8.7); Argo CD then syncs it;
- readback covers the changed scope plus a fixed smoke set.

A merge that changes only a tenant's record does not reach that tenant's
cluster until AAP activates it. A merge that touches several tenants is
activated per tenant, each under its own lock.

Baseline changes that apply to every tenant come from a change to the pinned
release set. They roll out to a bounded set of tenants first, then wider, as
[fleet policy delivery](../Fleet/fleet-and-cluster-lifecycle.md#policy-delivery-and-consumer-evidence)
proposes.

### L5 — Provider-run upgrade with a tenant-agreed window

1. A new release set is qualified and pinned (platform §8.7). Management-side
   steps (MCE cluster, MCE, Virtualization) are provider maintenance
   ([platform R9](../CLaaS/platform-design.md#r9--upgrade-sequence-provider-run)).
2. Each tenant record carries an agreed window. The tenant agrees it through
   TOPdesk or a recorded contact. A merge request sets the target release for
   that tenant. The merge is accepted intent only. Because the tenant's
   Applications stay pinned to the previously activated SHA, the merge cannot
   start the upgrade outside the window.
3. In the window, AAP:
   - checks the version-skew preconditions;
   - pauses `NodeHealthCheck` remediation;
   - re-checks that the window is still open, then activates the revision that
     changes the `HostedCluster` release (§8.7). A second revision, or a second
     activation step, changes the `NodePool`. Each is a separate gate.
   - reads back the skew condition and tenant smoke tests.

   If the window closes before the gate, nothing is activated and the run stays
   pending. If it closes after activation, the change already in progress is
   not reversed; the remaining steps wait for the next window.
4. If the tenant does not agree a window before a security deadline, a policy
   decides. **That policy (deadline, notification, escalation, forced window) is
   not agreed.** The design reserves a provider-override path that is recorded,
   approved and visible to the tenant, and does not exercise it until the policy
   exists.
5. There is no rollback claim. Failure handling is forward fix or recovery.

### L6 — Approved complete retirement

Retirement separates three kinds of access and revokes them at different
points: tenant **people and new requests**; tenant **reconcilers** that could
re-create resources; and the **provider identities and application
integrations** still needed to quiesce, back up, export and clean up. Revoking
everything at once would leave the final backup or the cleanup unable to run.
The storage-side ordering is in the
[storage and recovery design](../Storage/storage-recovery-design.md#reclaim-and-deletion-safeguards)
(D-S8, D-S9); the network-side ordering is in the
[network design](../Network/claas-network-design.md#retirement). This flow
follows both.

1. **Approve.** A TOPdesk retirement request is approved. The data-disposition
   decision is recorded with the policy owner for each data unit: export,
   retention, legal hold or deletion.
2. **Stop new public traffic.** The NetScaler publication is withdrawn through
   its organizational process. Readback confirms the publication is gone and
   the backend is unreachable from the perimeter before anything destructive
   happens.
3. **Freeze people and reconcilers.** A merge request sets the record to
   `retiring`; AAP activates it (§8.7). AAP:
   - stops new requests for this tenant (the record state blocks them in CI);
   - removes tenant human write access: the tenant-admin group mapping and
     tenant logins through the Keycloak client. If the disposition requires the
     tenant to export its own data, that export is completed before this step,
     or is done through a provider-mediated, read-only path recorded in the
     disposition;
   - stops tenant reconciliation: disables the tenant Argo CD applications and
     removes their repository credentials, so nothing re-creates resources;
   - keeps the provider Argo CD Applications pinned at the activated SHA, with
     pruning and deletion requiring confirmation (step 6).

   Tenant application secrets, the provider backup identity (OADP), the backup
   destination credential, the CSI driver identity and any application
   integration that quiescence or export needs **stay valid** at this point.
4. **Protect data.** For each data unit, under the agreed disposition:
   quiesce the application where needed, run the final backup or export, and
   verify that the bytes are at the destination and restorable, not only that
   the job succeeded
   ([workload protection](../Recovery/tenant-workload-protection.md)). A data
   unit that must be retained in place is moved out of the deletion scope
   first (step 6). Only then are the remaining tenant machine credentials
   revoked: OpenBao tenant tokens, tenant S3 keys, any tenant-readable Ceph
   identity. Provider cleanup identities stay.
5. **Decommission gate.** Before the parent `HostedCluster` is deleted, AAP
   records and a platform engineer confirms:
   - an inventory of every data unit and every generated runtime object (§5.1)
     for the tenant, from the targets rather than from the record;
   - each data unit's disposition is complete and verified, or the unit is an
     **explicit retained allocation**: identified, protected from cascade
     (for example detached from the infra namespace or held under a `Retain`
     reclaim policy, per D-S9 and LD-10), with an owner and expiry;
   - no step of this tenant is in *outcome unknown* (L2) and no other run
     holds the lock (§8.8).

   A failure blocks deletion.
6. **Remove runtime.** AAP activates the revision that removes
   `HostedCluster`/`NodePool`, runs a prune sync at that same activated SHA, and
   sets the Application deletion approval that `Prune=confirm` waits for (A1).
   Provider Argo CD then prunes them. The vendor removal path for OpenShift
   Virtualization deletes the managed-cluster resource and the hosted cluster
   with its backend resources (P8 §16.3). Readback confirms no VMs or PVCs
   remain in the infra namespace **except the explicit retained allocations**.
   Remove the infra namespace, quota and credential only after every retained
   allocation has a qualified lifecycle and access path independent of them.
   Otherwise retain the required namespace, quota and scoped access under the
   approved disposition, and block their deletion.
7. **Remove external allocations**, after runtime readback:
   - Keycloak client and groups;
   - Ceph/RGW backend scope, through storage operations, following the
     disposition. **Retained data stays**, under a recorded access boundary and
     expiry. Provider cleanup identities are revoked **last**, after the backend
     readback;
   - OpenBao tenant paths, policies and PKI roles;
   - MetalLB advertisements and leaf filters, ExternalDNS records, the Infoblox
     subzone, then IPAM and VLAN allocations under DDI's reuse rule.

   Identifiers and allocations (addresses, VLANs, subzone name, tenant
   identifier) are **not released for reuse** while any step for this tenant
   is in *outcome unknown* or any retained allocation still refers to them.
8. **Verify and close.** Readback confirms:
   - no tenant-tagged resource, or resource recorded by ID, remains in any
     target, except recorded retained items;
   - shared assets are untouched: the parent zone, other tenants, the provider
     baseline.

   The emptied tenant Application objects are removed in a recorded step. The
   record becomes `retired` and is kept as history. TOPdesk is closed.

**What the Argo CD options protect, and what they do not.** `Prune=false`,
`Prune=confirm` and `Delete=confirm` (A1) act only on Argo CD's own prune and
delete operations: a sync that would prune a resource, or deletion of an
Application with the cascading finalizer (A6). They do **not** stop:

- HyperShift deleting the hosted control-plane namespace, VMs and backend
  resources when the `HostedCluster` is deleted (P8 §16.3);
- KubeVirt CSI or the CSI driver removing backing volumes under a `Delete`
  reclaim policy;
- Kubernetes deleting every object in a namespace when that namespace is
  deleted, or garbage-collecting dependents whose owner is deleted (K2).

That is why the decommission gate (step 5) and the per-data-unit disposition
come **before** the parent `HostedCluster` or any namespace is deleted. The
Argo CD options remain useful against an accidental prune; they are not the
data-protection control.

Retirement is **not complete** while backups, audit records or legal holds stay
unresolved. Those carry their own expiry and disposal owner
([tenant retirement](../CLaaS/tenant-retirement.md)). The retention values are
**not agreed**.

### L7 — Something the tenant cannot do

These attempts must be refused, and each refusal is a qualification test (§10):

- a tenant Argo CD sync that targets a baseline namespace, a provider-reserved
  cluster-scoped object (class C), any cluster-scoped object at all (the
  tenant Argo CD service account holds no cluster-scoped write rights), or its
  own controller's RBAC. Tenant cluster-scoped objects (class TC, for example
  CRDs from an allowed tenant Operator) are created only through the controlled
  Operator path under the admission rules in
  [tenant isolation §8.4](../Security/tenant-isolation.md#84-operators-installed-by-tenants).
  Whether that path itself is safe is part of the non-bypassability gate, not a
  settled fact;
- a tenant-admin change to the tenant Argo CD instance's protected configuration
  (for example widening its service account);
- tenant use of the provider-held admin kubeconfig or the infra credential —
  neither is ever delivered to the tenant;
- an unreviewed commit to the protected branch;
- any change to the provider Argo CD Applications or AppProjects for its
  cluster.

## 7. Deployment View

| Element | Placement | Depends at runtime on | Notes |
| --- | --- | --- | --- |
| Operational repository | External GitLab | GitLab service | Initial choice. Forgejo on DCS is only a possible later move, never a second writable source. |
| AAP controller and execution environments | DCS | DCS, OpenBao (credentials), GitLab (source), target APIs | AAP's own hosting and start-up do not need ACM, so AAP keeps running and can run external-system jobs during a hub outage. The **normal provisioning workflow does** need the hub: its activation gate writes the provider Argo CD Applications on the hub, and Argo CD there applies the Kubernetes state. Execution identities come from OpenBao or native identities. |
| Provider Argo CD | Central ACM/Global Hub cluster | Hub cluster, GitLab, destination APIs | Unavailable during a hub outage, which stops all provisioning and change ([platform R6](../CLaaS/platform-design.md#r6--acm--global-hub-cluster-is-unavailable)). AAP runs reaching the activation gate during the outage wait; they do not activate by another route. |
| Tenant Argo CD | Inside each tenant cluster | Tenant cluster, organizational GitLab | Tenant-scoped |
| Execution records | Location open (LD-6) | — | Must survive AAP loss and be reachable during recovery |
| Bootstrap tooling | External engineer workstation/environment | Approved registries, OpenBao, GitLab | Separate from tenant automation ([bootstrap](../Platform/provider-bootstrap.md)) |

The tenant lifecycle depends on the following being up together:

- GitLab;
- DCS (AAP and Keycloak);
- the hub (provider Argo CD);
- MCE and Virtualization;
- OpenBao, Infoblox and Ceph.

Provisioning availability is therefore the *product* of those availabilities.
That is acceptable because provisioning is not a running-workload dependency.
It must still be communicated: a hub or DCS outage blocks every lifecycle
operation, including emergency retirements and upgrades.

## 8. Crosscutting Concepts

### 8.1 Activation integrity

The activation boundary has three parts, and each must be **enforced, not
assumed**:

1. **Branch protection.** Nobody can push to the activation branch; only listed
   roles can merge (G2, available on all tiers).
2. **Second-engineer review.** A required approval from someone other than the
   author (G1, Premium/Ultimate). If that tier is not available, the AAP
   precondition check (L1 step 4) must verify an approval by someone other than
   the author through the GitLab API before it acts. That is a weaker, detective
   control, and the decision to accept it is open (LD-1).
3. **Trigger authenticity.** AAP accepts a trigger only for the protected branch
   and only for an authenticated GitLab source. It then fetches the commit
   itself rather than trusting event content.
4. **Activation gate.** A merge is accepted intent. Runtime state changes only
   when AAP promotes the revision through the gate in §8.7.

Commit signing and a second reviewer, as the secure-lifecycle SAK requires
(`L-SSSL-02`), are an open policy decision
([tenant isolation U12](../Security/tenant-isolation.md#92-unresolved-decisions),
[SAK assurance](../Security/sak-assurance.md#questions-for-policy-owners)). The
one-second-engineer intent is kept as the design input. It is not treated as
meeting the SAK until the policy owner decides.

The TOPdesk reference in the record is checked for presence and format. Whether
it can be checked against TOPdesk without an API is open. The current answer is
"by the reviewer".

### 8.2 Credentials

| Identity | Holder | Scope | Notes |
| --- | --- | --- | --- |
| GitLab read token for AAP/Argo CD | AAP, provider Argo CD | Read the operational repository | Cannot push to the activation branch |
| AAP → Argo CD (activation identity) | AAP | Create, update and delete the tenant's `Application` objects in that tenant's project, plus read and refresh. Sync only at the revision already in the Application. | Not Argo CD admin; no project, repository, cluster or key administration; no `override`. **Not field-scoped**: neither Argo CD RBAC nor Kubernetes RBAC can limit an update to `targetRevision` (A4, K1), so this identity can change any part of the tenant's Applications within the AppProject bounds. That is a recorded residual risk (§8.7), not a sync-only credential. |
| Argo CD → MCE | Provider Argo CD | Tenant namespaces and `HostedCluster`/`NodePool` | Not cluster-admin on MCE |
| Argo CD → tenant cluster | Provider Argo CD | Baseline namespaces and the cluster-scoped resources the baseline needs | Created at handover; stored on the hub; revoked at retirement |
| Adapter identities (Infoblox, Ceph, OpenBao, Keycloak) | AAP | One system, one action set each | Per-tenant scoping where the target supports it |
| Hosted cluster admin kubeconfig | MCE (HyperShift) | Full tenant cluster | Provider break-glass only; not used by automation day to day |

Values live in OpenBao. Delivery, rotation and break-glass custody are in the
[identity and trust design](../Identity/identity-trust-design.md).

### 8.3 Idempotence keys and tagging

Where the target has fields for it, every external resource carries:

- the tenant identifier;
- a managed-by marker naming the adapter;
- the last-applied revision.

Not every target supports such fields on every resource type. Where it does not,
the execution record holds the external resource ID returned by the target,
and that ID is the lookup key. Adapters look resources up by tag or recorded
ID, never by name guess. Readback compares what exists with the record.
Retirement uses the same tags and IDs to find what to remove (§6 L6). A
resource that is neither tagged nor recorded is never deleted automatically.

### 8.4 Protecting the provider baseline from tenant Argo CD

Argo CD acts through a controller service account. That account must hold the
rights for everything it deploys, and tenants can escalate through the
controller's privileges
([feasibility claim 4](../CLaaS/technical-feasibility.md#4-tailored-tenant-administrator-is-not-bypassable),
OpenShift GitOps 1.22 multitenancy). The design therefore:

- gives the tenant Argo CD controller an explicitly bounded role, not
  cluster-admin;
- keeps that instance's configuration (its CR and its RBAC) under provider
  Argo CD, so tenant-admin cannot edit it;
- has provider Argo CD reconcile the baseline from the hub, so a tenant change to
  a baseline object is reverted. Reverting is detection plus correction, not
  prevention; prevention is the role design.

Whether the tailored tenant-admin role can still change the instance's
configuration, or obtain the controller's rights indirectly (for example through
an Operator install), is exactly the **non-bypassability qualification gate**.
If that gate fails, the tenant Argo CD service ceiling must be renegotiated. It
must not be presented as protected. The permission model is in
[tenant isolation](../Security/tenant-isolation.md).

### 8.5 Evidence

An execution record holds:

- TOPdesk reference, merge SHA and approver identities (no secrets);
- the accepted SHA, the previously activated SHA and the newly activated SHA
  (or the reason the run stopped before the gate: superseded, window closed,
  blocked);
- the lock holder, run identifier and fencing epoch (§8.8);
- the operation, and per-step target, action, identifier (tag or external
  resource ID), outcome (`done`, `no-op`, `failed`, `outcome unknown`) and
  readback;
- Argo CD sync revision and health for each application;
- tenant smoke-test results;
- open conditions;
- links to organizational handoff completions.

It is the input for production assurance and for retirement inventory. A green
AAP job, a synced Argo CD application and a usable cluster are recorded as
**three separate facts**.

### 8.6 Lifecycle dependency independence

Tenant lifecycle automation runs on DCS and the hub. It must never be the way
those provider clusters are restored: their recovery uses
[external bootstrap](../Platform/provider-bootstrap.md) and break-glass access.
DCS does not bootstrap itself. After a provider recovery, tenant runs resume
from their execution records (L2), not from assumptions.

### 8.7 Activation gate: accepted revision versus activated revision

**Problem.** Provider Argo CD reconciles continuously and self-heals. If its
Applications tracked the protected branch, a merge would be synced within the
polling interval (A2), before AAP had read back external prerequisites, checked
an upgrade window or checked that no newer revision is pending. The merge would
then be the runtime activation, and AAP's checks would only run afterwards.

**Proposed contract.** Two revisions are kept apart for every tenant:

| Revision | Meaning | Where it is held | Who sets it |
| --- | --- | --- | --- |
| **Accepted** | Reviewed intent: the protected-branch merge SHA | The protected branch and the execution record | Human merge (author + reviewer) |
| **Activated** | The commit provider Argo CD may apply for this tenant | `targetRevision` on each of the tenant's provider Argo CD Applications, as a full commit SHA, mirrored in the execution record | **AAP activation step only** |

The mechanism uses standard Argo CD behaviour only; no extra service or engine
is introduced:

1. **Pinning.** Each tenant's provider Applications name a full commit SHA in
   `targetRevision`, on every source. Argo CD documents that an Application
   pinned to a commit changes live state only when its tracking revision is
   changed (A3). The Applications never track a branch, tag or `HEAD`.
2. **Continuous reconciliation at the pinned SHA.** The Applications use
   automated sync with self-heal (A2). Argo CD keeps reconciling and correcting
   drift continuously, but only towards the activated SHA. A new merge on the
   branch is never observed by these Applications.
3. **Single writer of the gate field.** The tenant's Applications are standalone
   objects written only by the AAP activation identity. They are **not**
   generated by an ApplicationSet and **not** managed by an App of Apps or any
   other Application that tracks Git; either would overwrite the gate field
   from a branch. AAP renders each Application from the template in the
   operational repository at the SHA being activated, so the Application
   definition is itself reviewed content. The tenant's `AppProject` is written
   by a separate provider platform-configuration path and limits source
   repository and destinations (LD-5).
4. **No sync to another revision.** Argo CD 3.2 and later can require the
   `override` privilege for a sync that names a revision other than the
   Application's own (`application.sync.requireOverridePrivilegeForRevisionSync`),
   and an `override` sync is not possible while auto-sync is enabled (A4). The
   design sets this option and grants `override` to no automation identity.
   Support of this option in the pinned OpenShift GitOps release is **not
   verified**.
5. **Promotion.** AAP promotes an accepted SHA to activated only after these
   checks pass, in this order, inside the run that holds the tenant's lock
   (§8.8):
   - the SHA is the run's own SHA, fetched by AAP from GitLab (§8.1), on the
     protected branch, with the required approval;
   - the SHA is a descendant of the currently activated SHA, so an older or
     replayed trigger cannot roll the tenant back. A new tenant has no activated
     SHA yet; AAP creates its Applications at the first activation, and the
     other checks still apply;
   - no newer protected-branch commit that changes this tenant's rendered
     inputs exists; if one does, this run stops and is recorded as superseded;
   - every external prerequisite for this revision has been read back (L1 step
     5), and no step of this tenant is in *outcome unknown* (L2);
   - the change window applies and is open, where the change needs one (L5);
   - each Application's current `targetRevision` equals the activated SHA in
     the execution record. A mismatch means someone else wrote the gate field;
     the run stops.
6. **Conditional write.** AAP writes each Application with an update that
   carries the `resourceVersion` it read. Kubernetes rejects a stale update with
   `409 Conflict` (K3). On conflict AAP re-reads and re-runs the checks; it
   never overwrites blindly. A tenant has several Applications (MCE-side,
   infrastructure-side, baseline), because each Application has one
   destination. Their updates are not atomic together. A run interrupted
   between them leaves *activation partial*, recorded per Application; it is
   completed by writing the same SHA to the remaining Applications, which is
   idempotent, or superseded by a newer activation.
7. **Emergency and break-glass.** A person may change a tenant's Applications
   only under the recorded emergency procedure
   ([platform §8.6](../CLaaS/platform-design.md#86-change-drift-and-emergency-action)).
   The next AAP run detects the mismatch (L3) and stops until it is reconciled.

**Residual risk, recorded rather than hidden.** Neither Argo CD RBAC nor
Kubernetes RBAC can restrict an update to one field of an Application (A4, K1).
The AAP activation identity therefore holds update rights on the whole of each
tenant Application. Within the `AppProject` bounds, a compromised or faulty
activation identity can name any commit in the operational repository,
including an unreviewed merge-request commit, and change sync options. The
branch, approval and descendant checks are performed by AAP itself, so they are
detective controls inside the system being protected (compare LD-1). Mitigations
proposed: the activation identity is used only by the activation step; Argo CD
audit of Application changes is forwarded; readback compares `targetRevision`
with the protected branch; and, if the policy owner adopts signed commits
(U12), Argo CD source-integrity verification (A5) could refuse unsigned
commits. That last control proves a signature, not branch membership.

**Alternatives** (LD-3):

- *Branch tracking with automated sync, and AAP checking afterwards.* Rejected:
  this is the contradiction described above.
- *Branch tracking with automated sync off, and AAP triggering every sync.* No
  continuous self-heal; drift persists until the next AAP run, and a manual sync
  from the branch still picks up the newest merge rather than the checked one.
- *AAP promotes by pushing a separate "activated" branch or tag per tenant that
  Argo CD tracks.* Equivalent gate, but AAP then needs Git write access. That
  conflicts with "AAP commits nothing" (§4.3) and moves the residual risk to a
  Git credential. Kept as the fallback if Application-level pinning fails
  qualification (T13–T19).

### 8.8 Per-tenant serialization and lock takeover

Runs for one tenant are serialized. The lock record holds the tenant, run
identifier, executor identity, accepted SHA, a fencing epoch that increases on
every takeover, and the time taken. It must survive the loss of AAP and be
readable during recovery, together with the execution record (LD-6).

**Mechanism: an LLD gap (LD-9).** This HLD does not select or verify a lock
store, and does not claim strong compare-and-set for one. The two candidates
are:

- *Non-concurrent workflow template.* AWX documents that job templates run one
  at a time unless concurrent jobs are enabled (W1). That serializes **all**
  tenants, not only one, and is simple. AAP equivalence for the pinned release
  is not verified.
- *A per-tenant lock object written with a conditional update.* For example a
  Kubernetes object on the hub, using the `resourceVersion` precondition (K3).
  Per-tenant, but one more object to own.

Either way: a run that finds the lock held is queued or recorded as deferred,
never dropped silently. Every run ends as completed, superseded or blocked.
There is **no time-based automatic release** of the lock and no timer service
is designed.

**Takeover when the holder is lost.** A lost AAP job, a DCS outage or a failed
parent workflow does **not** release the lock by itself. Child jobs and their
executors may still be running, and external calls may have completed without
being recorded. A platform engineer takes over only after:

1. **Reconciling the old run.** From AAP (when reachable) and the execution
   record: the parent job, every child job and every executor it started, and
   each one's last known state.
2. **Fencing the old writer.** Cancelling those jobs and confirming that they
   ended is not enough on its own if the executor is unreachable. The old run
   is fenced by revoking or rotating the credentials it held (adapter
   identities and the activation identity) or by disabling its execution
   capacity, so a delayed executor cannot write after takeover.
3. **Reconciling side effects.** Each step is reconciled against its target
   under the L2 unknown-outcome rule. Each tenant Application's `targetRevision`
   is compared with the record, to see whether the old run activated anything.
4. **Recording the takeover** with a new fencing epoch. The new run then reruns
   or supersedes the old revision.

The fencing epoch is a record, not an enforcement point: the external targets do
not check it. The enforcing fences are credential revocation and, for the gate
field, the conditional Application update in §8.7. Adapter identities are
scoped per system and possibly shared across tenants (§8.2), so revoking them
can pause other tenants' runs. That cost is accepted over an unfenced writer.

If the old writer cannot be shown to be stopped or fenced, takeover is
**blocked**. An unknown old writer is a blocker, not a delay to wait out.

## 9. Architectural Decisions

Proposals, not approved ADRs. LD-n are local shorthand only.

| ID | Decision | Status | Trade-off |
| --- | --- | --- | --- |
| LD-1 | Enforce second-engineer review with GitLab approval rules; if unavailable, AAP verifies an approval by someone other than the author before acting | **Open** (depends on GitLab tier) | A preventive control versus a detective check performed by the system being protected |
| LD-2 | Provider Argo CD consumes rendered manifests (committed by CI to a generated path) or renders from the record through a plugin | **Open** | Committed output is reviewable and reproducible, but a CI identity must be allowed to commit to a generated path without becoming a desired-state writer for the record. A plugin avoids the extra commits but hides the rendered state from review. |
| LD-3 | Activation gate: provider Argo CD Applications pinned to the last activated commit SHA; AAP alone promotes an accepted SHA after its checks, window and external readback; Argo CD then auto-syncs and self-heals at that SHA; no App of Apps or ApplicationSet manages the tenant Applications (§8.7) | Proposed (replaces "AAP triggers a sync at the merge SHA") | Removes the contradiction between continuous auto-sync and an AAP gate, using standard Argo CD pinning. Costs: AAP holds update rights on whole tenant Applications (not field-scoped), Applications sit outside GitOps self-heal, and several Applications per tenant are not updated atomically. Fallback: an AAP-pushed per-tenant activation ref, which needs a Git write credential. |
| LD-4 | Provider baseline in tenant clusters is delivered from the hub, not by the tenant Argo CD instance | Proposed | Keeps the baseline out of tenant authority. Baseline delivery stops during a hub outage; existing state keeps running. |
| LD-5 | One provider Argo CD project or destination restriction per tenant | Proposed | Limits the blast radius of a bad record. More objects to manage at a few dozen tenants. |
| LD-6 | Location of execution records | **Open** | Must survive AAP/DCS loss. A Git evidence repository, the AAP database, or an organizational records service each have different retention and access consequences. |
| LD-7 | Forced-upgrade policy when no window is agreed | **Open, not agreed** | Security currency versus the tenant-agreed timing promise |
| LD-8 | Retirement data disposition and retention values | **Open, owned by policy** | Cannot be decided by this design |
| LD-9 | Per-tenant serialization mechanism: non-concurrent workflow template, or a per-tenant lock object with a conditional update (§8.8) | **Open, LLD** | Global serialization is simple but queues all tenants; a per-tenant lock adds an owned object. Neither is verified. No time-based lock release in either case. |
| LD-10 | How a retained data unit is kept out of the cascade when its `HostedCluster` and infra namespace are deleted (for example a `Retain` reclaim policy, or moving the volume out of the namespace before deletion) | **Open**, with storage D-S9 | Must be decided before the first retirement with retained in-place data. Until then, the only safe disposition is verified backup or export before deletion. |

## 10. Quality Requirements

None of these has been run. Targets marked *unset* have no agreed numbers.

| ID | Scenario | Measure | Pass condition |
| --- | --- | --- | --- |
| T1 | Unreviewed change | Push to the activation branch; merge without second-engineer approval; trigger AAP from a non-protected branch or a forged event | All refused or ignored; nothing is provisioned; the attempt is logged |
| T2 | Request traceability | For a provisioned tenant, follow TOPdesk → merge request → merge SHA → AAP run → Argo CD revision → readback | Complete chain, with no manual reconstruction |
| T3 | Idempotent rerun | Rerun the same revision after success | No changes; all adapters report no-op |
| T4 | Partial failure | Interrupt AAP after each adapter in turn; rerun. For one-time credential issuance, interrupt between issue and store. | Converging adapters reach the same end state with no duplicate allocations. The issue-store interruption is marked *outcome unknown*, is not replayed, and is resolved by reconciliation or a coordinated rotation with existing consumers still working |
| T5 | Conflicting ownership | Pre-create an external resource with the tenant identifier but another owner; and two tenant records claiming one object | Adapter stops with a conflict; Argo CD sync fails on the shared resource |
| T6 | Writer separation | Edit a provider-owned field directly; edit a HyperShift-derived field through Argo CD | Self-heal reverts the first; no ownership fight on the second (no repeated sync loop) |
| T7 | Tenant Argo CD ceiling | From tenant Argo CD: sync into a baseline namespace, a class C cluster-scoped object, any cluster-scoped object, and its own RBAC; from tenant-admin: edit the instance configuration | All refused (feasibility claim 4 tests d–e). Class TC objects are tested separately on the Operator path ([tenant isolation T-17](../Security/tenant-isolation.md#101-allowdeny-test-matrix)) |
| T8 | Upgrade in window | Upgrade two tenants with different windows | Each upgraded only in its window; the skew condition stays true; tenant smoke tests pass |
| T9 | Retirement completeness | Retire a representative non-production tenant | No tenant-tagged or recorded resource remains except recorded retained items; shared assets unchanged; reconciliation cannot re-create anything |
| T10 | Retirement safety | Attempt retirement without approval, with a missing disposition decision, with an unverified final backup, with a step in *outcome unknown*, or with a public publication still active | Blocked before any destructive step; the parent `HostedCluster` is not deleted |
| T11 | Hub/DCS outage during a run | Stop the hub or DCS mid-run; recover | Execution record shows the exact state; takeover follows §8.8; rerun completes; no orphaned allocations |
| T12 | Lead time | Time from merge to usable cluster for the launch profile | Measured and recorded; target unset |
| T13 | Early sync denial | Merge a change for a tenant while AAP is stopped; wait well past the Argo CD polling interval | No tenant Application changes revision; live state unchanged; the merge appears only as accepted intent |
| T14 | Wrong SHA | Trigger AAP with an unmerged commit, a commit on another branch, and a SHA that differs from the one AAP fetched; attempt a sync naming another revision with the AAP identity | Gate refuses each; the revision-sync attempt is refused without the `override` privilege |
| T15 | Replay | Replay an older, already activated trigger after a newer activation | Refused: the SHA is not a descendant of the activated SHA; nothing rolls back |
| T16 | Window closed | Merge an upgrade outside the tenant's window; let the window close while a run waits at the gate | Nothing activated outside the window; the run stays pending |
| T17 | Newer revision during a run | Merge revision B while the run for A is between adapters and the gate | Run A stops before the gate and is recorded superseded; B runs from its start; A is never activated on its own |
| T18 | Gate-field conflict | Change one tenant Application between AAP's read and write; separately, edit `targetRevision` by hand | The conditional update fails with a conflict and AAP re-checks; the hand edit is detected at the next run and blocks activation |
| T19 | Lock takeover | Kill the AAP parent job while a child job keeps running; attempt takeover before and after fencing | Takeover blocked while the child can still write; allowed only after reconciliation and fencing; the epoch increases |
| T20 | Cascade awareness | In qualification, delete a `HostedCluster` whose infra namespace holds a test PVC under each candidate LD-10 mechanism, with and without `Delete=confirm`/`Prune=false` on it | Records which mechanism keeps the volume. Confirms that the Argo CD options alone do not |

## 11. Risks and Technical Debt

| Risk | Effect | Response |
| --- | --- | --- |
| Second-engineer review not enforced (tier or configuration) | A single person can provision | LD-1; T1 before production |
| Dev commit-triggered path carried into production unchanged | Arbitrary commits provision | T1; the activation boundary is a release gate |
| AAP and Argo CD both writing the same Kubernetes objects | Endless overwrites, non-deterministic state | Ownership table §5; T6 |
| Merge synced before AAP's checks (branch-tracking Applications) | External prerequisites, windows and supersession bypassed | Activation gate with pinned SHAs (§8.7, LD-3); T13–T18 |
| AAP activation identity can update whole tenant Applications (not field-scoped) | A compromised identity could point a tenant at an unreviewed commit within the AppProject bounds | Recorded residual risk; single-purpose identity; audit; readback against the branch; signed-commit verification if adopted (§8.7) |
| Non-idempotent adapter (one-time credential, create-only API) | Duplicates, orphaned credentials or consumers broken on retry | Unknown-outcome reconciliation, coordinated rotation with consumer adoption before revocation, tags or recorded IDs (§6 L2, §8.3); T4 |
| Lock released after a lost job while an executor still writes | Two writers for one tenant | Takeover only after reconciliation and fencing (§8.8, LD-9); T19 |
| Parent deletion cascades to data that should be retained | Data loss despite Argo CD deletion options | Decommission gate before parent deletion; LD-10; T20 |
| Tenant Argo CD escalation through controller rights or Operator installs | Provider baseline changed by the tenant | Non-bypassability gate; renegotiate the ceiling if it fails |
| Manual organizational handoffs (NetScaler, quota, TOPdesk) | Lifecycle "done" while a handoff is pending | Completion evidence attached before reliance; open conditions in the record |
| Hub or DCS outage blocks all lifecycle actions | No emergency retirement or upgrade | Documented manual procedure with break-glass; recovery order |
| Retention policy values unknown | Retirement cannot complete | LD-8, owned by policy; retained-data boundary recorded meanwhile |
| Forced-upgrade policy unknown | Security deadline conflicts with tenant timing | LD-7 |
| Execution record lost with DCS | Retry relies on guesswork | LD-6 |

Accepted debt: TOPdesk linkage is manual. NetScaler and quota increases are not
automated. Tenant-cluster break-glass beyond the admin kubeconfig is stretch
scope.

## 12. Glossary

| Term | Meaning here |
| --- | --- |
| Tenant record | The declarative per-tenant desired state in the operational repository |
| Activation branch | The protected branch whose reviewed merges trigger AAP |
| Accepted revision | A reviewed protected-branch merge SHA: intent, not yet applied |
| Activated revision | The commit SHA AAP has written into a tenant's provider Argo CD Applications after the gate checks; the only revision Argo CD applies for that tenant |
| Outcome unknown | A step whose effect on its target cannot be determined from the execution record; reconciled, never replayed |
| Adapter | An AAP role that converges one external system to the tenant record, with one scoped identity |
| Readback | Reading the actual target state after a change and comparing it with the record |
| Execution record | The per-run evidence of what was attempted, what happened and what remains open |
| Provider baseline | The provider-owned components and policies inside each tenant cluster |
| Retirement disposition | The approved decision about export, retention, holds and deletion of tenant data and backups |

### Sources consulted

Observed 2026-10-21. These are documentation statements, not tests of the
operational repository or controllers.

| Ref | Source and section | Version note |
| --- | --- | --- |
| G1 | [GitLab: Merge request approval rules](https://docs.gitlab.com/user/project/merge_requests/approvals/rules/), page header tier statement | Current documentation; the deployed GitLab edition and version are unknown |
| G2 | [GitLab: Protected branches](https://docs.gitlab.com/user/project/repository/branches/protected/), tier statement and "Push and merge permissions" | Same |
| A1 | [Argo CD: Sync Options](https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/): "No Prune Resources", "Resource Pruning With Confirmation", "Resource Deletion With Confirmation", "Fail the sync if a shared resource is found" | Upstream stable documentation. The OpenShift GitOps 1.22 support status of each option was not verified; the same applies to A2–A6. |
| A2 | [Argo CD: Automated Sync Policy](https://argo-cd.readthedocs.io/en/stable/user-guide/auto_sync/): "Automatic Self-Healing", "Automated Sync Semantics" (one sync per commit SHA and parameters; default reconciliation interval 120 s plus jitter) | Upstream stable documentation |
| A3 | [Argo CD: Tracking and Deployment Strategies](https://argo-cd.readthedocs.io/en/stable/user-guide/tracking_strategies/): "Commit Pinning", "HEAD / Branch Tracking" | Same |
| A4 | [Argo CD: RBAC Configuration](https://argo-cd.readthedocs.io/en/stable/operator-manual/rbac/): "The `applications` resource" (update/delete on the application versus its resources), "The `override` action" (`requireOverridePrivilegeForRevisionSync`, new since 3.2; no override sync with auto-sync enabled) | Same. Argo CD RBAC actions apply to the whole Application; no field-level action is documented (inference from the listed actions) |
| A5 | [Argo CD: Git GnuPG signature verification](https://argo-cd.readthedocs.io/en/stable/user-guide/source-integrity-git-gpg/) | Same; `sourceIntegrity` form since 3.5 |
| A6 | [Argo CD: App Deletion](https://argo-cd.readthedocs.io/en/stable/user-guide/app_deletion/): "About The Deletion Finalizer" | Same |
| K1 | [Kubernetes: Using RBAC Authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/), "Referring to resources" | RBAC rules name API groups, resources, resource names and verbs; no field-level rule exists (inference from the rule schema) |
| K2 | [Kubernetes: Garbage collection, "Cascading deletion"](https://kubernetes.io/docs/concepts/architecture/garbage-collection/#cascading-deletion); [Namespaces walkthrough, "Deleting a namespace"](https://kubernetes.io/docs/tasks/administer-cluster/namespaces/) ("This deletes everything under the namespace") | Upstream current documentation; behaviour present in 1.35 |
| K3 | [Kubernetes: API concepts, "Resource versions" / update conflicts](https://kubernetes.io/docs/reference/using-api/api-concepts/) (stale `resourceVersion` → `409 Conflict`) | Same |
| O1 | [OpenBao: KV secrets engine version 2](https://openbao.org/docs/secrets/kv/kv-v2/), check-and-set (`cas`) on write | Upstream current documentation; the deployed OpenBao version and engine configuration are unknown |
| W1 | [AWX 24.6.1 user guide: Job Templates, "Concurrent Jobs"](https://docs.ansible.com/projects/awx/en/24.6.1/userguide/job_templates.html) | Upstream AWX; equivalence with the AAP release in use is not verified |
| P8 | [OpenShift 4.22 Hosted control planes, Ch. 16 Destroying a hosted cluster](https://docs.redhat.com/en/documentation/openshift_container_platform/4.22/html/hosted_control_planes/destroying-a-hosted-cluster), §16.3.1 | Latest GA line observed; not a deployed-version claim |

Hosted-cluster lifecycle, update and storage references are cited in the
[platform design](../CLaaS/platform-design.md#sources-consulted). The Argo CD
controller-privilege and OLM evidence comes from the
[feasibility register](../CLaaS/technical-feasibility.md) with its stated limits.
Historical workbench inputs are cited in §1 and §4 as lessons only.