123 Commits

Author SHA1 Message Date
unkinben 6bb636846f branch_protection: stop whitelist representation churn planning every run
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Why:
- The go-gitea/gitea provider stores branch-protection whitelist users/teams as
  plain names, but Gitea resolves them to IDs and, on read, returns them via
  getWhitelistEntities over the repo's readers: users ordered by user ID, teams
  ordered by name, and any entity without read access to the repo silently
  dropped.
- So the read-back representation of push/merge/approval whitelists rarely
  matches the config list (order differs, or a whitelisted user/team that lacks
  repo access disappears), and tofu plans an in-place update for those branch
  protections on every run even with no config change.
- This is the same class of provider representation churn already handled for
  teams in #62 (units/repositories), and it blocks a clean plan on terraform-git.

Change:
- Add a targeted ignore_changes on the six whitelist list attributes
  (push/merge/approval, users and teams) at the branch_protection module so the
  churn no longer triggers a spurious update, keeping every protected repo
  idempotent.
- Leave enable_push, required_approvals, status_check_patterns and the
  block_merge_on_* flags managed; those round-trip cleanly and stay drift-checked.
2026-08-11 21:01:10 +10:00
benvin 6d937ae6cd Merge pull request 'repository: protect jellyfin-ha-src main branch' (#64) from benvin/jellyfin-ha-src-protection into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #64
2026-08-11 20:45:40 +10:00
unkinben db62cd1b26 repository: protect jellyfin-ha-src main branch
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Now that the source fork is seeded on main with the pinned upstream tree and a
pristine upstream ref, enable branch protection on main: block direct pushes
and require an Owners approval so future changes land through reviewed pull
requests.
2026-08-10 23:55:07 +10:00
benvin 5bf5f9d85e Merge pull request 'repository: add jellyfin-ha-src source fork' (#63) from benvin/jellyfin-ha-src into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #63
2026-08-10 23:43:04 +10:00
unkinben 4ca5145d50 repository: add jellyfin-ha-src source fork
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Add the jellyfin-ha-src Gitea repository that carries the HA source fork of
ZoltyMat/jellyfin-ha with local patches, replacing the direct upstream clone
in the build pipeline.

Declare the repository as public with a main default branch and
delete-branch-after-merge enabled. Leave branch protection unset so the
initial fork seed can push the pinned upstream tree and a pristine upstream
ref directly to main; protection is added in a follow-up change once the fork
is seeded.
2026-08-10 23:35:19 +10:00
benvin 62596a8086 Merge pull request 'team: stop spurious edits that fail Gitea 1.26 permission validation' (#62) from benvin/gitea-provider-1.26 into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #62
2026-08-10 23:05:51 +10:00
unkinben df118383da team: stop spurious edits that fail Gitea 1.26 permission validation
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Why:
- The go-gitea/gitea provider's SDK (v0.25.1, already shipped in provider
  0.8.1 on main) rejects a team permission of `none` on every EditTeam with
  "permission mode invalid"; it only accepts read/write/admin/owner
  client-side. The same check exists in the older 0.21.0 SDK, so the provider
  version is not the lever here.
- The team module's `units` (server returns an unordered space-separated
  string that never matches the provider's comma-ordered default) and
  `repositories` (provider sorts state; `include_all_repositories` populates
  every repo) drift on representation alone, so every apply plans an in-place
  update for every team.
- Each update calls EditTeam, which replays the stored `permission=none` kept
  by `ignore_changes` and fails, blocking apply for every non-owner team
  (docker/terraform/rpmbuild/puppet/pybuild/forgebot/agents) and the whole
  terraform-git apply, including the unkin-agent rollout.

Change:
- Add `units` and `repositories` to the team `ignore_changes` so provider
  representation churn no longer triggers an EditTeam call.
- Preserve each team's current on-server permission and repository membership
  (no access change).
2026-08-09 12:31:19 +10:00
benvin 15978c486f Merge pull request 'Import pre-existing Gitea branch protections' (#61) from benvin/imports-branch-protection into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #61
2026-08-09 12:01:51 +10:00
unkinben a43267532a Import pre-existing Gitea branch protections
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Why:
- tofu apply fails with "Branch protection already exist" because the nine
  repos protected in #60 already have live branch protection in Gitea that is
  absent from Terraform state, so Terraform tries to create rules that already
  exist and Gitea rejects them.
- The pinned go-gitea/gitea provider 0.7.0 defines no importer for
  gitea_repository_branch_protection, so the existing rules cannot be adopted
  on that version.

How:
- Bump the gitea provider from 0.7.0 to 0.8.1, which adds an importer for
  gitea_repository_branch_protection (id format <org>/<repo>/<rule_name>).
- Add import blocks adopting the nine existing branch protections into state
  instead of recreating them.
2026-08-09 11:45:26 +10:00
benvin d7d6794a51 Merge pull request 'Add unkin-agent Gitea identity with write but no merge' (#59) from benvin/unkin-agent-identity into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #59
2026-08-08 23:34:24 +10:00
benvin 7c4defde29 Merge pull request 'Protect default branches of unprotected active repos' (#60) from benvin/protect-unprotected-repos into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #60
2026-08-08 23:17:44 +10:00
unkinben f720133314 Protect default branches of unprotected active repos
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Why:
- An audit for the new unkin-agent bot (org-wide write) found repos with
  no branch_protection at all, so the agent (or anyone with write) could
  push straight to their default branch.
- The rest of the estate protects default branches; these repos were the gap.

How:
- Add enable_push: false + approval_whitelist_teams: Owners on each active
  repo's default branch, matching the estate's most common convention
  (PR-only; Owners can still open and approve).
- Omit status checks on these repos as none run CI, so a required context
  would permanently block merges.
- Leave the 8 archived repos untouched: they are read-only, nothing can push
  to them, and branch-protection creation on archived repos is rejected.
2026-08-08 22:58:54 +10:00
unkinben 4953142200 Add unkin-agent Gitea identity with write but no merge
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Why: AI coding agents currently push and open PRs as Ben's own account
using Ben's token, so their work is unattributable and carries Ben's full
owner privileges. A dedicated least-privilege identity separates agent work
from Ben's and keeps merge a human decision.

How:
- add the unkin-agent bot user (non-admin, no org/repo creation, limited
  visibility); it authenticates via ephemeral vault-plugin-secrets-gitea
  tokens, not a stored password
- add the agents team granting Write on all unkin repositories, the minimum
  needed to push branches and open PRs; unkin-agent is its only member
- add merge_whitelist_teams Owners to every default-branch protection rule
  that lacked a merge whitelist, so Write no longer implies merge and only
  Owners (Ben) can merge across the estate
2026-08-08 22:37:52 +10:00
benvin 4be9899e8e Merge pull request 'Add NetBox Vault secrets engine + provider repositories' (#57) from benvin/netbox-vault-repos into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #57
2026-08-06 22:13:36 +10:00
benvin 04b5f5c3bd Merge pull request 'Rename terraform-ipam -> terraform-infra' (#58) from benvin/rename-terraform-infra into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #58
2026-08-05 19:40:17 +10:00
unkinben f54e63caee Rename terraform-ipam -> terraform-infra
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Scope grew beyond IPAM (devices, provisioning). Renaming the config file renames
the managed repo; the gitea provider archives the old terraform-ipam repo
(archive_on_destroy=true) and creates terraform-infra. terraform-ipam only holds an
auto-init README, so nothing is lost.

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-05 00:51:36 +10:00
unkinben 674e659080 Add vault-plugin-secrets-netbox + terraform-provider-vault-secrets-netbox repositories
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Provisions the two Gitea repos for the NetBox Vault secrets engine and its
paired Terraform provider.

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-05 00:44:33 +10:00
benvin 9e16d7c5de Merge pull request 'Add terraform-ipam repository' (#56) from benvin/ipam-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #56
2026-08-03 00:15:37 +10:00
unkinben 41ac196b89 Add terraform-ipam repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
New repo for YAML-driven NetBox IPAM + Kea DHCP management.

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-03 00:09:05 +10:00
benvin fb6f45faf0 Merge pull request 'Add vault-plugin-secrets-apptoken repository' (#55) from benvin/add-apptoken-plugin-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #55
2026-08-02 21:50:29 +10:00
unkinben 1dfbddab92 Add vault-plugin-secrets-apptoken repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Provision the Gitea repo for a generic app-token Vault/OpenBao secrets
engine that issues short-lived signed JWTs for self-made services,
replacing per-app static bearer Secrets. Mirrors the existing plugin repo
entries (squash-only, main branch protection, PR CI checks).

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-02 21:36:48 +10:00
benvin 52b39bf668 Merge pull request 'Add terraform-provider-kea repository' (#54) from benvin/terraform-provider-kea-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #54
2026-08-02 19:37:00 +10:00
unkinben 5a2529f0c4 Add terraform-provider-kea repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Provisions the Gitea repo for the Terraform provider wrapping the
kea-operator KeaAPI (subnets + client classes).

Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-02 19:33:07 +10:00
benvin 3b229deb1b Merge pull request 'Add kea-operator Gitea repository' (#53) from benvin/kea-operator-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #53
2026-08-02 17:22:40 +10:00
unkinben 8fc5105d10 Add kea-operator Gitea repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Provision the repo for the new Kea DHCP Kubernetes operator that replaces
the ISC dhcpd PXE-boot VM.

- add config/git.unkin.net/unkin/repository/kea-operator.yaml
Claude-Session: https://claude.ai/code/session_01JUoARVdmhxKQHyyyp1pxeT
2026-08-02 16:56:38 +10:00
benvin c920451844 Merge pull request 'argocd-apps: require the vector-test PR check' (#52) from benvin/argocd-vector-test-required into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #52
2026-07-30 21:10:33 +10:00
unkinben 493c33483b argocd-apps: require the vector-test PR check
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-30 21:09:39 +10:00
benvin 58dafb7ac2 Merge pull request 'Add bootapi-images repository' (#51) from benvin/bootapi-images-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #51
2026-07-30 21:03:18 +10:00
unkinben 68584acffb Add bootapi-images repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
bootapi-images builds the AlmaLinux node rootfs tarballs that bootapi's
image-based provisioning (liveimg) unpacks, and on a v* tag publishes
almalinux9-node-<ver>.tar.zst to the artifactapi rootfs-images local repo. Split
out of bootapi-templates so that repo stays templates-only.

Modeled on the bootapi-templates entry: public, squash, delete-branch-after-merge,
main protection requiring the pre-commit + lint Woodpecker checks and benvin
approval.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-30 20:55:45 +10:00
benvin bd66d55c99 Merge pull request 'Add bootapi-templates repository' (#50) from benvin/bootapi-templates-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #50
2026-07-28 23:08:51 +10:00
unkinben fe662001c5 Add bootapi-templates repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
bootapi-templates holds the live kickstart/iPXE templates and the distro catalog
that bootapi pulls via git-sync (every ~3m, like argocd), so template/OS changes
ship without rebuilding bootapi. Its CI validates that every template parses and
renders for every catalog distro (via 'bootapi validate') plus shellcheck on the
%post snippets.

Modeled on the bootapi repo entry: public, squash, delete-branch-after-merge,
main protection requiring the pre-commit + validate Woodpecker checks and benvin
approval.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-28 22:35:46 +10:00
benvin c0fc234a1c Merge pull request 'Add bootapi repository' (#49) from benvin/bootapi-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #49
2026-07-28 18:41:49 +10:00
unkinben d53b6841e1 Add bootapi repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
bootapi is a Go service replacing Cobbler's PXE/kickstart side: it renders
kickstart files and iPXE boot scripts from NetBox data and serves them to
PXE-booting hosts. The ENC half already moved to encapi; bootapi covers the
provisioning/boot half.

Adds config/git.unkin.net/unkin/repository/bootapi.yaml modeled on encapi:
public repo, squash merges, delete-branch-after-merge, main branch protection
requiring the pre-commit/test/build Woodpecker checks and benvin approval.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-28 16:58:21 +10:00
benvin 38849ba79f Merge pull request 'vault provider: skip child token creation in CI' (#48) from benvin/vault-skip-child-token into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #48
2026-07-27 22:03:28 +10:00
unkinben 0385d2a1ef vault provider: skip child token creation in CI
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-27 21:52:24 +10:00
benvin c068f56eca Merge pull request 'Add logarchiver repository' (#47) from benvin/logarchiver-repo into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #47
2026-07-27 21:48:24 +10:00
benvin 99b13d81bc Merge pull request 'user: add gitea-vault-admin site-admin bot with one-time Vault KV seeding' (#46) from benvin/gitea-vault-admin into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #46
2026-07-27 21:47:31 +10:00
benvin 9cee6024d3 Add logarchiver repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Registers the logarchiver Gitea repo: a k8s Go service that archives
raw logs from NATS JetStream to S3 as zstd-compressed, GPG-encrypted,
indexed objects, plus a CLI to search and retrieve them. It replaces the
Vector archiver leg of the centralized logging stack (argocd-apps #296)
with zstd compression, OpenPGP encryption keyed from the Vault GPG
secrets engine, and a ClickHouse-backed searchable index.

- Add config/git.unkin.net/unkin/repository/logarchiver.yaml modeled on
  the existing Go-service repos (encapi, cephrgw-operator): public repo,
  main default branch, squash merges, branch protection requiring the
  woodpecker pre-commit/test/build PR checks with benvin approval.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-27 21:36:15 +10:00
unkinben bd7bef9f99 user: add gitea-vault-admin site-admin bot and one-time Vault KV seeding
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Why: the vault-plugin-secrets-gitea engine needs a purpose-built Gitea
site-admin credential to mint and delete per-user tokens. Provision that
account and its Vault seed here so the credential is generated once and never
exposed. Ben asked that the password be written to Vault exactly once and
never updated afterwards.

Change:
- Add config/git.unkin.net/user/gitea-vault-admin.yaml: a local site-admin bot
  (admin: true, limited visibility, no org/repo creation).
- Extend the user module with an optional vault_seed_path/vault_seed_mount: when
  set, write the account's generated password to Vault KV as admin_username and
  admin_password via vault_kv_secret_v2, with lifecycle ignore_changes on
  data_json so the write is create-only and never churns (random_password
  already never regenerates). This keeps the seed stable and prevents a re-apply
  from overwriting a password later rotated out-of-band by rotate-root.
- Add the hashicorp/vault provider (module plus root generate block); it reads
  VAULT_ADDR and VAULT_TOKEN already exported by the Makefile k8s login.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-27 19:26:24 +10:00
benvin 96092cf7a1 Merge pull request 'Manage Gitea users; add teabot personality bot accounts' (#45) from benvin/teabot-users into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #45
2026-07-27 17:33:25 +10:00
unkinben fd82876f5f Manage Gitea users; add teabot personality bot accounts
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Add a data-driven 'user' config kind so Gitea accounts are declared as
config/git.unkin.net/user/<name>.yaml, mirroring the existing repository
and team kinds. Wire the yaml into a new modules/user submodule that
creates a gitea_user (provider go-gitea/gitea 0.7.0, already pinned).

The provider's user resource requires a password; generate a per-user
random_password so nothing sensitive is hardcoded and only a placeholder
lives in state (tokens come later from vault-plugin-secrets-gitea).

Provision teabot's implementer and reviewer personality accounts with a
conservative posture: not site admins, no org creation, no repo creation,
limited profile visibility.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-27 17:22:19 +10:00
benvin ee08fd5585 Merge pull request 'Add gitea vault engine + provider repositories' (#44) from benvin/gitea-vault-repos into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #44
2026-07-27 00:40:20 +10:00
unkinben 4c5fe742f0 Add gitea vault engine + provider repositories
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Create the Gitea repositories for the new vault-plugin-secrets-gitea
secrets engine and its companion terraform-provider-giteavaultsecret,
mirroring the rancher pair's settings.

- add config/git.unkin.net/unkin/repository/vault-plugin-secrets-gitea.yaml
- add config/git.unkin.net/unkin/repository/terraform-provider-giteavaultsecret.yaml

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-27 00:34:28 +10:00
benvin aa9b2eac80 Merge pull request 'Add teabot repository (file)' (#43) from benvin/teabot-repo-add into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #43
2026-07-26 23:22:20 +10:00
unkinben 9dfddcf4d3 Add teabot repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
teabot is a Go daemon that watches Gitea repos and dispatches one-shot
Claude Code sessions in Docker to work issues and review PRs.

Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-26 23:19:44 +10:00
benvin 3f39229c29 Merge pull request 'Add vault-tools repository' (#41) from benvin/vault-tools-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #41
2026-07-26 23:19:36 +10:00
unkinben 42187f86d5 Add vault-tools repository
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Claude-Session: https://claude.ai/code/session_015ur3i7D2azsMAWTSVABApv
2026-07-26 23:18:08 +10:00
benvin 570b7a6cf9 Merge pull request 'ci: fetch vault from artifactapi instead of dnf install' (#39) from benvin/ci-vault-install-speedup into main
ci/woodpecker/push/apply Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Reviewed-on: #39
2026-07-25 09:48:12 +10:00
benvin 16eb029c2e Merge pull request 'Add encapic repository' (#40) from benvin/encapic-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #40
2026-07-25 09:47:03 +10:00
unkinben 3c53cf2722 Add encapic repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-07-25 09:45:26 +10:00
unkinben c2805d9196 Escape VAULT_VERSION for woodpecker YAML substitution ($$ -> shell)
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
2026-07-25 00:32:19 +10:00
benvin db4c5ad4fc ci: fetch vault from artifactapi instead of dnf install
ci/woodpecker/pr/plan Pipeline failed
ci/woodpecker/pr/pre-commit Pipeline was successful
CI installed vault by shelling out to `dnf install vault -y`, which reads
metadata for every enabled repo (appstream/baseos/crb/epel/ha) and downloads
the 169MB vendored vault RPM from the unkin repo on every pipeline run
(~39s per plan/apply job).

- Replace the dnf install with a pinned curl of the upstream vault zip from
  the artifactapi hashicorp-releases remote proxy, extracted with python3 to
  /usr/local/bin/vault.
- Pin the version via a VAULT_VERSION env var (1.20.0).
2026-07-25 00:27:20 +10:00
benvin 36451b08ad Merge pull request 'Add pdbmux repository' (#38) from benvin/pdbmux-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #38
2026-07-24 23:22:34 +10:00
benvin c2f505ae84 Add pdbmux repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-07-24 23:20:49 +10:00
benvin 645f693b48 Merge pull request 'Add terragrunt-enc repository' (#37) from benvin/terragrunt-enc-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #37
2026-07-24 23:07:31 +10:00
unkinben 4c9f3146ff Add terragrunt-enc repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
terragrunt-enc will be the single source of truth for encapi ENC data
(statuses, roles, node classifications), managed via Terraform/Terragrunt,
superseding Cobbler classification for Puppet.

- Add config/git.unkin.net/unkin/repository/terragrunt-enc.yaml (public,
  default_branch main, delete-branch-after-merge, squash merges).
- Protect main: block direct pushes, require the two Woodpecker PR status
  checks (pre-commit, plan), and whitelist benvin for approvals.
2026-07-24 23:04:03 +10:00
benvin 25d5f1a49f Merge pull request 'Add terraform-provider-tomswallapi repository' (#36) from benvin/add-tf-provider-tomswallapi into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #36
2026-07-19 23:53:08 +10:00
benvin b3b9caf457 Add terraform-provider-tomswallapi repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-07-19 22:18:44 +10:00
benvin 1198063e0b Merge pull request 'Add tomswallapi repository' (#35) from benvin/add-tomswallapi-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #35
2026-07-19 21:14:35 +10:00
benvin fc77e2b150 Add tomswallapi repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-07-19 18:35:04 +10:00
benvin d9a4396674 Merge pull request 'Add cephrgw-operator repository' (#34) from benvin/add-cephrgw-operator-repo into main
ci/woodpecker/push/apply Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Reviewed-on: #34
2026-07-18 08:27:40 +10:00
benvin bb7c55af9b Add cephrgw-operator repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
The cephrgw-operator provisions Ceph RGW (S3) buckets and access keys from
Kubernetes CRDs via the Ceph manager dashboard API, and needs a Gitea repo
to host its code and run Woodpecker CI.

- Add config/git.unkin.net/unkin/repository/cephrgw-operator.yaml with the
  standard public-repo settings (squash merge, delete branch on merge) and
  main branch protection requiring the pre-commit/test/build PR checks.
2026-07-18 00:08:06 +10:00
benvin 51a95ea624 Merge pull request 'Add the openbao private fork repository' (#32) from benvin/add-openbao-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #32
2026-07-17 23:36:04 +10:00
unkinben b92235571c Protect the openbao main branch
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Add branch protection to the openbao fork repository so main is protected: only
the owner may push directly and other changes must land via a pull request that
passes the fork build pipeline.

- Add branch_protection for main (whitelist-push to the owner; require the
  ci/woodpecker/pr/build status check on PRs); set squash as the default merge
2026-07-17 23:32:23 +10:00
benvin 0e2082e6c1 Merge pull request 'git: add dns-updater repository' (#33) from benvin/add-dns-updater-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #33
2026-07-17 23:18:13 +10:00
unkinben 62557a6c00 git: add dns-updater repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
RFC2136 dynamic-DNS updater daemon (Go) that replaces the puppet dns-update
shell script. Squash merge, protected main with woodpecker build/test/pre-commit
status checks.
2026-07-17 23:16:48 +10:00
unkinben 50673f371a Add the openbao private fork repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Create the Gitea repository for the private OpenBao fork so its integration
branch (main) can be pushed and hosted on git.unkin.net.

- Add config/git.unkin.net/unkin/repository/openbao.yaml (private, default branch
  main, delete branch after merge)
2026-07-17 23:04:11 +10:00
benvin c1a7b50ab0 Merge pull request 'Add terraform-provider-gpgvaultsecret repository' (#31) from benvin/add-tf-provider-gpg-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #31
2026-07-16 23:30:57 +10:00
unkinben 4af66baea4 Add terraform-provider-gpgvaultsecret repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
The Terraform provider for the gpg secrets engine needs a Gitea repo to hold
its source and run its Woodpecker PR/release pipelines.

- Add config/git.unkin.net/unkin/repository/terraform-provider-gpgvaultsecret.yaml
  (public, main default branch, squash-only, main branch protection gated on the
  pre-commit/build/test PR checks), mirroring the sibling
  terraform-provider-litellmvaultsecret repo.
2026-07-16 23:29:53 +10:00
benvin 8b07e66168 Merge pull request 'Add passv Gitea repository' (#30) from benvin/add-passv-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #30
2026-07-16 22:21:24 +10:00
unkinben 221bb24e90 Add passv Gitea repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
passv (a Vault-backed drop-in for pass) needs a Gitea repo to hold its source
and run its Woodpecker PR/release pipelines.

- Add config/git.unkin.net/unkin/repository/passv.yaml (public, main default
  branch, squash-only, main branch protection gated on the pre-commit/build/test
  PR checks), mirroring the sibling vault-plugin-secrets-gpg repo.
2026-07-16 22:16:17 +10:00
benvin acb17c1d7c Merge pull request 'Add Rancher token secrets-engine repos (plugin + terraform provider)' (#29) from benvin/vault-plugin-secrets-rancher into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #29
2026-07-15 23:58:17 +10:00
Ben Vincent bf0a604b9c Add vault-plugin-secrets-rancher + terraform-provider-ranchervaultsecret repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Creates the two Gitea repositories backing the new Rancher token secrets engine:
a Vault/OpenBao plugin and its Terraform provider.

- Add config/git.unkin.net/unkin/repository/vault-plugin-secrets-rancher.yaml
  (squash-only, main protected on pre-commit/build/test).
- Add config/git.unkin.net/unkin/repository/terraform-provider-ranchervaultsecret.yaml
  (same protection profile as the litellm provider repo).
2026-07-15 22:22:31 +10:00
benvin 312603d714 Merge pull request 'Add terraform-rancher repository' (#28) from benvin/terraform-rancher into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #28
2026-07-15 21:23:57 +10:00
unkinben 1055ea5c56 Add terraform-rancher repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Provision the terraform-rancher Gitea repo, which will manage Rancher's
Authentik OIDC auth (keycloakoidc AuthConfig) via the rancher2 provider,
mirroring the terraform-authentik pattern.
2026-07-15 21:17:47 +10:00
benvin e5c9fbd17d Merge pull request 'Add vault-plugin-secrets-gpg repository' (#27) from benvin/add-gpg-plugin-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #27
2026-07-15 20:53:33 +10:00
unkinben 3c16520b31 Add vault-plugin-secrets-gpg repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
The GPG/OpenPGP secrets engine needs a Gitea repo to hold its source and run
its Woodpecker PR/release pipelines.

- Add config/git.unkin.net/unkin/repository/vault-plugin-secrets-gpg.yaml
  (public, main default branch, squash-only, main branch protection gated on
  the pre-commit/build/test PR checks), mirroring the sibling
  vault-plugin-secrets-bind-tsig repo.
2026-07-15 07:40:22 +10:00
benvin b23829cdfb Merge pull request 'Add benvin-utils Gitea repository' (#26) from benvin/benvin-utils into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #26
2026-07-12 22:01:20 +10:00
Ben Vin 5e8c4f6c88 Add benvin-utils Gitea repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Register a new public repo to host benvin-utils, a monorepo of small
single-purpose CLI tools (first tool: podgap) that share a common Go library.

- Add config/git.unkin.net/unkin/repository/benvin-utils.yaml (main default branch, delete branch after merge)
2026-07-12 21:54:48 +10:00
benvin 1ad7a85867 Merge pull request 'Add vault-plugin-secrets-bind-tsig repository' (#25) from benvin/add-bind-tsig-plugin-repo into main
ci/woodpecker/push/apply Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Reviewed-on: #25
2026-07-11 02:00:53 +10:00
unkinben af552c9c01 Add vault-plugin-secrets-bind-tsig repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Declares the repo for a HashiCorp Vault / OpenBao secrets engine that
manages BIND TSIG keys via the bind-operator (static rotation + dynamic
creds). Mirrors the vault-plugin-secrets-litellm repo config.
2026-07-11 01:11:13 +10:00
benvin 85057e02d8 Merge pull request 'Add jellyfin-ha container-build repo' (#24) from benvin/jellyfin-ha into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #24
2026-07-05 22:42:33 +10:00
unkinben 6a159dc06f Add jellyfin-ha container-build repo
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Adds the Gitea repository that manages the Docker container build for the
jellyfin-ha (HA transcoding) Jellyfin fork.

- Create unkin/jellyfin-ha (public, squash merges, delete branch on merge)
- Protect main; require the ci/woodpecker/pr/build check and docker-team approval
2026-07-05 22:26:06 +10:00
benvin 2f794b2e9b Merge pull request 'chore: reset default owners' (#23) from benvin/merge-approval into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #23
2026-07-05 16:40:41 +10:00
unkinben d51bfe055b chore: reset default owners
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
change whitelist approval list to use benvin via oidc instead of gitea
local account unkinben
2026-07-05 15:47:20 +10:00
benvin b278be072d Merge pull request 'add encapi and terraform-provider-encapi repos' (#22) from benvin/add-encapi-repos into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #22
2026-07-04 23:39:49 +10:00
unkinben 96f2fc0302 add encapi and terraform-provider-encapi repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Create the two Gitea repos backing the new Puppet ENC that replaces Cobbler:
- encapi: Go API + encapi-cli, Postgres-backed
- terraform-provider-encapi: Terraform provider for ENC roles/statuses/nodes

Both use main as default branch with squash-merge, delete-branch-after-merge,
and branch protection gated on the PR pipelines (pre-commit, test, build).
2026-07-04 23:21:27 +10:00
benvin c2a84ecd83 Merge pull request 'Enable delete-branch-after-merge on all repos' (#21) from benvin/delete-branch-after-merge-all into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #21
2026-07-04 23:14:28 +10:00
benvin 6b26a75149 Merge branch 'main' into benvin/delete-branch-after-merge-all
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-07-04 23:12:34 +10:00
benvin da36708a15 Merge pull request 'Switch node-lookup repo to a main default branch' (#20) from benvin/node-lookup-main-branch into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #20
2026-07-04 23:07:27 +10:00
unkinben bbfe0edf2f Enable delete-branch-after-merge on all repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Merged PR branches should be cleaned up automatically everywhere, for a
consistent workflow across the estate.

- Flip default_delete_branch_after_merge from false to true on the 10 repos
  that had it disabled.
- Add default_delete_branch_after_merge: true to the 3 repos that were missing
  the field (terraform-git, terraform-provider-litellmvaultsecret,
  vault-plugin-secrets-litellm).
2026-07-04 22:52:02 +10:00
unkinben 844fff8db6 Switch node-lookup repo to a main default branch
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
node-lookup is being set up with build/test/pre-commit CI and a main-based
workflow, so its Gitea repo config needs to match.

- Change default_branch from master to main.
- Rename the branch protection rule to main and update the required status
  checks to the new pipeline names (build, test, pre-commit) instead of the
  old lint/unit-tests contexts.
2026-07-04 22:50:52 +10:00
benvin 7bf810210f Merge pull request 'Add bind-operator repository' (#19) from benvin/add-bind-operator-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #19
2026-07-03 15:24:22 +10:00
unkinben a4967d0bbf Add bind-operator repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Declares the bind-operator repo so Gitea provisions it for the new
Kubernetes operator that manages BIND9 DNS clusters.

- add config/git.unkin.net/unkin/repository/bind-operator.yaml with
  main as default branch, squash merge, delete-branch-after-merge, and
  branch protection requiring the pre-commit/test/build CI checks
2026-07-03 15:22:58 +10:00
benvin 773f734d8e Merge pull request 'Add vault-plugin-secrets-litellm and terraform-provider-litellm repos' (#18) from benvin/add-litellm-repos into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #18
2026-07-02 23:17:05 +10:00
unkinben 4495339979 Rename provider repo to terraform-provider-litellmvaultsecret
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Use a more specific name that reflects this is the Terraform provider for the
LiteLLM Vault/OpenBao secrets engine, not for LiteLLM itself.
2026-07-02 23:05:19 +10:00
benvin d59d1244f3 Merge pull request 'Add tomswall repository' (#17) from benvin/add-tomswall-repo into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #17
2026-07-02 23:02:06 +10:00
unkinben 043e73424c Add vault-plugin-secrets-litellm and terraform-provider-litellm repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Provision two new Gitea repos for the LiteLLM dynamic secrets work: the
Vault/OpenBao secrets-engine plugin and its companion Terraform provider.

- Add config/.../repository/vault-plugin-secrets-litellm.yaml
- Add config/.../repository/terraform-provider-litellm.yaml
- Default branch main, squash-only merging (allow_* flags, since the
  go-gitea/gitea provider has no default_merge_style), and branch protection
  on main requiring pre-commit/build/test checks with Owners approval
2026-07-02 22:57:34 +10:00
unkinben 5cfbf60f65 Add branch protection for tomswall main branch
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-06-29 23:23:45 +10:00
unkinben dfbb90a7dc Add tomswall repository definition
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
New Go project for an nftables firewall manager — spiritual successor
to shorewall using google/nftables for direct kernel interaction.
2026-06-28 23:42:34 +10:00
benvin d1d00e5c47 Merge pull request 'feat: add terraform-sonarr, terraform-radarr, terraform-prowlarr repos' (#16) from feat/add-media-terraform-repos into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #16
2026-06-28 22:00:53 +10:00
unkinben 93175707eb feat: add terraform-sonarr, terraform-radarr, terraform-prowlarr repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-06-28 21:58:59 +10:00
benvin a5d4b881a5 Merge pull request 'Add terraform-authentik repository' (#15) from benvin/add-terraform-authentik into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #15
2026-06-28 00:59:19 +10:00
unkinben a8d22b743a Add terraform-authentik repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Create Gitea repo for managing Authentik identity provider configuration via Terraform.
2026-06-28 00:57:07 +10:00
benvin eedb415419 Merge pull request 'feat: add age-api repo' (#14) from benvin/ageapi into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #14
2026-06-27 23:27:40 +10:00
unkinben 0a3700db7a feat: add age-api repo
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-06-27 23:18:24 +10:00
benvin 5a04fb4b22 Merge pull request 'feat: add required checks to terraform-provider-artifactapi' (#13) from benvin/build-check into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #13
2026-06-21 22:34:28 +10:00
unkinben f4b3f9cd08 feat: add required checks to terraform-provider-artifactapi
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
ensure the pre-commit, build and test ci tasks are performed in CI
2026-06-21 22:28:01 +10:00
benvin 1469866329 Merge pull request 'chore: change default branch to main' (#12) from benvin/default_main into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #12
2026-06-17 19:49:39 +10:00
unkinben b1684b7cf8 chore: change default branch to main
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
- update terraform-artifactapi default branch
2026-06-17 19:47:12 +10:00
unkinben 5cd6659f59 Merge pull request 'feat: add branch protection' (#11) from benvin/branch_protection into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #11
2026-06-13 14:50:43 +10:00
unkinben e000c1132f feat: add branch protection
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
- add branch protection rules for docker repos
2026-06-13 14:49:17 +10:00
benvin af26cee479 Merge pull request 'Remove woodpecker module and fix branch protection dependency' (#10) from benvin/remove-woodpecker-module into main
ci/woodpecker/push/apply Pipeline was successful
Reviewed-on: #10
2026-06-12 22:34:57 +10:00
unkinben 85583a02ad Remove woodpecker module and fix branch protection dependency
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
- Remove woodpecker_repository module and provider (repos managed outside TF)
- Add removed block with destroy=false to drop state without destroying
- Add module.team to branch_protection depends_on to prevent race condition
- Add lifecycle ignore_changes for team permission (provider bug: API returns
  "none" but rejects it on write)
2026-06-12 22:26:19 +10:00
benvin 3744ecd09f Merge pull request 'feat: return to make-apply' (#8) from benvin/always-apply into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #8
2026-06-12 22:01:25 +10:00
benvin 353d310bc8 Merge pull request 'feat: add terraform-artifactapi repository' (#9) from feat/add-terraform-artifactapi into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #9
2026-06-12 21:59:45 +10:00
unkinben 571a9b2149 feat: add terraform-artifactapi repository
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Create the Gitea repo with branch protection on master requiring
pre-commit and plan CI checks before merge.
2026-06-12 21:56:46 +10:00
unkinben dd31dc916c feat: return to make-apply
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
- always make-apply on merge to main
2026-06-12 01:10:19 +10:00
benvin 5afa850e45 Merge pull request 'Enable branch protection and Woodpecker for forgebot repos' (#7) from fix/forgebot-branch-protection into main
ci/woodpecker/push/apply Pipeline failed
Reviewed-on: #7
2026-06-12 00:47:15 +10:00
unkinben 236a94337a Enable branch protection and Woodpecker for forgebot repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
- Add forgebot team with unkinben and benvin members
- Enable branch protection on main for forgebot and forgebot-skills
- Team-based approval and merge whitelists
- Register both repos with Woodpecker CI
- CI status checks: pre-commit, test, build (forgebot); validate (skills)
2026-06-12 00:45:39 +10:00
benvin 6b14486e5e Merge pull request 'feat: import forgebot and container-agent repos' (#5) from feat/import-new-repos into main
ci/woodpecker/push/apply Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
Reviewed-on: #5
2026-06-12 00:35:31 +10:00
unkinben 99e2b124a6 feat: import forgebot and container-agent repos
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
2026-06-12 00:33:58 +10:00
unkinben bd60fb3669 Add forgebot and forgebot-skills repos with branch protection
- forgebot: branch protection on main with pre-commit, test, build CI checks
- forgebot-skills: branch protection on main with validate CI check
- Both repos enabled for Woodpecker CI
2026-06-12 00:32:57 +10:00
97 changed files with 1335 additions and 120 deletions
+3 -2
View File
@@ -7,9 +7,10 @@ steps:
image: git.unkin.net/unkin/almalinux9-opentofu:20260606
environment:
VAULT_AUTH_METHOD: kubernetes
VAULT_VERSION: "1.20.0"
commands:
- dnf install vault -y
- make apply-if-changes
- curl -fsSL -o /tmp/vault.zip "https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/hashicorp-releases/vault/$${VAULT_VERSION}/vault_$${VAULT_VERSION}_linux_amd64.zip" && python3 -m zipfile -e /tmp/vault.zip /tmp/ && install -m0755 /tmp/vault /usr/local/bin/vault && rm -f /tmp/vault.zip /tmp/vault /tmp/LICENSE.txt
- make apply
backend_options:
kubernetes:
serviceAccountName: terraform-git
+2 -1
View File
@@ -6,8 +6,9 @@ steps:
image: git.unkin.net/unkin/almalinux9-opentofu:20260606
environment:
VAULT_AUTH_METHOD: kubernetes
VAULT_VERSION: "1.20.0"
commands:
- dnf install vault -y
- curl -fsSL -o /tmp/vault.zip "https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/hashicorp-releases/vault/$${VAULT_VERSION}/vault_$${VAULT_VERSION}_linux_amd64.zip" && python3 -m zipfile -e /tmp/vault.zip /tmp/ && install -m0755 /tmp/vault /usr/local/bin/vault && rm -f /tmp/vault.zip /tmp/vault /tmp/LICENSE.txt
- make plan
backend_options:
kubernetes:
+8
View File
@@ -33,6 +33,14 @@ locals {
})
if length(regexall("/team/", file_path)) > 0
}
user = {
for file_path, content in local.all_configs :
"${split("/", file_path)[0]}/${trimsuffix(basename(file_path), ".yaml")}" => merge(content, {
username = trimsuffix(basename(file_path), ".yaml")
gitea_url = split("/", file_path)[0]
})
if length(regexall("/user/", file_path)) > 0
}
branch_protection = merge([
for file_path, content in local.all_configs : {
for idx, rule in try(content.branch_protection, []) :
@@ -0,0 +1,16 @@
description: "Simple API for showing a users age"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "Owners"
merge_whitelist_teams:
- "Owners"
@@ -1,4 +1,9 @@
description: "Sudaporn's Research Data visualisation, normalised "
private: false
default_branch: "master"
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "master"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -1,4 +1,9 @@
description: "Sudaporn's Research Data visualisation, normalised"
private: false
default_branch: "master"
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "master"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -4,10 +4,12 @@ default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/kubeconform"
- "ci/woodpecker/pr/vector-test"
approval_whitelist_users:
- "unkinben"
woodpecker: true
- "benvin"
@@ -5,11 +5,12 @@ default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "master"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_users:
- "unkinben"
woodpecker: true
- "benvin"
@@ -0,0 +1,9 @@
description: "Monorepo of small single-purpose CLI tools sharing a common library"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Kubernetes operator for managing BIND9 DNS clusters, zones, views, and TSIG keys"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,15 @@
description: "Builds AlmaLinux node rootfs tarballs for bootapi image-based provisioning; on v* tag publishes almalinux9-node-<ver>.tar.zst to the artifactapi rootfs-images repo."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/lint"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,15 @@
description: "Live kickstart/iPXE templates + distro catalog for bootapi. Pulled by bootapi via git-sync; CI validates templates render for every distro."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/validate"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,16 @@
description: "PXE/kickstart boot service replacing Cobbler. Renders kickstart + iPXE from NetBox data over HTTP. Go API."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,16 @@
description: "Kubernetes operator that provisions Ceph RGW (S3) buckets and access keys (RW/RO) from CRDs via the Ceph manager dashboard API"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_users:
- "benvin"
@@ -1,12 +1,11 @@
description: "Vault PKI certificate issuance and SSH host key signing tool for Puppet-managed infrastructure"
private: false
default_branch: "master"
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "master"
enable_push: false
merge_whitelist_users:
- "unkinben"
- "benvin"
approval_whitelist_users:
- "unkinben"
woodpecker: true
- "benvin"
@@ -0,0 +1,15 @@
description: "Base container image for forgebot agents"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "docker"
- "forgebot"
@@ -0,0 +1,15 @@
description: "Dev toolchain container for forgebot agents"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "docker"
- "forgebot"
@@ -0,0 +1,15 @@
description: "Infrastructure toolchain container for forgebot agents"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "docker"
- "forgebot"
@@ -1,3 +1,8 @@
description: "Docker image to be used in Kubernetes as a developers container"
private: false
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "RFC2136 dynamic-DNS updater daemon: watches a records file and network interfaces and pushes TSIG-signed updates to BIND, with a local status API for facter."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/pre-commit"
approval_whitelist_users:
- "benvin"
@@ -3,3 +3,8 @@ private: false
default_branch: "master"
default_delete_branch_after_merge: true
repo_template: true
branch_protection:
- rule_name: "master"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Postgres-backed External Node Classifier (ENC) for Puppet, replacing Cobbler. Go API + encapi-cli."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,16 @@
description: "Dependency-less Go CLI client for encapi, used as the Puppet exec External Node Classifier (ENC) on k8s compilers. Fetches the cobbler-wire ENC document and reshapes it for the puppet exec node_terminus."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/pre-commit"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,14 @@
description: "Skill definitions for forgebot agents"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/validate"
approval_whitelist_teams:
- "forgebot"
merge_whitelist_teams:
- "forgebot"
@@ -0,0 +1,16 @@
description: "K8s operator + API for AI agent dispatch from git forges"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "forgebot"
merge_whitelist_teams:
- "forgebot"
@@ -1,3 +1,8 @@
description: "A repository for building initrd.img in docker "
private: false
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,9 @@
description: "Source fork of ZoltyMat/jellyfin-ha carrying HA patches"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,14 @@
description: "Container build for the jellyfin-ha (HA transcoding) Jellyfin fork"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "docker"
@@ -0,0 +1,16 @@
description: "Kubernetes operator for managing Kea DHCP clusters, subnets, and PXE client classes"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Archives raw logs from NATS JetStream to S3 as zstd-compressed, GPG-encrypted, indexed objects; plus a CLI to search and retrieve them. Go service + CLI."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_users:
- "benvin"
@@ -1,15 +1,16 @@
description: "A CLI tool written in Go that queries the PuppetDB API to look up and filter node facts."
private: false
default_branch: "master"
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "master"
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/lint"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/unit-tests"
approval_whitelist_users:
- "unkinben"
woodpecker: true
- "benvin"
@@ -0,0 +1,17 @@
description: "Private fork of OpenBao adding per-namespace raft, cross-cluster performance replicas, virtual KV, and KV events"
private: true
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
# Whitelist-push: the owner can push main directly (needed for the initial
# push and the fork's maintenance workflow); everyone else must open a PR.
enable_push: true
push_whitelist_users:
- "unkinben"
# PRs to main must pass the fork build/vet pipeline before merge.
status_check_contexts:
- "ci/woodpecker/pr/build"
@@ -0,0 +1,21 @@
description: "Vault-backed drop-in replacement for pass (password-store); routes GPG crypto through vault-plugin-secrets-gpg"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Merging HTTP proxy over two PuppetDB backends, presenting a single merged PuppetDB v4 query surface during the VM to k8s Puppet migration. Deployed in-cluster via argocd-apps."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/pre-commit"
approval_whitelist_users:
- "benvin"
@@ -35,4 +35,3 @@ branch_protection:
- "ci/woodpecker/pr/yamllint"
approval_whitelist_teams:
- "puppet"
woodpecker: true
@@ -13,4 +13,3 @@ branch_protection:
approval_whitelist_teams:
- "puppet"
block_on_rejected_reviews: true
woodpecker: true
@@ -2,3 +2,8 @@ description: "A fastapi service to present puppet services via an api"
private: false
default_branch: "master"
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "master"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -1,4 +1,9 @@
description: "Package the internal ca-certificates"
private: false
default_branch: "master"
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "master"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -1,5 +1,5 @@
description: "Build rpms for jellyfin-web"
private: false
default_branch: "master"
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
archived: true
@@ -18,4 +18,3 @@ branch_protection:
approval_whitelist_teams:
- "rpmbuild"
block_on_rejected_reviews: true
woodpecker: true
@@ -1,3 +1,8 @@
description: "A stack of microservices that aim to offer a distributed streaming service."
private: false
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
enable_push: false
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "A Go daemon that watches Gitea repos and dispatches one-shot Claude Code sessions in Docker to work issues and review PRs."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/pre-commit"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,18 @@
description: "Terraform configuration for managing ArtifactAPI remote and virtual repositories"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
merge_whitelist_users:
- "benvin"
- "unkinben"
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,18 @@
description: "Terraform configuration for managing Authentik identity provider"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
merge_whitelist_users:
- "benvin"
- "unkinben"
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -1,14 +1,16 @@
description: "Manage Gitea resources, teams, repos, and Woodpecker CI via Terraform"
private: false
default_branch: "main"
woodpecker: true
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "unkinben"
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "YAML-driven Terraform for NetBox IPAM, networks, and devices + Kea DHCP"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -1,7 +1,7 @@
description: "Manage nomad with Terraform"
private: false
default_branch: "master"
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "master"
enable_push: false
@@ -1,9 +1,14 @@
description: "Terraform provider for managing ArtifactAPI"
private: false
default_delete_branch_after_merge: false
default_delete_branch_after_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
woodpecker: true
@@ -0,0 +1,16 @@
description: "Terraform provider for encapi: manage Puppet ENC roles, statuses, and node assignments."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,21 @@
description: "Terraform provider for the Vault/OpenBao Gitea token secrets engine (giteavaultsecret)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "Terraform provider for the Vault/OpenBao GPG/OpenPGP secrets engine (gpgvaultsecret) — manage backends and keys"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Terraform provider for the kea-operator KeaAPI: manage Kea DHCP subnets and PXE client classes."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,21 @@
description: "Terraform provider for the Vault/OpenBao LiteLLM dynamic secrets engine (litellmvaultsecret)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "Terraform provider for the Vault/OpenBao Rancher token secrets engine (ranchervaultsecret)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Terraform provider for tomswallapi: manage fleet-global firewall policy (zones, address groups, portgroups, rules, policies, fabrics) and per-device bindings."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,21 @@
description: "Terraform provider for the Vault/OpenBao NetBox token secrets engine (pairs with vault-plugin-secrets-netbox)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,18 @@
description: "Terraform configuration for managing Prowlarr indexer automation"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
merge_whitelist_users:
- "benvin"
- "unkinben"
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,18 @@
description: "Terraform configuration for managing Radarr movie automation"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
merge_whitelist_users:
- "benvin"
- "unkinben"
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,18 @@
description: "Terraform configuration for managing Rancher (auth, roles) via the rancher2 provider"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
merge_whitelist_users:
- "benvin"
- "unkinben"
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,18 @@
description: "Terraform configuration for managing Sonarr TV automation"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
enable_push: false
merge_whitelist_users:
- "benvin"
- "unkinben"
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
approval_whitelist_teams:
- "Owners"
@@ -13,7 +13,6 @@ branch_protection:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "unkinben"
- "benvin"
approval_whitelist_teams:
- "Owners"
woodpecker: true
@@ -0,0 +1,15 @@
description: "Single source of truth for encapi ENC data (statuses, roles, nodes), managed via Terraform/Terragrunt. Supersedes Cobbler node classification for Puppet."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/plan"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,10 @@
description: "Spiritual successor to shorewall — nftables firewall manager using google/nftables"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
@@ -0,0 +1,16 @@
description: "Fleet control plane for tomswall firewalls. Terraform-managed API that compiles fleet-wide zones, address groups, and firewall policy into per-device tomswall configs; agents pull and differentially apply."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/build"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao secrets engine issuing short-lived signed JWT app tokens (per-app roles, offline JWKS validation) for self-made services"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao secrets engine for BIND TSIG keys (static rotation + dynamic creds via bind-operator)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao secrets engine for Gitea: mints ephemeral, scoped per-user access tokens via the admin API, with seeded-admin basic-auth and root password rotation"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao secrets engine for GPG/OpenPGP keys (sign/verify/encrypt/decrypt, transit-style versioned keys, pass-compatible)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao dynamic secrets engine for LiteLLM virtual keys"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao secrets engine for NetBox API tokens (seeded admin + dynamic per-user tokens with expiry-aligned leases)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,21 @@
description: "HashiCorp Vault / OpenBao secrets engine for Rancher API tokens (seeded root rotation + dynamic scoped creds via tokens.ext.cattle.io)"
private: false
default_branch: "main"
default_delete_branch_after_merge: true
# Squash-only: the gitea provider has no "default merge style", so we restrict
# the allowed styles to squash to force it.
allow_merge_commits: false
allow_rebase: false
allow_rebase_explicit: false
allow_squash_merge: true
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/pre-commit"
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
approval_whitelist_teams:
- "Owners"
@@ -0,0 +1,16 @@
description: "Monorepo of Go CLI tools for managing Vault tokens across multiple vault instances: vctl (login/renew per-context tokens) and vctx (context-aware wrapper around the vault CLI)."
private: false
default_branch: "main"
default_delete_branch_after_merge: true
default_merge_style: "squash"
branch_protection:
- rule_name: "main"
merge_whitelist_teams:
- "Owners"
enable_push: false
status_check_contexts:
- "ci/woodpecker/pr/build"
- "ci/woodpecker/pr/test"
- "ci/woodpecker/pr/pre-commit"
approval_whitelist_users:
- "benvin"
@@ -0,0 +1,14 @@
# Grants the unkin-agent bot Write across every unkin repository so Ben's AI
# coding agents can push benvin/* branches and open pull requests. Write is the
# minimum Gitea permission that allows pushing branches + creating PRs.
#
# Merge stays reserved for Ben: branch protection on every default branch sets a
# merge whitelist of the Owners team only, so members of this team can push and
# open PRs but cannot merge or approve. Keep this team out of every merge and
# approval whitelist.
description: "AI coding agents -- push branches + open PRs, never merge"
permission: write
include_all_repositories: true
can_create_repos: false
members:
- unkin-agent
@@ -0,0 +1,13 @@
description: "forgebot maintainers"
permission: none
include_all_repositories: false
can_create_repos: false
repositories:
- forgebot
- forgebot-skills
- container-agent-base
- container-agent-dev
- container-agent-infra
members:
- unkinben
- benvin
@@ -0,0 +1,21 @@
# Purpose-built Gitea site-admin bot for the vault-plugin-secrets-gitea engine.
# The engine seeds itself from this account's credentials (Basic Auth) to mint
# and delete per-user tokens for any user. Its randomly generated password is
# written ONCE to Vault KV (vault_seed_path below) and never updated after; the
# Vault gitea engine reads that seed only when first creating gitea/config and
# then rotates it (rotate-root) so only Vault holds the live password.
#
# A local (not external-auth) account with 2FA disabled is required so the
# engine can change the password via the admin API during rotate-root.
email: gitea-vault-admin@unkin.net
full_name: "Gitea Vault Admin"
description: "site-admin bot; credentials seeded to Vault for vault-plugin-secrets-gitea"
# Site admin so the engine may mint/delete tokens for any user. No org/repo
# creation; profile visible only to signed-in users.
visibility: limited
admin: true
allow_create_organization: false
max_repo_creation: 0
# Seed this account's generated password to Vault KV (mount "kv") at this path,
# where the Vault gitea secrets engine reads it at creation time. Written once.
vault_seed_path: "service/vault/au/syd1/secret_backend/gitea/config"
@@ -0,0 +1,14 @@
# teabot "implementer" personality account.
# Used by the teabot daemon (unkin/teabot) to open issues/PRs as a distinct
# identity so its work is attributable. Auth is via an API token issued
# out-of-band (vault-plugin-secrets-gitea / static KV) -- no token or usable
# password lives in this repo's state beyond the generated placeholder.
email: teabot-implementer@unkin.net
full_name: "Teabot Implementer"
description: "teabot implementer bot -- automated agent (unkin/teabot)"
# Conservative bot posture: not a site admin, cannot create orgs or repos,
# profile visible only to signed-in users.
visibility: limited
admin: false
allow_create_organization: false
max_repo_creation: 0
@@ -0,0 +1,14 @@
# teabot "reviewer" personality account.
# Used by the teabot daemon (unkin/teabot) to review pull requests as a distinct
# identity so its reviews are attributable. Auth is via an API token issued
# out-of-band (vault-plugin-secrets-gitea / static KV) -- no token or usable
# password lives in this repo's state beyond the generated placeholder.
email: teabot-reviewer@unkin.net
full_name: "Teabot Reviewer"
description: "teabot reviewer bot -- automated agent (unkin/teabot)"
# Conservative bot posture: not a site admin, cannot create orgs or repos,
# profile visible only to signed-in users.
visibility: limited
admin: false
allow_create_organization: false
max_repo_creation: 0
@@ -0,0 +1,18 @@
# Shared identity used by Ben's AI coding agents to submit work (branches, pull
# requests, issues, comments) as a distinct, attributable, least-privilege
# account instead of Ben's own login. Auth is via ephemeral API tokens minted by
# the vault-plugin-secrets-gitea engine (gitea/creds/unkin-agent) -- no token or
# usable password lives in this repo's state beyond the generated placeholder.
#
# Write access comes from the "agents" team (team/agents.yaml); merge is blocked
# by branch protection (merge whitelist = Owners only), so the agent can open and
# comment on PRs/issues but never merge or approve.
email: unkin-agent@unkin.net
full_name: "Unkin Agent"
description: "shared identity for automated AI coding agents -- write, never merge"
# Conservative bot posture: not a site admin, cannot create orgs or repos,
# profile visible only to signed-in users.
visibility: limited
admin: false
allow_create_organization: false
max_repo_creation: 0
+1
View File
@@ -21,4 +21,5 @@ inputs = {
repository = local.config.repository
branch_protection = local.config.branch_protection
team = local.config.team
user = local.config.user
}
+9
View File
@@ -11,6 +11,15 @@ provider "woodpecker" {
server = "https://ci.k8s.syd1.au.unkin.net"
}
# Address + token come from VAULT_ADDR / VAULT_TOKEN in the environment (the
# Makefile authenticates via k8s auth before running terragrunt). Used to seed
# bot-account credentials into Vault KV (see modules/user vault_seed_path).
# skip_child_token: the CI token from the k8s auth role cannot create child
# tokens (apply fails with "failed to create limited child token").
provider "vault" {
skip_child_token = true
}
terraform {
backend "consul" {
address = "https://consul.service.consul"
+69 -47
View File
@@ -143,6 +143,31 @@ import {
id = "137"
}
import {
to = module.repository["git.unkin.net/unkin/forgebot"].gitea_repository.this
id = "139"
}
import {
to = module.repository["git.unkin.net/unkin/forgebot-skills"].gitea_repository.this
id = "140"
}
import {
to = module.repository["git.unkin.net/unkin/container-agent-base"].gitea_repository.this
id = "141"
}
import {
to = module.repository["git.unkin.net/unkin/container-agent-dev"].gitea_repository.this
id = "142"
}
import {
to = module.repository["git.unkin.net/unkin/container-agent-infra"].gitea_repository.this
id = "143"
}
import {
to = module.team["git.unkin.net/unkin/Owners"].gitea_team.this
id = "3"
@@ -173,58 +198,55 @@ import {
id = "12"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/puppet-prod"].woodpecker_repository.this
id = "unkin/puppet-prod"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/puppet-r10k"].woodpecker_repository.this
id = "unkin/puppet-r10k"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/terraform-vault"].woodpecker_repository.this
id = "unkin/terraform-vault"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/rpmbuilder"].woodpecker_repository.this
id = "unkin/rpmbuilder"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/artifactapi"].woodpecker_repository.this
id = "unkin/artifactapi"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/argocd-apps"].woodpecker_repository.this
id = "unkin/argocd-apps"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/certmanager"].woodpecker_repository.this
id = "unkin/certmanager"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/node-lookup"].woodpecker_repository.this
id = "unkin/node-lookup"
}
import {
to = module.woodpecker_repository["git.unkin.net/unkin/terraform-provider-artifactapi"].woodpecker_repository.this
id = "unkin/terraform-provider-artifactapi"
}
import {
to = module.repository["git.unkin.net/unkin/terraform-git"].gitea_repository.this
id = "144"
}
# Branch protections that already exist in Gitea but are not yet in state.
# Import id format is <organisation>/<repository>/<rule_name>.
import {
to = module.woodpecker_repository["git.unkin.net/unkin/terraform-git"].woodpecker_repository.this
id = "unkin/terraform-git"
to = module.branch_protection["git.unkin.net/unkin/app-sudaporn-research-individual/master"].gitea_repository_branch_protection.this
id = "unkin/app-sudaporn-research-individual/master"
}
import {
to = module.branch_protection["git.unkin.net/unkin/app-sudaporn-research-normalised/master"].gitea_repository_branch_protection.this
id = "unkin/app-sudaporn-research-normalised/master"
}
import {
to = module.branch_protection["git.unkin.net/unkin/benvin-utils/main"].gitea_repository_branch_protection.this
id = "unkin/benvin-utils/main"
}
import {
to = module.branch_protection["git.unkin.net/unkin/container-devcompute/main"].gitea_repository_branch_protection.this
id = "unkin/container-devcompute/main"
}
import {
to = module.branch_protection["git.unkin.net/unkin/docker-template/master"].gitea_repository_branch_protection.this
id = "unkin/docker-template/master"
}
import {
to = module.branch_protection["git.unkin.net/unkin/initbuilder/main"].gitea_repository_branch_protection.this
id = "unkin/initbuilder/main"
}
import {
to = module.branch_protection["git.unkin.net/unkin/puppetapi/master"].gitea_repository_branch_protection.this
id = "unkin/puppetapi/master"
}
import {
to = module.branch_protection["git.unkin.net/unkin/rpmbuild-internal-ca-certificates/master"].gitea_repository_branch_protection.this
id = "unkin/rpmbuild-internal-ca-certificates/master"
}
import {
to = module.branch_protection["git.unkin.net/unkin/streamstack/main"].gitea_repository_branch_protection.this
id = "unkin/streamstack/main"
}
+26 -11
View File
@@ -38,6 +38,27 @@ module "repository" {
depends_on = [module.organisation]
}
module "user" {
source = "./modules/user"
for_each = var.user
username = each.value.username
email = each.value.email
login_name = each.value.login_name
full_name = each.value.full_name
description = each.value.description
visibility = each.value.visibility
admin = each.value.admin
restricted = each.value.restricted
active = each.value.active
allow_create_organization = each.value.allow_create_organization
max_repo_creation = each.value.max_repo_creation
must_change_password = each.value.must_change_password
vault_seed_path = each.value.vault_seed_path
vault_seed_mount = each.value.vault_seed_mount
}
module "team" {
source = "./modules/team"
@@ -55,18 +76,12 @@ module "team" {
depends_on = [module.organisation, module.repository]
}
module "woodpecker_repository" {
source = "./modules/woodpecker_repository"
removed {
from = module.woodpecker_repository
for_each = {
for k, v in var.repository : k => v
if try(v.woodpecker, false)
lifecycle {
destroy = false
}
full_name = "${each.value.organisation}/${each.value.name}"
visibility = each.value.private ? "private" : "public"
depends_on = [module.repository]
}
module "branch_protection" {
@@ -95,7 +110,7 @@ module "branch_protection" {
protected_file_patterns = each.value.protected_file_patterns
unprotected_file_patterns = each.value.unprotected_file_patterns
depends_on = [module.repository]
depends_on = [module.repository, module.team]
}
# TODO: enable when deploy keys are needed
@@ -24,4 +24,16 @@ resource "gitea_repository_branch_protection" "this" {
require_signed_commits = var.require_signed_commits
protected_file_patterns = var.protected_file_patterns
unprotected_file_patterns = var.unprotected_file_patterns
lifecycle {
# Gitea resolves whitelist names to IDs and returns them ordered by repo-reader (user ID for users, name for teams), dropping any entity without repo access, so the read-back representation never matches the config and plans a spurious update every run.
ignore_changes = [
push_whitelist_users,
push_whitelist_teams,
merge_whitelist_users,
merge_whitelist_teams,
approval_whitelist_users,
approval_whitelist_teams,
]
}
}
@@ -3,7 +3,7 @@ terraform {
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.7.0"
version = "0.8.1"
}
}
}
@@ -3,7 +3,7 @@ terraform {
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.7.0"
version = "0.8.1"
}
}
}
@@ -3,7 +3,7 @@ terraform {
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.7.0"
version = "0.8.1"
}
}
}
@@ -3,7 +3,7 @@ terraform {
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.7.0"
version = "0.8.1"
}
}
}
@@ -6,6 +6,11 @@ resource "gitea_team" "this" {
include_all_repositories = var.include_all_repositories
can_create_repos = var.can_create_repos
repositories = var.repositories
lifecycle {
# Gitea's SDK rejects the stored permission=none on any EditTeam call; units/repositories only churn on provider representation (unordered units string, sorted/include-all repos), so ignore them to avoid spurious edits that would fail.
ignore_changes = [permission, units, repositories]
}
}
resource "gitea_team_members" "this" {
@@ -3,7 +3,7 @@ terraform {
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.7.0"
version = "0.8.1"
}
}
}
@@ -0,0 +1,58 @@
# The gitea_user resource requires a password argument. These accounts
# authenticate via API tokens (issued out-of-band by the
# vault-plugin-secrets-gitea engine, or a static KV entry initially), so the
# password is never used interactively. It is generated here so nothing
# sensitive is hardcoded, and kept only in state.
resource "random_password" "this" {
length = 32
special = true
override_special = "!@#%^&*()-_=+"
}
resource "gitea_user" "this" {
username = var.username
login_name = coalesce(var.login_name, var.username)
email = var.email
password = random_password.this.result
full_name = var.full_name
description = var.description
visibility = var.visibility
admin = var.admin
restricted = var.restricted
active = var.active
allow_create_organization = var.allow_create_organization
max_repo_creation = var.max_repo_creation
must_change_password = var.must_change_password
# Do not e-mail the (possibly unmonitored) bot address on creation.
send_notification = false
lifecycle {
# The provider cannot read the password back from the API; ignore it so the
# account never shows perpetual drift once created.
ignore_changes = [password]
}
}
# Optional one-time seed of the account's credentials to Vault KV, for the
# vault-plugin-secrets-gitea engine to consume when it first creates gitea/config.
# random_password never regenerates (no keepers), so the seed is stable; the
# ignore_changes below makes the write strictly create-only, so a later
# rotate-root on the Vault side (which diverges the live password from this seed)
# is never clobbered by a re-apply here.
resource "vault_kv_secret_v2" "seed" {
count = var.vault_seed_path != null ? 1 : 0
mount = var.vault_seed_mount
name = var.vault_seed_path
data_json = jsonencode({
admin_username = var.username
admin_password = random_password.this.result
})
lifecycle {
ignore_changes = [data_json]
}
}
@@ -0,0 +1,17 @@
terraform {
required_version = ">= 1.10"
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.8.1"
}
random = {
source = "hashicorp/random"
version = ">= 3.5"
}
vault = {
source = "hashicorp/vault"
version = ">= 4.3"
}
}
}
@@ -0,0 +1,87 @@
variable "username" {
description = "Username of the Gitea account (immutable; changing it recreates the user)"
type = string
}
variable "login_name" {
description = "Login name, may differ from username. Defaults to the username."
type = string
default = null
}
variable "email" {
description = "E-Mail address of the user"
type = string
}
variable "full_name" {
description = "Display / full name of the user"
type = string
default = ""
}
variable "description" {
description = "Profile description of the user"
type = string
default = ""
}
variable "visibility" {
description = "Profile visibility: public, limited or private"
type = string
default = "limited"
}
variable "admin" {
description = "Whether the user is a site administrator"
type = bool
default = false
}
variable "restricted" {
description = "Restricted users can only access repositories/orgs they are explicitly added to"
type = bool
default = false
}
variable "active" {
description = "Whether the account is active"
type = bool
default = true
}
variable "allow_create_organization" {
description = "Whether the user may create organisations"
type = bool
default = false
}
variable "max_repo_creation" {
description = "Maximum number of repositories the user may create (0 disallows creation)"
type = number
default = 0
}
variable "must_change_password" {
description = "Force a password change on first login"
type = bool
default = false
}
variable "vault_seed_path" {
description = <<-EOT
Optional. When set, the account's generated password is seeded ONCE to Vault
KV at this secret name (under vault_seed_mount) as admin_username +
admin_password, for the vault-plugin-secrets-gitea engine to consume at
creation time. The write is create-only; subsequent changes are ignored so
the seed never churns (and never overwrites a rotated password).
EOT
type = string
default = null
}
variable "vault_seed_mount" {
description = "KV v2 mount holding the seeded credential (used only when vault_seed_path is set)"
type = string
default = "kv"
}
@@ -1,4 +0,0 @@
resource "woodpecker_repository" "this" {
full_name = var.full_name
visibility = var.visibility
}
@@ -1,9 +0,0 @@
terraform {
required_version = ">= 1.10"
required_providers {
woodpecker = {
source = "Kichiyaki/woodpecker"
version = "0.5.0"
}
}
}
@@ -1,8 +0,0 @@
variable "full_name" {
type = string
}
variable "visibility" {
type = string
default = "internal"
}
+9 -1
View File
@@ -3,11 +3,19 @@ terraform {
required_providers {
gitea = {
source = "go-gitea/gitea"
version = "0.7.0"
version = "0.8.1"
}
woodpecker = {
source = "Kichiyaki/woodpecker"
version = "0.5.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.5"
}
vault = {
source = "hashicorp/vault"
version = ">= 4.3"
}
}
}
+21 -1
View File
@@ -32,7 +32,6 @@ variable "repository" {
repo_template = optional(bool)
website = optional(string)
autodetect_manual_merge = optional(bool)
woodpecker = optional(bool, false)
}))
default = {}
}
@@ -65,6 +64,27 @@ variable "branch_protection" {
}
variable "user" {
description = "Map of Gitea user accounts to create"
type = map(object({
username = string
email = string
login_name = optional(string)
full_name = optional(string, "")
description = optional(string, "")
visibility = optional(string, "limited")
admin = optional(bool, false)
restricted = optional(bool, false)
active = optional(bool, true)
allow_create_organization = optional(bool, false)
max_repo_creation = optional(number, 0)
must_change_password = optional(bool, false)
vault_seed_path = optional(string)
vault_seed_mount = optional(string, "kv")
}))
default = {}
}
variable "team" {
description = "Map of teams to create"
type = map(object({