This is a template GitOps repository structure for managing ROSA HCP cluster configurations using ArgoCD and the App-of-Apps pattern.
cluster-config/
├── README.md # This file
├── .gitignore # Git ignore rules
├── {environment}/ # Environment directory (e.g., dev, staging, prod, nonprod)
│ └── {cluster-name}/ # Cluster-specific directory
│ ├── infrastructure.yaml # Infrastructure components configuration
│ ├── applications-ns.yaml # Application namespace configuration
│ └── namespaces/ # Optional: Team/application namespace configs
│ └── {team}-{apmnum}.yaml
└── templates/ # Optional: Template files for new clusters
├── infrastructure.yaml.template
└── applications-ns.yaml.template
cd reference/cluster-config
git init
git add .
git commit -m "Initial commit: Cluster config template"
git remote add origin https://github.com/your-org/cluster-config.git
git push -u origin mainFor each cluster, create a directory structure:
mkdir -p {environment}/{cluster-name}
cp templates/infrastructure.yaml.template {environment}/{cluster-name}/infrastructure.yaml
cp templates/applications-ns.yaml.template {environment}/{cluster-name}/applications-ns.yamlEdit the YAML files with cluster-specific values:
- Update
AWS_REGIONininfrastructure.yaml - Update
clusterNamein both files - Add infrastructure components as needed
- Add application teams as needed
The gitPath used in Terraform/bootstrap script should match the directory structure:
- Directory:
nonprod/np-hub/ - gitPath:
nonprod/np-hub
Defines infrastructure components deployed via GitOps:
- Storage (EFS, EBS)
- Logging (CloudWatch)
- Compliance operators
- Security operators
- Platform tools
Defines application teams and their namespaces:
- Team configurations
- ArgoCD project setup
- Namespace definitions
Team-specific namespace configurations:
- Namespace definitions
- Resource quotas
- RBAC configurations
- Service accounts
This repository is referenced by the Terraform bootstrap script via the GIT_PATH environment variable:
export GIT_PATH="nonprod/np-hub"The bootstrap script will:
- Install the
cluster-bootstrapHelm chart - Create ArgoCD ApplicationSets that reference this repository
- ArgoCD will sync applications based on the YAML files in this repo
- Version Control: Keep all cluster configurations in Git
- Environment Separation: Use separate directories for different environments
- Cluster Isolation: Each cluster has its own directory
- Incremental Updates: Start with empty infrastructure/applications lists and add components gradually
- Documentation: Document any custom configurations or decisions