Skip to content

[Gap]: Document preflight checks for Stacklok Enterprise Platform #1067

Description

@glageju

What needs documentation?

Document the preflight checks feature for the Stacklok Enterprise Platform
Helm chart: the shipped Preflight custom resource, the advisory
kubectl preflight workflow on the Helm CLI install path, and the opt-in
preflight.enforce=true in-cluster blocking mode.

Fold this into the existing install guides rather than adding a new page:

  • docs/platform/enterprise-platform/deployment.mdx — new "Run preflight
    checks" section between "What the chart includes" and "Deploy with Helm".
  • docs/platform/enterprise-platform/airgap-install.mdx — a short addition
    covering the air-gapped/offline behavior of the default spec.

No new page and no sidebar changes are needed.

Design notes (click to expand)

deployment.mdx — "Run preflight checks" section

Place between "What the chart includes" and "Deploy with Helm". Cover, in
order:

  1. Framing — the umbrella chart ships a Preflight custom resource as a
    labeled Secret; helm template ... | kubectl preflight - analyzes real
    prerequisites automatically. Catches Kubernetes version below the chart
    floor, tight node capacity, unreachable OIDC issuer, missing signing-key
    Secret, before they surface later as failed pods.

  2. Install the CLI plugin — recommend the pinned binary release from
    replicatedhq/troubleshoot (the version Stacklok's CI validates against);
    note kubectl krew install preflight as a quicker but unpinned
    alternative that can silently drift ahead of the tested version.

  3. Run it against your real values — use the real values.yaml from
    the "Configure values" step, not an empty render, since the opt-in
    analyzers (OIDC, signing-key, postgres) only render when their values
    are set.

  4. What it checks — a table:

    Check Renders when Outcome
    Kubernetes version Always fail below 1.28 (chart floor)
    Node capacity (CPU/memory) Always warn if tight, smallest node
    Distribution Always warn on OpenShift OCP
    Egress reachability preflight.checkEgress=true warn only; off by default, always fails in air gap
    Registry database reachability registryServer.enabled + run-time preflightDatabaseUri fail if unreachable
    OIDC issuer reachability enterpriseManager.enabled=true + idpConfig.issuer set fail if unreachable/misconfigured
    Signing-key Secret exists enterpriseManager.enabled=true fail if signingConfig.existingSecret missing
  5. Registry database credential warning — the DB URI includes a
    password; supply it as a one-off --set flag at preflight time, never
    in a permanent or GitOps-tracked values file (the spec ships as a
    Secret, so a persistent value leaves the password in-cluster
    indefinitely).

  6. Advisory by default — on the Helm CLI path, kubectl preflight
    can't block helm install. A fail is a signal to act on manually, not
    an automatic gate.

  7. Optional real enforcement (preflight.enforce=true) — full
    coverage: what it does (in-cluster pre-install/pre-upgrade Job that
    genuinely fails the release on fail), its two prerequisites
    (global.replicated.dockerconfigjson for the license-gated runner
    image; the Job's own cluster-scoped read RBAC), how to diagnose a
    blocked install (kubectl logs job/<release>-preflight-check), and how
    to bypass a known false positive (--set preflight.enforce=false).

  8. What preflight can't check — installer RBAC rights (no
    SelfSubjectAccessReview-style analyzer; verify with kubectl auth can-i) and CRD collisions with a prior install (no CRD analyzer ships;
    check kubectl get crd | grep toolhive.stacklok.dev by hand).

airgap-install.mdx addition

Short subsection under "Step 5: Install and verify": the default spec runs
entirely offline, so it works unchanged air-gapped. Template the locally
transferred chart directory instead of the oci:// reference. Note that
mirroring the preflight_<os>_<arch>.tar.gz release asset alongside the
chart/image transfer covers the CLI plugin itself if the transfer
workstation needs it.

Style: second person, active voice, no em dashes, sentence-case
headings, tables for structured comparisons, :::note/:::warning
admonitions for the CLI-version guidance and the credential-handling
callout, matching the conventions already used in both target pages.

Context and references

Use case

As a Stacklok Enterprise Platform customer, I want to catch install-time
misconfigurations (unsupported Kubernetes version, insufficient node
capacity, an unreachable OIDC issuer, a missing signing-key Secret) before
helm install fails partway through, so I can fix problems upfront instead
of debugging a partially-applied release.

Additional context

Scope is documentation only; the feature itself is already implemented and
merged upstream.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions