Manage FluxCD-based Zuul CI deployments on Talos Kubernetes with SOPS encryption, GitOps workflows, and TLS configuration
Manage a GitOps-based Zuul CI homelab deployment on Talos Kubernetes using FluxCD, with SOPS secret encryption, TLS certificates, and single-node architecture.
This skill helps you manage a lightweight Zuul CI deployment for personal homelab use. It handles FluxCD deployment layers, SOPS-encrypted secrets, TLS certificate management, debugging workflows, and GitOps operations for a single-node Zuul setup with ZooKeeper and PostgreSQL dependencies.
The repository follows a layered FluxCD architecture:
**FluxCD Deployment Layers:**
1. Layer 1: Namespaces (foundation)
2. Layer 2: ingress-nginx, cert-manager, reflector (core services)
3. Layer 3: cert-manager-config, certificates, zookeeper, database (dependencies)
4. Layer 4: Zuul application (depends on all above)
Each layer must be healthy before the next deploys.
**Single-Node Architecture:**
When checking deployment health or troubleshooting:
```bash
flux get kustomizations --watch
flux get kustomization namespaces
flux get kustomization cert-manager
flux get kustomization zookeeper
flux get kustomization database
flux get kustomization zuul
flux get all
kubectl get helmrelease -A -o wide
kubectl get pods -A | grep -E 'zuul|postgres|zookeeper|cert-manager|ingress'
```
**Encryption Rules** (defined in `.sops.yaml`):
**Commands:**
```bash
sops -e -i apps/zuul/secrets/github-connection.yaml
sops apps/zuul/secrets/github-connection.enc.yaml
sops -d apps/zuul/secrets/db-uri-secret.enc.yaml
kubectl get secret -n flux-system sops-age
```
**CRITICAL**: All secrets must be SOPS-encrypted before committing. Always check `git diff` before pushing.
```bash
sops -e -i path/to/secret.yaml
git add . && git commit -m "Update configuration" && git push
flux get kustomizations --watch
kubectl get pods -n zuul-system -w
```
When changes don't auto-deploy or you need immediate reconciliation:
```bash
flux reconcile kustomization infrastructure --with-source
flux reconcile kustomization zuul --with-source
flux reconcile kustomization cert-manager
flux reconcile kustomization database
```
```bash
kubectl logs -n zuul-system deployment/zuul-scheduler -f
kubectl logs -n zuul-system deployment/zuul-web -f
kubectl logs -n zuul-system deployment/zuul-executor -f
kubectl logs -n zuul-system deployment/zuul-operator -f
kubectl port-forward -n zuul-system svc/zuul-web 9000:9000
kubectl exec -it -n postgres-system statefulset/postgres -- \
psql -U zuul -d zuul
kubectl exec -it -n zuul-system deployment/zuul-scheduler -- \
nc -zv zookeeper.zookeeper-system.svc.cluster.local 2281
```
```bash
flux logs --level=error
kubectl logs -n flux-system deployment/kustomize-controller -f
kubectl logs -n flux-system deployment/helm-controller -f
kubectl describe kustomization -n flux-system zuul
kubectl describe kustomization -n flux-system database
kubectl get certificate -A
kubectl describe certificate -n cert-manager teim-app-wildcard
kubectl logs -n cert-manager deployment/cert-manager-cert-manager --tail=50
kubectl get secret -n zuul-system zookeeper-client-tls
kubectl describe certificate -n zookeeper-system zookeeper-client-cert
kubectl logs -n cert-manager deployment/reflector --tail=20
```
```bash
kubectl exec -n postgres-system statefulset/postgres -- \
pg_dump -U zuul zuul > zuul-backup-$(date +%Y%m%d).sql
cat backup.sql | kubectl exec -i -n postgres-system \
statefulset/postgres -- psql -U zuul zuul
```
**Zuul Application:**
**Secrets (SOPS encrypted):**
**Infrastructure:**
**ZooKeeper (Self-Signed CA):**
1. `zookeeper-ca-issuer` - Self-signed CA issuer
2. `zookeeper-ca-certificate` - Root CA (10-year validity)
3. `zookeeper-server-cert` - Server certificate
4. `zookeeper-client-cert` - Client certificate for Zuul
5. Reflector replicates `zookeeper-client-tls` secret to zuul-system namespace
ZooKeeper listens on port 2281 (TLS) instead of 2181 (plaintext).
**Wildcard Certificate:**
**Scenario 1: Update GitHub connection credentials**
```bash
sops apps/zuul/secrets/github-connection.enc.yaml
git add apps/zuul/secrets/github-connection.enc.yaml
git commit -m "Update GitHub connection credentials"
git push
flux get kustomization zuul --watch
kubectl rollout status -n zuul-system deployment/zuul-scheduler
```
**Scenario 2: Debug executor startup issues**
```bash
kubectl logs -n zuul-system deployment/zuul-executor -f
kubectl exec -it -n zuul-system deployment/zuul-executor -- \
nc -zv zookeeper.zookeeper-system.svc.cluster.local 2281
kubectl get secret -n zuul-system zookeeper-client-tls
kubectl describe secret -n zuul-system zookeeper-client-tls
```
**Scenario 3: Force re-deploy after layer failure**
```bash
flux get kustomizations
flux reconcile kustomization cert-manager --with-source
flux reconcile kustomization database --with-source
flux reconcile kustomization zuul --with-source
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/zuul-ci-homelab-management/raw