This is a quick reference for common tasks. See README.md for full documentation.
CRITICAL: Read this before deploying TRIGRA
⚠️ Automatic Deployment: TRIGRA automatically applies ALL changes from Git. A bad manifest can delete resources or cause outages.- 🔐 Broad Permissions: TRIGRA needs extensive RBAC permissions. Review
rbac.yamland limit to your needs. - 🚨 No Auto-Rollback: Failed deployments won't rollback automatically. You must manually fix or revert.
- 🔒 Secret Safety: NEVER commit
.envorsecret.yamlfiles. Add to.gitignoreimmediately. - 🧪 Test First: Always validate manifests locally before pushing:
kubectl apply --dry-run=client -f your-manifest.yaml
- Start in a test namespace with non-critical workloads
- Use Git branches to test changes before merging to main
- Monitor logs regularly:
kubectl logs -f deployment/trigra - Have a rollback plan ready before deploying changes
✅ Homelabs, dev clusters, learning environments
❌ Production without extensive testing and safeguards
For detailed security considerations, see README.md
# 1. Setup
make dev-setup
# Edit .env with your values
# 2. Run locally
make run# 1. Build image
make docker-build
# 2. Create secret
cp deployments/kubernetes/secret.yaml.example deployments/kubernetes/secret.yaml
# Edit with your GitHub token and webhook secret
# 3. Deploy
kubectl apply -f deployments/kubernetes/secret.yaml
make deploy
# 4. Get webhook URL
kubectl get svc trigra- Go to your repo → Settings → Webhooks → Add webhook
- Payload URL:
http://<EXTERNAL-IP>/webhook - Content type:
application/json - Secret: Your
WEBHOOK_SECRETvalue - Events: Just the push event
# Create a deployment
cat > nginx.yaml <<EOF
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-nginx
spec:
replicas: 2
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:alpine
EOF
# Push to Git
git add nginx.yaml
git commit -m "Deploy nginx"
git push
# Watch it deploy!
kubectl get deployments -wmake help # Show all commands
make logs # View controller logs
make status # Check deployment status
make example-deploy # Deploy example resourcesWebhook not working?
- Check GitHub webhook deliveries
- View logs:
make logs - Verify secret matches
Resources not applying?
- Check RBAC permissions
- Validate YAML:
kubectl apply --dry-run=client -f file.yaml - Check controller logs
For more help, see README.md