feat: Add deploy artifacts: Dockerfile, k8s manifests, CI build/push #9
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
brooktrails/directory-pacifier!9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/deploy-artifacts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Makes the project deployable to the c2-talos cluster.
Dockerfile is a two-stage build shared across both server binaries —
pass BINARY=controlloop or BINARY=rpcserver to pick which cmd/
directory to compile. Final stage is distroless/static:nonroot with
the statically-linked binary. Produces ~15-17MB images. The TUI
(cmd/dp) is intentionally not containerized; it runs on the operator
workstation.
.forgejo/workflows/build.yaml builds both images on every PR
(Dockerfile sanity) and pushes them on merges to main, tagged with
the short commit SHA only — every deploy pins a specific commit.
Push auth uses HARBOR_USERNAME / HARBOR_PASSWORD secrets (Harbor
robot account).
k8s/ manifests wire up the full production stack:
external-secret.yaml — ESO ExternalSecret that pulls the four role
passwords + API/WinRM creds from OpenBao and composes DATABASE_URL
strings via target.template.
migrate-job.yaml — one-shot Job that applies schema/001-003 on
first run (detected by presence of the universes table) and
(re-)runs ALTER ROLE ... WITH LOGIN PASSWORD every time, so the
same Job doubles as password rotation.
controlloop.yaml — Deployment + ClusterIP Service, non-root,
read-only rootfs, healthz probes.
rpcserver.yaml — Deployment only (no inbound surface), same
security posture.
README.md — first-time setup playbook plus rotation + TUI
port-forward recipe.
CLAUDE.md's Build Commands section is filled in with the real
workflows now that application code exists.
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com
Makes the project deployable to the c2-talos cluster. Dockerfile is a two-stage build shared across both server binaries — pass BINARY=controlloop or BINARY=rpcserver to pick which cmd/ directory to compile. Final stage is distroless/static:nonroot with the statically-linked binary. Produces ~15-17MB images. The TUI (cmd/dp) is intentionally not containerized; it runs on the operator workstation. .forgejo/workflows/build.yaml builds both images on every PR (Dockerfile sanity) and pushes them on merges to main, tagged with the short commit SHA only — every deploy pins a specific commit. Push auth uses HARBOR_USERNAME / HARBOR_PASSWORD secrets (Harbor robot account). k8s/ manifests wire up the full production stack: external-secret.yaml — ESO ExternalSecret that pulls the four role passwords + API/WinRM creds from OpenBao and composes DATABASE_URL strings via target.template. migrate-job.yaml — one-shot Job that applies schema/001-003 on first run (detected by presence of the universes table) and (re-)runs ALTER ROLE ... WITH LOGIN PASSWORD every time, so the same Job doubles as password rotation. controlloop.yaml — Deployment + ClusterIP Service, non-root, read-only rootfs, healthz probes. rpcserver.yaml — Deployment only (no inbound surface), same security posture. README.md — first-time setup playbook plus rotation + TUI port-forward recipe. CLAUDE.md's Build Commands section is filled in with the real workflows now that application code exists. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id
r-dca6df-93dd46This is an AI-genrated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — This is a comprehensive deployment setup with proper security practices and no obvious bugs or vulnerabilities.
Complexity: complex
Security Review
The automated flags around credentials are false positives - these are proper K8s secret references (
secretKeyRef) and documentation examples, not hardcoded credentials.Security posture looks good:
Container/deployment setup:
Potential considerations (not blocking):
WINRM_INSECURE=truefor development, which is documented as homelab-appropriateNo alarming security issues, logic errors, or deployment risks identified.
Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id
r-dca755-a96982This is an AI-generated review and may contain mistkaes.
Status: ✅ Completed
✅ Verdict: LGTM — Comprehensive deployment configuration with appropriate security practices and no obvious bugs detected.
Complexity: complex
Automated Safety Check
Reviewed deployment artifacts for the directory-pacifier project. This adds complete Kubernetes deployment configuration including CI/CD pipeline, multi-stage Docker builds, and security-conscious manifests.
Key observations:
Flagged items investigated:
No security vulnerabilities, logic errors, or accidentally committed sensitive data found.
Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id
r-dca7bb-32cbd4This is an AI-genrated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — This is a comprehensive deployment setup that appears well-structured with proper security practices, though image tags need to be updated before actual deployment.
Complexity: moderate
Automated Safety Check Review
This PR adds comprehensive deployment infrastructure for the directory-pacifier project, including Docker containerization, Kubernetes manifests, and CI/CD workflows.
Key observations:
✅ Security posture looks solid:
✅ CI/CD workflow is sensible:
✅ Kubernetes manifests follow best practices:
⚠️ Note for deployment: The image tags in
controlloop.yamlandrpcserver.yamlare placeholder values (registry.placeholder/...) that will need to be updated to actual Harbor registry URLs and commit SHAs before deployment.The "possible credential detected" warnings from automated scanning appear to be false positives - the files contain references to secret names and environment variables, but no actual credential values.
No obvious bugs, security vulnerabilities, or breaking changes identified.
Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id
r-dca855-afb5b8This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — No alarming security or correctness issues found in this deployment infrastructure addition.
Complexity: moderate
Security Review
The automated observations flagged potential credentials, but these are appropriate references to secrets management:
HARBOR_USERNAME/HARBOR_PASSWORDare properly referenced as GitHub secrets, not hardcodedsecretKeyRefpointing to ESO-managed secrets from OpenBaoKey Security Practices Observed
✅ Proper secrets management: Uses External Secrets Operator + OpenBao
✅ Container security: Distroless base images, non-root user (65532), read-only root filesystem
✅ Network isolation: RPC server has no inbound service, appropriate security contexts
✅ Least privilege: Database roles have minimal required permissions
Build & Deploy Logic
The version numbers (Go 1.26, Postgres 17, Docker 28) are all reasonable for modern deployments.
Automated review by pr-reviewer v0.15.0 | Safety Check | anthropic | tracking id
r-dca8ae-e1fe74This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: LGTM — This is a legitimate deployment setup with proper security practices and no obvious vulnerabilities.
Complexity: moderate
Safety Check Review
Summary
This PR adds comprehensive deployment infrastructure including Dockerfile, Kubernetes manifests, and CI/CD pipeline. All detected "secrets" are actually proper references to external secret management systems (OpenBao via ESO) rather than hardcoded credentials.
Key Observations
✅ Security posture is solid:
✅ Docker setup looks correct:
✅ CI/CD pipeline is sensible:
✅ K8s manifests follow best practices:
No Red Flags
{{ .password }}) and k8s secret referencesThe architecture and implementation appear sound for a directory management system deployment.
Automated review by pr-reviewer v0.15.0 | Full Review | anthropic | tracking id
r-dca9fc-ed5c58This is an AI-generated review and may contain mistakes.
Status: ✅ Completed
✅ Verdict: Approve — Well-designed deployment artifacts with strong security practices, proper documentation, and thoughtful CI/CD implementation.
Complexity: complex
Code Review: Deploy Artifacts
This PR adds comprehensive deployment infrastructure for the directory-pacifier project, including Docker containerization, Kubernetes manifests, and CI/CD pipelines. The implementation demonstrates strong security practices and thoughtful design.
✅ Strengths
Security Best Practices
Architecture & Design
BINARYarg for both server componentsCI/CD Implementation
Documentation
🔍 Technical Details
Database Configuration
sslmode=require)Container Security
Excellent security posture throughout.
Migration Strategy
The universes table detection for schema idempotency is pragmatic for the current scale. The TODO about proper migration tracking is noted and appropriate.
🚫 No Issues Found
📋 Minor Observations
golang:1.26-bookworm- This Go version is valid (released recently)registry.placeholder/...tags are intentionally temporary per the workflow designPGDATABASE=appbut connection strings use/dp- appears to be an intentional difference for the database vs schema namesThe automated credential detection warnings are expected given the nature of deployment manifests and don't represent actual embedded secrets.
This is a well-crafted, production-ready deployment setup that follows Kubernetes and security best practices while maintaining operational simplicity.