Skip to content

Document preflight checks for Stacklok Enterprise Platform - #1068

Open
glageju wants to merge 12 commits into
mainfrom
gautam/preflight-documentation
Open

Document preflight checks for Stacklok Enterprise Platform#1068
glageju wants to merge 12 commits into
mainfrom
gautam/preflight-documentation

Conversation

@glageju

@glageju glageju commented Jul 29, 2026

Copy link
Copy Markdown

Description

Documents 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. This lets customers catch
install-time misconfigurations, an unsupported Kubernetes version, tight
node capacity, an unreachable OIDC issuer, a missing signing-key Secret,
before helm install fails partway through a release.

docs/platform/enterprise-platform/deployment.mdx

Adds a "Run preflight checks" section between "What the chart includes" and
"Deploy with Helm", covering:

  • Registry authentication and a real values.yaml are prerequisites for
    running the check, since helm template against an oci:// reference is
    itself a registry pull; the section points readers to the relevant
    numbered steps below
  • Installing the kubectl-preflight CLI plugin with krew as the primary
    path (any recent release works), with a pinned direct-download fallback
    for air-gapped or krew-less environments
  • Running the spec against real values so opt-in analyzers (OIDC,
    signing-key, registry database) actually render
  • A table of every check, when it renders, and its outcome
  • A credential-handling warning for supplying the registry database URI as
    a one-off --set flag alongside the real values file, using placeholder
    values rather than a literal-looking connection string
  • The advisory-only nature of the Helm CLI path
  • The optional preflight.enforce=true in-cluster blocking mode: its
    prerequisites, how to diagnose a blocked install, and how to bypass a
    known false positive
  • The two gaps preflight can't check (installer RBAC rights, CRD collisions
    with a prior install) and how to verify them manually

docs/platform/enterprise-platform/airgap-install.mdx

Adds a "Preflight, install, and verify" step (renamed from "Install and
verify") with two subsections in order: "Run preflight checks against the
mirrored chart" runs first, templating the local chart archive from the
mirror step instead of an oci:// reference, followed by "Install and
verify" (the prior content, unchanged). Preflighting runs before install so
it can catch problems ahead of time.

Type of change

  • New documentation

Related issues/PRs

Closes #1067

Upstream implementation: stacklok/stacklok-enterprise-platform#2513

Screenshots

Not applicable, no navigation or formatting changes.

Submitter checklist

Content and formatting

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and
    style

Reviewer checklist

Content

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and
    style

Vercel Deployment: CLICK HERE

glageju added 4 commits July 29, 2026 11:17
Implements documentation for issue #1067:
- Add "Run preflight checks" section covering the shipped Preflight CR
- Cover CLI plugin install, running against real values, and all checks
- Document advisory-by-default behavior and preflight.enforce=true
- Note the RBAC and CRD-collision gaps preflight cannot verify
Implements documentation for issue #1067:
- Add a subsection under "Step 5: Install and verify" showing that
  the default preflight spec runs entirely offline
- Show templating the locally transferred chart instead of oci://
- Note mirroring the CLI plugin release asset for the transfer workstation
Follow-up for issue #1067:
- Prefix idpConfig.issuer and signingConfig.existingSecret with the
  enterprise-manager subchart key, matching the rest of the page
- Rephrase the enforcement heading to plain English
Follow-up for issue #1067, iteration 2:
- Qualify preflightDatabaseUri with the toolhive-registry-server prefix
  in the checks table, matching the other conditional rows
- Distinguish the preflight.enforce values-file form from the --set flag
- Restructure two run-on sentences for clarity
Copilot AI review requested due to automatic review settings July 29, 2026 18:30
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview Jul 30, 2026 12:09am

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for the Stacklok Enterprise Platform Helm chart preflight checks so readers can validate cluster prerequisites (and optionally enforce checks in-cluster) before running an install/upgrade that fails partway through.

Changes:

  • Added a new “Run preflight checks” section to the standard deployment guide, including plugin install, running against real values, a checks table, advisory vs. enforced modes, and manual verification gaps.
  • Added an air-gapped install subsection showing how to run preflight checks against a locally mirrored chart directory and mirror the CLI plugin asset if needed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
docs/platform/enterprise-platform/deployment.mdx Adds comprehensive preflight-check guidance (install, run, interpret results, enforcement mode, and limitations).
docs/platform/enterprise-platform/airgap-install.mdx Adds air-gap specific preflight workflow using the mirrored chart directory and mirrored plugin assets.

Comment on lines +102 to +106
PREFLIGHT_VERSION=v0.131.1
os=$(uname -s | tr '[:upper:]' '[:lower:]')
arch=$(uname -m); [ "$arch" = "x86_64" ] && arch=amd64
curl -fsSL -o preflight.tar.gz \
"https://github.com/replicatedhq/troubleshoot/releases/download/${PREFLIGHT_VERSION}/preflight_${os}_${arch}.tar.gz"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks. Fixed in 61fe891: macOS now resolves to the real preflight_darwin_all.tar.gz asset (Troubleshoot ships one universal binary for darwin, not per-arch), and Linux keeps the uname -m normalization for arm64/amd64.

Comment on lines +160 to +163
helm template stacklok-enterprise <CHART> \
--set registryServer.enabled=true \
--set 'toolhive-registry-server.preflightDatabaseUri=postgres://user:pass@host:5432/db?sslmode=require' \
| kubectl preflight -

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up: you're right that a literal-looking connection string isn't great practice regardless of the redaction question. Fixed in d155dc6 by switching to <USER>/<PASSWORD>/<HOST>/<DATABASE> placeholders, matching this page's existing convention.

Comment on lines +175 to +178
On the Helm CLI install path, `kubectl preflight` can't block `helm install`. A
`fail` result is a signal you act on yourself, not an automatic gate: don't
proceed to [Step 4](#4-install-the-chart) while any check reports `fail`. Fix
the underlying cluster condition first.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 61fe891: reworded to "a signal to act on, not an automatic gate."

Comment thread docs/platform/enterprise-platform/airgap-install.mdx Outdated
Follow-up for issue #1067 / PR #1068:
- Fix the CLI download URL to match real Troubleshoot release assets
  (darwin ships a single universal binary, not per-arch ones)
- Reword two awkward sentences flagged in review
Match how the docs already treat third-party tool versions (helm,
cosign): a minimum/compatible version, not a pin tied to Stacklok's
internal CI. krew becomes the primary install path; the pinned
release download moves to a fallback for air-gapped or krew-less
setups, without claiming to match a CI-validated version.
Match the <ALL_CAPS> placeholder convention used elsewhere on this
page instead of a literal-looking connection string.
- Explain <CHANNEL> and <VERSION> at first use, since the preflight
  section now runs before Step 1 where they were previously introduced
- Replace the vague <CHART> placeholder with the concrete oci:// reference
Preflight is meant to catch problems before helm install, but the
prior placement ran it after install already succeeded and pods were
verified Running, defeating the point. Move "Run preflight checks"
ahead of "Install and verify" within Step 5, and rename the step to
"Preflight, install, and verify" to reflect both subsections.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (4)

docs/platform/enterprise-platform/deployment.mdx:130

  • This line encourages using whatever is "current"/"latest" on the Troubleshoot releases page. That conflicts with the pinned-version guidance described in the PR (pick a specific version that Stacklok validates, rather than chasing latest). Consider rephrasing to avoid implying readers should update to the newest version opportunistically.
Check the [releases page](https://github.com/replicatedhq/troubleshoot/releases)
for the current version rather than assuming `v0.131.1` above is still latest.

docs/platform/enterprise-platform/deployment.mdx:93

  • This section says to run preflight "before you authenticate", but the workflow here uses helm template against an OCI chart URL, which requires authenticating to oci.stacklok.com (as described in Step 1 later in this file). This is inconsistent and can block readers from running preflight at the intended point in the install flow.
Before you authenticate and install, run the platform's **preflight** spec
against your target cluster. The umbrella chart ships a `Preflight` custom
resource as a labeled Secret, so rendering the chart and piping it to the
`kubectl-preflight` plugin analyzes real prerequisites automatically. It catches
misconfigurations before they surface later as failed pods or a stuck rollout: a

docs/platform/enterprise-platform/deployment.mdx:155

  • helm template doesn't typically "prompt" for registry credentials; it will fail unless you've already authenticated (e.g., helm registry login) or otherwise configured credentials. Since this page already documents helm registry login in Step 1, reword this to avoid implying an interactive prompt and to keep the flow consistent.
`helm template` prompts for the same registry credentials you use in
[Step 1](#1-authenticate-to-the-replicated-registry): your license email as the
username and your **License ID** as the password.

docs/platform/enterprise-platform/deployment.mdx:105

  • This suggests "Any recent release works" for the kubectl-preflight plugin, but the PR description/issue scope calls out recommending a pinned Troubleshoot release (the version Stacklok CI validates) and noting krew as an unpinned alternative that can drift. As written, readers will likely default to krew/latest and miss the pinned-version guidance.

This issue also appears on line 129 of the same file.

Any recent release works; the chart's `Preflight` spec doesn't depend on a
specific CLI version.

- Add the missing --values values.yaml flag to the registry database
  credential example; without it, copying that block standalone drops
  the real values file and silently skips every other analyzer
- Reword the "Step 4" cross-reference, since no numbered steps are
  visible from the preflight section itself
- deployment.mdx: explain where global.replicated.dockerconfigjson
  comes from (injected by the registry at pull time, not hand-set),
  verified against stacklok-enterprise-platform's appendix-b-helm-
  distribution.md and troubleshoot.md
- airgap-install.mdx: fix the preflight template command to reference
  the actual .tgz this flow produces, not an invented unpacked
  directory that never exists in this walkthrough
"Before you authenticate and install" was wrong: helm template
against an oci:// reference is itself a registry pull, so it needs
the same authentication as helm install. Verified against Replicated's
own docs and the upstream install-helm.md, which orders preflight
right after authentication, not before it. Fix the framing to point
the reader at Step 1 and Step 3 first, rather than claiming preflight
runs before authenticating.
@glageju
glageju marked this pull request as ready for review July 30, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Gap]: Document preflight checks for Stacklok Enterprise Platform

2 participants