This repository contains Kubernetes manifests for the HRMS (Human Resource Management System) platform, managed using GitOps principles with ArgoCD.
- Overview
- Repository Structure
- How It Works
- ArgoCD App-of-Apps Pattern
- Environment Management
- Key Components
- Deployment Workflow
- Getting Started
This repository implements a GitOps workflow where:
- Git is the single source of truth for Kubernetes manifests
- ArgoCD continuously monitors this repository and automatically syncs changes to the cluster
- All infrastructure and application deployments are declarative and version-controlled
- Changes are deployed by committing to this repository (no manual
kubectl apply)
gitops-manifests/
├── argo/ # ArgoCD Application definitions (App-of-Apps pattern)
│ ├── Chart.yaml # Helm chart metadata
│ ├── values.yaml # Default values for ArgoCD apps
│ └── templates/ # ArgoCD Application manifests
│ ├── hrms-root-app.yaml # Root application (deploys all other apps)
│ ├── hrms-project.yaml # ArgoCD project definition
│ ├── hrms-staging-project.yaml
│ ├── hrms-prod-project.yaml
│ ├── app-*.yaml # Individual application definitions
│ └── ...
│
├── base/ # Base Kubernetes manifests (DRY principle)
│ ├── namespace.yaml # Namespace definitions
│ ├── ingress.yaml # Base ingress configuration
│ ├── services/ # Microservices manifests
│ │ ├── attendance-service/
│ │ ├── audit-service/
│ │ ├── compliance-service/
│ │ ├── employee-service/
│ │ ├── leave-service/
│ │ ├── notification-service/
│ │ └── user-service/
│ ├── frontend/ # Frontend application
│ ├── mysql/ # MySQL database
│ ├── kafka/ # Kafka messaging
│ ├── redis/ # Redis cache
│ ├── istio/ # Istio service mesh
│ ├── external-secrets/ # External Secrets Operator
│ └── ...
│
├── overlays/ # Environment-specific customizations (Kustomize)
│ ├── staging/ # Staging environment overrides
│ │ ├── istio/
│ │ └── ...
│ ├── production/ # Production environment overrides
│ │ ├── istio/
│ │ └── ...
│ └── README.md
│
├── scripts/ # Utility scripts
└── .github/ # GitHub Actions workflows
└── workflows/
graph LR
A[Developer] -->|Git Push| B[GitHub Repository]
B -->|Monitors| C[ArgoCD]
C -->|Syncs| D[Kubernetes Cluster]
D -->|Status| C
C -->|Notifications| A
- Developers commit Kubernetes manifest changes to this repository
- ArgoCD detects changes automatically
- ArgoCD syncs the desired state to the Kubernetes cluster
- Applications are deployed/updated automatically
This repository uses the App-of-Apps pattern:
- Root App (
hrms-root-app.yaml) is deployed first - The root app points to the
argo/directory (Helm chart) - ArgoCD renders the Helm chart and creates all child applications
- Each child application manages a specific component (microservice, database, etc.)
The entry point is argo/templates/hrms-root-app.yaml:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: hrms
namespace: argocd
spec:
project: hrms
source:
repoURL: 'https://github.com/PookieLand/gitops-manifests.git'
targetRevision: main
path: argo # Points to the Helm chart
destination:
server: 'https://kubernetes.default.svc'
namespace: argocd
syncPolicy:
automated:
prune: true # Delete resources when removed from Git
selfHeal: true # Auto-sync when cluster state driftsThe argo/templates/ directory contains 51 ArgoCD Applications, each managing a specific component:
- Istio Service Mesh:
app-istio-base.yaml,app-istiod.yaml,app-istio-gateway.yaml - External Secrets:
app-external-secrets.yaml(manages secrets from AWS Secrets Manager) - Kafka:
app-strimzi-operator.yaml,app-kafka-*.yaml,app-kafka-topics-*.yaml - Databases:
app-mysql-*.yaml,app-redis-*.yaml - Monitoring:
app-fluentbit-*.yaml,app-metrics-server.yaml - Cert Manager:
app-certmanager.yaml
app-attendance-staging.yaml/app-attendance-production.yamlapp-audit-staging.yaml/app-audit-production.yamlapp-compliance-staging.yaml/app-compliance-production.yamlapp-employee-staging.yaml/app-employee-production.yamlapp-leave-staging.yaml/app-leave-production.yamlapp-notification-staging.yaml/app-notification-production.yamlapp-user-staging.yaml/app-user-production.yamlapp-frontend-staging.yaml/app-frontend-production.yaml
The repository supports two environments:
-
Staging: For testing and validation
- Namespace:
staging - Applications:
app-*-staging.yaml - Overlays:
overlays/staging/
- Namespace:
-
Production: For live workloads
- Namespace:
production - Applications:
app-*-production.yaml - Overlays:
overlays/production/
- Namespace:
Environment-specific customizations use Kustomize:
# Deploy staging Istio networking
kustomize build overlays/staging/istio/networking | kubectl apply -f -
# Deploy production Istio networking
kustomize build overlays/production/istio/networking | kubectl apply -f -The base/ directory contains DRY (Don't Repeat Yourself) manifests, and overlays/ apply environment-specific patches.
Three projects organize applications:
- hrms: Main project for staging applications
- hrms-staging: Staging-specific project
- hrms-prod: Production-specific project
Secrets are managed externally (AWS Secrets Manager) using the External Secrets Operator:
app-external-secrets.yaml: Deploys the operatorapp-external-secrets-resources.yaml: Defines SecretStores and ExternalSecrets
Istio provides:
- Traffic management
- Security (mTLS)
- Observability
- Gateway ingress
Strimzi Operator manages Kafka:
- Multiple Kafka clusters (staging/production)
- Topic management via Kubernetes CRDs
- Install ArgoCD on your Kubernetes cluster (via Terraform/Ansible)
- Deploy the root application:
kubectl apply -f argo/templates/hrms-root-app.yaml
- ArgoCD automatically creates all child applications from the
argo/Helm chart
- Edit manifests in this repository (e.g., update a deployment image)
- Commit and push to the
mainbranch - ArgoCD detects changes and syncs automatically (within 3 minutes)
- Verify deployment in ArgoCD UI or via CLI
Since Git is the source of truth:
- Revert the commit in Git
- Push the revert
- ArgoCD automatically rolls back the cluster state
- Kubernetes cluster (EKS, GKE, etc.)
- ArgoCD installed
- Access to this GitHub repository
# Apply the root application
kubectl apply -f argo/templates/hrms-root-app.yaml
# Watch ArgoCD sync all applications
kubectl get applications -n argocd -w# Port-forward to ArgoCD server
kubectl port-forward svc/argocd-server -n argocd 8080:443
# Open browser
open https://localhost:8080# Check all applications
kubectl get applications -n argocd
# Check staging microservices
kubectl get pods -n staging
# Check production microservices
kubectl get pods -n productionRepository: PookieLand/gitops-manifests
Maintained by: PookieLand Team