|
| 1 | +# argocd-understack |
| 2 | + |
| 3 | +A Helm chart that generates ArgoCD Applications for deploying UnderStack components. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +This chart creates ArgoCD Application resources that deploy and manage all |
| 8 | +UnderStack components. Instead of using ApplicationSets, this chart provides: |
| 9 | + |
| 10 | +- **Per-cluster version pinning** via `understack_ref` |
| 11 | +- **Explicit component enablement** via values.yaml |
| 12 | +- **Easy debugging** with `helm template` |
| 13 | +- **Standard Helm workflow** for configuration management |
| 14 | + |
| 15 | +## Prerequisites |
| 16 | + |
| 17 | +- Kubernetes cluster with ArgoCD installed |
| 18 | +- ArgoCD projects configured: `understack`, `understack-infra`, `understack-operators` |
| 19 | +- Access to UnderStack and deployment repositories |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +### Using ArgoCD (Recommended) |
| 24 | + |
| 25 | +Create an ArgoCD Application that deploys this chart from the OCI registry: |
| 26 | + |
| 27 | +```yaml |
| 28 | +apiVersion: argoproj.io/v1alpha1 |
| 29 | +kind: Application |
| 30 | +metadata: |
| 31 | + name: argocd-understack |
| 32 | + namespace: argocd |
| 33 | +spec: |
| 34 | + project: understack |
| 35 | + sources: |
| 36 | + - repoURL: ghcr.io/rackerlabs/understack |
| 37 | + chart: argocd-understack |
| 38 | + targetRevision: 0.1.0 # Chart version |
| 39 | + helm: |
| 40 | + releaseName: my-cluster-name |
| 41 | + valueFiles: |
| 42 | + - $deploy/my-cluster-name/argocd-understack-values.yaml |
| 43 | + - repoURL: https://github.com/your-org/deploy.git |
| 44 | + targetRevision: HEAD |
| 45 | + ref: deploy |
| 46 | + destination: |
| 47 | + server: https://kubernetes.default.svc |
| 48 | + namespace: argocd |
| 49 | + syncPolicy: |
| 50 | + automated: |
| 51 | + prune: true |
| 52 | + selfHeal: true |
| 53 | +``` |
| 54 | +
|
| 55 | +### Using Git Repository (for development) |
| 56 | +
|
| 57 | +For testing unreleased changes, reference the chart directly from git: |
| 58 | +
|
| 59 | +```yaml |
| 60 | +apiVersion: argoproj.io/v1alpha1 |
| 61 | +kind: Application |
| 62 | +metadata: |
| 63 | + name: argocd-understack |
| 64 | + namespace: argocd |
| 65 | +spec: |
| 66 | + project: understack |
| 67 | + sources: |
| 68 | + - repoURL: https://github.com/rackerlabs/understack.git |
| 69 | + targetRevision: feature-branch |
| 70 | + path: charts/argocd-understack |
| 71 | + helm: |
| 72 | + releaseName: my-cluster-name |
| 73 | + valueFiles: |
| 74 | + - $deploy/my-cluster-name/argocd-understack-values.yaml |
| 75 | + - repoURL: https://github.com/your-org/deploy.git |
| 76 | + targetRevision: HEAD |
| 77 | + ref: deploy |
| 78 | + destination: |
| 79 | + server: https://kubernetes.default.svc |
| 80 | + namespace: argocd |
| 81 | + syncPolicy: |
| 82 | + automated: |
| 83 | + prune: true |
| 84 | + selfHeal: true |
| 85 | +``` |
| 86 | +
|
| 87 | +### Using Helm CLI |
| 88 | +
|
| 89 | +```bash |
| 90 | +helm install argocd-understack oci://ghcr.io/rackerlabs/understack/argocd-understack \ |
| 91 | + --version 0.1.0 \ |
| 92 | + -n argocd \ |
| 93 | + -f cluster-values.yaml |
| 94 | +``` |
| 95 | + |
| 96 | +## Configuration |
| 97 | + |
| 98 | +### Required Values |
| 99 | + |
| 100 | +| Parameter | Description | |
| 101 | +|-----------|-------------| |
| 102 | +| `deploy_url` | URL to your deployment repository | |
| 103 | + |
| 104 | +### Common Values |
| 105 | + |
| 106 | +| Parameter | Description | Default | |
| 107 | +|-----------|-------------|---------| |
| 108 | +| `cluster_server` | Target Kubernetes API server | `https://kubernetes.default.svc` | |
| 109 | +| `understack_url` | UnderStack repository URL | `https://github.com/rackerlabs/understack.git` | |
| 110 | +| `understack_ref` | UnderStack git reference | `HEAD` | |
| 111 | +| `deploy_ref` | Deployment repo git reference | `HEAD` | |
| 112 | +| `global.enabled` | Enable global cluster components | `true` | |
| 113 | +| `site.enabled` | Enable site cluster components | `true` | |
| 114 | + |
| 115 | +### Example Values Files |
| 116 | + |
| 117 | +**Site Cluster:** |
| 118 | +```yaml |
| 119 | +cluster_server: https://kubernetes.default.svc |
| 120 | +understack_ref: v1.0.0 |
| 121 | +deploy_url: https://github.com/your-org/deploy.git |
| 122 | + |
| 123 | +global: |
| 124 | + enabled: false |
| 125 | + |
| 126 | +site: |
| 127 | + enabled: true |
| 128 | + octavia: |
| 129 | + enabled: false # Disable specific component |
| 130 | +``` |
| 131 | +
|
| 132 | +**Global Cluster:** |
| 133 | +```yaml |
| 134 | +cluster_server: https://kubernetes.default.svc |
| 135 | +understack_ref: v1.0.0 |
| 136 | +deploy_url: https://github.com/your-org/deploy.git |
| 137 | + |
| 138 | +global: |
| 139 | + enabled: true |
| 140 | + |
| 141 | +site: |
| 142 | + enabled: false |
| 143 | +``` |
| 144 | +
|
| 145 | +## Components |
| 146 | +
|
| 147 | +### Global Components |
| 148 | +
|
| 149 | +Components deployed on global clusters: |
| 150 | +
|
| 151 | +| Component | Values Key | Description | |
| 152 | +|-----------|-----------|-------------| |
| 153 | +| cert-manager | `global.cert_manager` | Certificate management | |
| 154 | +| cilium | `global.cilium` | CNI networking | |
| 155 | +| cnpg-system | `global.cnpg_system` | PostgreSQL operator | |
| 156 | +| dex | `global.dex` | OIDC provider | |
| 157 | +| envoy-gateway | `global.envoy_gateway` | API gateway | |
| 158 | +| external-dns | `global.external_dns` | DNS management | |
| 159 | +| external-secrets | `global.external_secrets` | Secret management | |
| 160 | +| ingress-nginx | `global.ingress_nginx` | Ingress controller | |
| 161 | +| monitoring | `global.monitoring` | Prometheus stack | |
| 162 | +| nautobot | `global.nautobot` | Network source of truth | |
| 163 | +| nautobotop | `global.nautobotop` | Nautobot operator | |
| 164 | +| openstack-resource-controller | `global.openstack_resource_controller` | ORC operator | |
| 165 | +| opentelemetry-operator | `global.opentelemetry_operator` | OTel operator | |
| 166 | +| rabbitmq-system | `global.rabbitmq_system` | RabbitMQ operator | |
| 167 | +| rook | `global.rook` | Ceph storage | |
| 168 | +| sealed-secrets | `global.sealed_secrets` | Sealed secrets | |
| 169 | + |
| 170 | +### Site Components |
| 171 | + |
| 172 | +Components deployed on site clusters: |
| 173 | + |
| 174 | +| Component | Values Key | Description | |
| 175 | +|-----------|-----------|-------------| |
| 176 | +| argo-events | `site.argo_events` | Event processing | |
| 177 | +| argo-workflows | `site.argo_workflows` | Workflow engine | |
| 178 | +| chrony | `site.chrony` | NTP service | |
| 179 | +| envoy-configs | `site.envoy_configs` | Gateway configs | |
| 180 | +| nautobot-site | `site.nautobot_site` | Site Nautobot config | |
| 181 | +| openstack-exporter | `site.openstack_exporter` | Metrics exporter | |
| 182 | +| openstack-memcached | `site.openstack_memcached` | Caching | |
| 183 | +| site-workflows | `site.site_workflows` | Site workflows | |
| 184 | +| snmp-exporter | `site.snmp_exporter` | SNMP metrics | |
| 185 | +| undersync | `site.undersync` | Sync service | |
| 186 | + |
| 187 | +### OpenStack Components |
| 188 | + |
| 189 | +OpenStack services with configurable chart versions: |
| 190 | + |
| 191 | +| Component | Values Key | |
| 192 | +|-----------|-----------| |
| 193 | +| keystone | `site.keystone` | |
| 194 | +| glance | `site.glance` | |
| 195 | +| cinder | `site.cinder` | |
| 196 | +| ironic | `site.ironic` | |
| 197 | +| neutron | `site.neutron` | |
| 198 | +| placement | `site.placement` | |
| 199 | +| nova | `site.nova` | |
| 200 | +| octavia | `site.octavia` | |
| 201 | +| horizon | `site.horizon` | |
| 202 | +| skyline | `site.skyline` | |
| 203 | +| openvswitch | `site.openvswitch` | |
| 204 | +| ovn | `site.ovn` | |
| 205 | + |
| 206 | +## Debugging |
| 207 | + |
| 208 | +Preview generated Applications: |
| 209 | + |
| 210 | +```bash |
| 211 | +helm template argocd-understack ./charts/argocd-understack \ |
| 212 | + -f cluster-values.yaml |
| 213 | +``` |
| 214 | + |
| 215 | +Compare with deployed Applications: |
| 216 | + |
| 217 | +```bash |
| 218 | +# Generate expected |
| 219 | +helm template argocd-understack ./charts/argocd-understack \ |
| 220 | + -f cluster-values.yaml > expected.yaml |
| 221 | +
|
| 222 | +# Get current |
| 223 | +kubectl get applications -n argocd -o yaml > current.yaml |
| 224 | +
|
| 225 | +# Compare |
| 226 | +diff expected.yaml current.yaml |
| 227 | +``` |
| 228 | + |
| 229 | +## Development |
| 230 | + |
| 231 | +### Adding a New Component |
| 232 | + |
| 233 | +1. Create template in `templates/application-<component>.yaml.tpl` |
| 234 | +2. Add configuration to `values.yaml` under appropriate section |
| 235 | +3. Update this README |
| 236 | + |
| 237 | +### Template Pattern |
| 238 | + |
| 239 | +```yaml |
| 240 | +{{- if eq (include "understack.isEnabled" (list $.Values.site "component_name")) "true" }} |
| 241 | +--- |
| 242 | +apiVersion: argoproj.io/v1alpha1 |
| 243 | +kind: Application |
| 244 | +metadata: |
| 245 | + name: {{ printf "%s-%s" $.Release.Name "component-name" }} |
| 246 | + annotations: |
| 247 | + argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true |
| 248 | +spec: |
| 249 | + destination: |
| 250 | + namespace: component-namespace |
| 251 | + server: {{ $.Values.cluster_server }} |
| 252 | + project: understack |
| 253 | + sources: |
| 254 | + # ... sources configuration |
| 255 | + syncPolicy: |
| 256 | + automated: |
| 257 | + prune: true |
| 258 | + selfHeal: true |
| 259 | + syncOptions: |
| 260 | + - CreateNamespace=true |
| 261 | + - ServerSideApply=true |
| 262 | + - RespectIgnoreDifferences=true |
| 263 | + - ApplyOutOfSyncOnly=true |
| 264 | +{{- end }} |
| 265 | +``` |
| 266 | + |
| 267 | +## License |
| 268 | + |
| 269 | +Apache 2.0 |
0 commit comments