Skip to content

feat: scaffold gitops tenant plumbing#1

Merged
devantler merged 5 commits into
mainfrom
claude/initial-template
May 30, 2026
Merged

feat: scaffold gitops tenant plumbing#1
devantler merged 5 commits into
mainfrom
claude/initial-template

Conversation

@devantler
Copy link
Copy Markdown
Contributor

@devantler devantler commented May 29, 2026

What

Initial content for gitops-tenant-template — a framework-agnostic, stack-neutral template for GitOps tenants on the devantler-tech platform. New tenants are created with "Use this template"; the shared CI/CD plumbing is kept current in every tenant via template-sync.

Public, flagged as a template repository, with the org's required custom properties (Type=Application, …).

Rebased on the tenants' current main (an earlier draft was based on stale pinned submodule commits). The shared files below mirror what ascoachingogvaner and wedding-app already run, so syncing is a clean, minimal diff.

Template-owned (kept in sync across tenants)

File Purpose
.github/workflows/cd.yaml On a v* tag → publish-app.yaml (build, digest-pin, push + cosign-sign), app-name = repo name
.github/workflows/release.yaml semantic-release on main
.github/workflows/template-sync.yaml Weekly template-sync PR
CLAUDE.md @AGENTS.md shim (identical across tenants)
zizmor.yml Actions pinning policy (identical across tenants)

cd.yaml/release.yaml/template-sync.yaml are self-guarded (if: github.repository != '…/gitops-tenant-template') so this repo stays inert.

Tenant-owned scaffolding (each tenant lists these in .templatesyncignore)

AGENTS.md (tenant-specific project overview), .claude/skills/maintain/SKILL.md, example ci.yaml, dependabot baseline (github-actions + docker), stack-neutral .releaserc, Dockerfile, .sops.yaml, .gitignore, and a deploy/ skeleton (Deployment, Service, HTTPRoute, optional CNPG Cluster, example secret).

Pins (current latest)

  • publish-app.yaml / create-release.yaml → reusable-workflows v5.2.0 (the tenants currently pin the older v3.2.0/v3.1.4/@main; sync bumps them).
  • aggregate-job-checks → actions v5.1.0.

Validation

actionlint clean · zizmor --config zizmor.yml clean · kubectl kustomize deploy/ builds.

⚠️ Blocked on a re-pin

template-sync.yaml references the new reusable workflow from reusable-workflows#261, not yet released. It is pinned to that PR's head commit (733557c); re-pin to the released tag once #261 merges. Promote #261 first.

🤖 Generated with Claude Code

Initial content for the GitOps tenant template: framework-agnostic,
stack-neutral CI/CD plumbing for apps that run on the devantler-tech
platform.

Template-owned (kept in sync across tenants):
- .github/workflows/cd.yaml — calls publish-app.yaml on v* tags (build,
  digest-pin, push + cosign-sign the manifests OCI artifact)
- .github/workflows/release.yaml — semantic-release on main
- .github/workflows/template-sync.yaml — weekly template-sync PR
- AGENTS.md / CLAUDE.md — shared tenant conventions

Scaffolding (tenant-owned; listed in each tenant's .templatesyncignore):
example ci.yaml, dependabot baseline (actions + docker), .releaserc,
Dockerfile, .sops.yaml, .gitignore, and a deploy/ skeleton (Deployment,
Service, HTTPRoute, optional CNPG Cluster, example secret).

cd.yaml and release.yaml are self-guarded so the template repo itself stays
inert; they run only in tenants created from it. template-sync.yaml is
pinned to the commit that introduces the reusable workflow
(devantler-tech/reusable-workflows#261) and must be re-pinned to the
released tag once that PR ships.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 29, 2026 23:12
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Scaffolds the initial gitops-tenant-template repository used to create new GitOps tenant repos on the devantler-tech platform, including shared CI/CD plumbing (via reusable workflows + template-sync) and stack-neutral deployment manifests.

Changes:

  • Add template-owned GitHub Actions workflows for release/CD and weekly template synchronization.
  • Add tenant scaffolding: deploy/ Kustomize resources, placeholder Dockerfile, baseline dependabot config, SOPS rules, and repo hygiene files.
  • Add agent conventions via AGENTS.md (+ CLAUDE.md indirection) and expand README documentation for tenant usage.

Reviewed changes

Copilot reviewed 18 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
README.md Expanded template documentation, ownership split, and local validation steps.
LICENSE Adds Apache 2.0 license text.
Dockerfile Placeholder container build file for tenant replacement.
deploy/kustomization.yaml Kustomize entrypoint wiring the scaffolded resources.
deploy/deployment.yaml PodSecurity-restricted-friendly Deployment skeleton with digest-pinning convention.
deploy/service.yaml Service exposing the app port mapping.
deploy/httproute.yaml Gateway API HTTPRoute skeleton for external access.
deploy/cluster.yaml Optional CloudNativePG Cluster example for tenants needing a DB.
deploy/secret.example.yaml Example Secret workflow + SOPS encryption guidance (not included in kustomization).
CLAUDE.md Claude Code entrypoint including AGENTS.md.
AGENTS.md Centralized agent/assistant conventions for tenant repos created from the template.
.sops.yaml SOPS creation rules for encrypting deploy/*.enc.yaml secrets.
.releaserc Stack-neutral semantic-release configuration baseline.
.gitignore Baseline ignores emphasizing not committing decrypted secrets.
.github/dependabot.yml Dependabot baseline for GitHub Actions + Docker updates.
.github/workflows/template-sync.yaml Weekly template-sync job calling the reusable workflow.
.github/workflows/release.yaml Release workflow (semantic-release via reusable workflow) for tenant repos.
.github/workflows/cd.yaml Tag-driven publish workflow calling the reusable publish workflow.
.github/workflows/ci.yaml Example CI workflow with required-check aggregation scaffold.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread AGENTS.md Outdated
Comment thread .github/workflows/template-sync.yaml Outdated
devantler and others added 2 commits May 30, 2026 01:30
Rebase the template's shared plumbing on the tenants' CURRENT main (the
earlier draft was based on stale pinned submodule commits):

- cd.yaml: add `name: Publish` to match the tenants' job shape (already
  uses publish-app.yaml @ v5.2.0 with a generic app-name).
- Add zizmor.yml — the GitHub Actions pinning policy both tenants already
  share; now template-owned and kept in sync.
- AGENTS.md is now correctly a TENANT-OWNED scaffold (each tenant has a
  project-specific overview), not a synced file. Rewrote it as a generic
  scaffold and moved it to the ignore list.
- Ship the `maintain` skill as a (tenant-owned) scaffold.
- README: corrected the owned-vs-synced split — synced = cd.yaml,
  release.yaml, template-sync.yaml, CLAUDE.md, zizmor.yml; everything else
  (incl. AGENTS.md and the maintain skill) is tenant-owned.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Tenants no longer use SOPS for their own app secrets — they source them
from OpenBao via External Secrets. Replace the SOPS scaffolding with the
platform's enforced tenant pattern:

- Remove .sops.yaml and the SOPS-encrypted secret example.
- Add deploy/secretstore.yaml — a namespaced SecretStore (the Kyverno
  policy restrict-tenant-secret-stores blocks tenants from the shared
  ClusterSecretStore) authenticating via a tenant-scoped Vault role limited
  to secret/data/apps/<tenant>/*.
- Add deploy/externalsecret.yaml — materializes the app Secret from OpenBao.
- Drop .sops.yaml from the ignore list; update AGENTS.md/.gitignore.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 29, 2026 23:40
Copy link
Copy Markdown

Copilot AI left a comment

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 20 out of 21 changed files in this pull request and generated 2 comments.

Comment thread Dockerfile Outdated
Comment thread .github/workflows/template-sync.yaml Outdated
@devantler devantler marked this pull request as ready for review May 29, 2026 23:45
The reusable template-sync workflow is now released (v5.3.0). Re-pin off
the pre-release commit onto the tag.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…fold

The alpine placeholder ran as root and exited immediately, conflicting with
deploy/deployment.yaml's runAsNonRoot + HTTP probes on 3000 — a tenant that
tagged before replacing it would publish an unstartable image. Serve a
non-root HTTP placeholder on port 3000 so the scaffold deploys cleanly as-is.
Addresses the Copilot review note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 30, 2026 00:04
@devantler devantler merged commit 3209ca0 into main May 30, 2026
5 of 6 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

3 participants