docs(gitops): plan-on-PR workflow template (I1)#153
Merged
Conversation
Add examples/gitops-pr-plan/ — a reusable GitHub Actions workflow that runs `openctl plan` (K7) on every PR touching manifests and posts the apply order + $ref dependency graph as a sticky PR comment, so a reviewer sees what will happen, in what order, and what waits on what before merge. The PR-gated front half of the DriftlessAF loop (the controller reconciles on merge/webhook via B1-B3). Kept under examples/ (NOT .github/workflows/) so it doesn't run on openctl's own repo — it's a template to copy into a user's infra repo. Offline (no controller), self-contained (only `gh` + pull-requests:write), sticky comment (update-in-place via gh api), and a dependency cycle makes `openctl plan` exit non-zero → the check fails and blocks merge. README covers adoption + scope (per-resource diffs are server-only, out of scope).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I1 — plan-on-PR
A reusable GitHub Actions workflow template that runs
openctl plan(K7) on every PR touching manifests and posts the apply order +$refdependency graph as a sticky PR comment — the PR-gated front half of the DriftlessAF loop (the controller reconciles on merge/webhook via B1–B3).examples/gitops-pr-plan/:plan.yml— the workflow (copy into your infra repo's.github/workflows/).README.md— adoption + scope.Properties
openctl planneeds no controller connection.gh(preinstalled) +pull-requests: write; no third-party actions.gh api+ a hidden marker) instead of spamming.openctl planexit non-zero → the check fails and blocks merge..github/workflows/on purpose — it's a template for your repo; it must not run on openctl's own.Scope
Ordering + dependency graph only. Per-resource dry-run diffs (spec drift vs the live cluster) are server-only (need a running controller's
DryRunApply) and are intentionally out of scope for this offline preview — consistent with K7.Docs/example only — no Go changes.