This repository serves as a template for customers to deploy and manage their self-hosted Hyperspace application using ArgoCD.
It works in conjunction with the Hyperspace Terraform module to provision the necessary infrastructure.
.
├── root-application.yaml # Root ArgoCD application
├── argocd/ # ArgoCD configuration
│ └── envs/ # Environment-specific configurations
│ └── env-1/ # Environment template
│ ├── Chart.yaml # Environment Helm chart
│ ├── values.yaml # Default values
│ └── templates/ # ApplicationSet templates
└── values/ # Environment values
└── example-env/ # Example environment values
└── env-1.yaml # Environment-specific values
- Hyperspace Terraform module Deployed
- Access to your Kubernetes cluster
- ArgoCD installed in your cluster (Handled By Hyperspace Terraform module)
kubectl
CLI configured to access your cluster- Hyperspace account ID (contact Hyperspace support to obtain this)
- Access to ArgoCD UI
git clone https://github.com/hyper-space-io/Hyperspace-Deployment.git
cd Hyperspace-Deployment
-
Configure Root Application
Edit
root-application.yaml
:metadata: name: your-environment # Change this to your environment name namespace: argocd spec: project: default source: repoURL: https://github.com/your-org/Hyperspace-Deployment.git # Update with your forked repository URL targetRevision: master path: argocd/envs/your-environment # Update with your environment path
-
Configure Environment Values
Edit
argocd/envs/your-environment/values.yaml
:# Environment Configuration hyperspace_account_id: "HYPERSPACE_ACCOUNT_ID" # Required: Hyperspace account ID # Repository Configuration vcsRepository: "https://github.com/your-org/your-values-repo.git" # Your values repository # Sync Policy Configuration syncPolicy: automated: prune: true selfHeal: true syncOptions: - RespectIgnoreDifferences=true - CreateNamespace=true
Required changes:
- Set your Hyperspace account ID
- (Optional) Disable automated sync by removing the
automated
section if you don't want automatic synchronization
-
Create Environment Values
Create a new file in
values/example-env/your-environment.yaml
:global: environment: your-environment ecr_repository: HYPERSPACE_ACCOUNT_ID data-node: replicaCount: 1 # ... other configurations ... search-master: ingress: hosts: - host: your-environment.your-domain.com
-
Apply Root Application
kubectl apply -f root-application.yaml
-
Access ArgoCD UI
- Login with your Github Account
- Navigate to your environment's root application
- Click "Sync" to deploy your applications
-
Root Application
- Bootstraps the environment by installing the environment Helm chart
- Points to your environment configuration in
argocd/envs/your-environment/
-
Environment Helm Chart
- Contains the ApplicationSet template
- Uses default values from
values.yaml
- References your company's ECR for the application chart
- References your values repository for environment-specific configurations
-
ApplicationSet
- Generates applications for each environment
- Uses values from your values repository
- Deploys the application from your company's ECR
-
Create Environment Directory
cp -r argocd/envs/env-1 argocd/envs/your-new-environment
-
Update Environment Values
- Edit
argocd/envs/your-new-environment/values.yaml
- Create new values file in
values/example-env/your-new-environment.yaml
- Edit
-
Create Root Application
cp root-application.yaml root-application-new-env.yaml # Edit the new file with your environment details
-
Apply and Sync
kubectl apply -f root-application-new-env.yaml
If you encounter issues with your deployments:
- Check the ArgoCD UI for error messages
- Verify your configuration files are valid YAML
- Ensure the target Kubernetes namespace exists
- Check application logs in ArgoCD UI
- Verify ECR access and credentials
- Check if the root application is healthy in ArgoCD UI
For additional support:
- Contact Hyperspace support team
- Check the Terraform module documentation