GitOps on OpenShift with ArgoCD
Implement GitOps workflows on OpenShift using ArgoCD for declarative and automated deployments.
Jean Paul López
· 2 min read
GitOps is a modern approach to continuous delivery that uses Git as the single source of truth for declarative infrastructure and applications.
What is GitOps?
GitOps principles:
- Declarative: Everything is described in Git
- Versioned: Full history of changes
- Automated: Changes applied automatically
- Auditable: Who changed what and when
Installing ArgoCD on OpenShift
# Create namespace
oc new-project argocd
# Install ArgoCD operator from OperatorHub
oc apply -f - <<EOF
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
name: argocd
namespace: argocd
spec:
server:
route:
enabled: true
EOF
Creating an Application
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/org/my-app.git
targetRevision: main
path: k8s/overlays/production
destination:
server: https://kubernetes.default.svc
namespace: production
syncPolicy:
automated:
prune: true
selfHeal: true
Directory Structure
my-app/
├── base/
│ ├── deployment.yaml
│ ├── service.yaml
│ └── kustomization.yaml
└── overlays/
├── development/
│ └── kustomization.yaml
└── production/
└── kustomization.yaml
Benefits
- Consistency: Same deployment process everywhere
- Recovery: Easy rollback via Git revert
- Security: No direct cluster access needed
- Compliance: Full audit trail
Conclusion
GitOps with ArgoCD on OpenShift provides a robust, auditable, and automated deployment pipeline. Embrace the GitOps model to improve your delivery velocity and reliability.

Comments (0)