Thank you for your interest in contributing to this GitOps repository!
This repository uses GitOps practices to manage Kubernetes deployments via ArgoCD. All changes to the cluster are made by updating this repository.
├── .github/workflows/ # GitHub Actions CI/CD pipelines
├── applicationset/ # Application configurations
│ ├── base/ # Base Kustomize templates
│ └── <app>/ # Individual application configs
├── k8s-templates/ # Reusable Kubernetes resource templates
├── cluster-bootstrap/ # Cluster infrastructure components
└── changedetection/ # Standalone application
-
Choose a template approach:
- Copy an existing similar application from
applicationset/ - Or start from scratch using templates in
k8s-templates/
- Copy an existing similar application from
-
Create your application directory:
mkdir -p applicationset/myapp
-
Create required files:
kustomization.yaml- Kustomize configurationvs.yaml- VirtualService for Istio routing- Optional:
volume.yaml- Persistent storage - Optional:
patches/- Customizations to base resources
-
Reference the base template:
# applicationset/myapp/kustomization.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - ../base - vs.yaml namePrefix: myapp- images: - name: ghcr.io/guyzsarun-lab/base newName: ghcr.io/guyzsarun-lab/myapp newTag: v1.0.0 commonLabels: app: myapp
-
Test locally:
kubectl kustomize applicationset/myapp
-
Create a GitHub workflow (if building custom images):
cp .github/workflows/cyberchef.yaml .github/workflows/myapp.yaml # Edit the file to update name and paths -
Commit and push:
git add applicationset/myapp git commit -m "Add myapp application" git push
- Kubernetes Templates Guide - Common patterns and templates
- Workflow Guide - CI/CD pipeline patterns
For applications with:
- Single container
- Exposed via Istio VirtualService
- No persistent storage
Example: cyberchef, toolchain
For applications with:
- ConfigMaps for configuration files
- Volume mounts for config
- Patches to inject config
Example: dashy, glance
For applications with:
- NFS-backed PersistentVolume
- Volume mounts in deployment
- Data persistence requirements
Example: linkwarden, paperless, calibre
For applications with:
- Sidecar containers
- Multiple services
- Complex networking
Example: linkwarden (with meilisearch sidecar)
For modifying specific fields:
# patches/service.yaml
apiVersion: v1
kind: Service
metadata:
name: application
spec:
ports:
- $patch: replace
- port: 3000
targetPort: 8080Instead of hardcoding names, use namePrefix:
namePrefix: myapp-
# Results in: myapp-application, myapp-vs, etc.commonLabels:
app: myappBefore committing, always validate:
# Validate Kustomize output
kubectl kustomize applicationset/myapp
# Dry-run to catch issues
kubectl kustomize applicationset/myapp | kubectl apply --dry-run=client -f -
# Check YAML syntax
kubectl kustomize applicationset/myapp | kubectl apply --dry-run=server -f -- Make changes to application configuration
- Commit and push to
mainbranch - ArgoCD automatically syncs changes to the cluster
- Build and test your application
- Create a Git tag:
git tag myapp-v1.0.0 - Push tag:
git push --tags - GitHub Actions builds and pushes Docker image
- Workflow updates
kustomization.yamlwith new version - ArgoCD syncs the new version
# View detailed error output
kubectl kustomize applicationset/myapp
# Check for YAML syntax errors
yamllint applicationset/myapp/*.yaml- Check ArgoCD UI for sync status
- Review ArgoCD application logs
- Verify Git repository is accessible
- Check resource quotas and RBAC permissions
- Review GitHub Actions workflow logs
- Verify Dockerfile syntax
- Check base image availability
- Ensure required build arguments are provided
When reviewing PRs:
- Kustomize configuration is valid
- Resources follow naming conventions
- Labels are consistent
- VirtualService routes are correct
- Resource limits are appropriate
- Secrets are not committed to Git
- Documentation is updated if needed
- Review existing applications for examples
- Check k8s-templates/README.md for common patterns
- Open an issue for questions or problems
- Consult the team before making infrastructure changes
This project follows the same license as specified in LICENSE.