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