Multi-tenant Kubernetes infrastructure for healthcare SaaS (MyCure, HapiHub).
GitOps-driven with ArgoCD, Helm charts, and Terraform/OpenTofu. The live DOKS
cluster is OpenTofu-managed from values/cluster.
charts/ # Everything deployable is a chart
argocd-bootstrap/ # Infrastructure root + auto-discover ApplicationSet
argocd-applications/ # Per-deployment Application factory + dedicated templates
argocd-infrastructure/ # Cluster-wide infrastructure apps
app/ # Generic frontend/service chart (consolidates clones)
<bespoke charts> # hapihub, cadence, nginx-gateway, security-baseline, ...
terraform/ # IaC modules for 6 providers
modules/ # aws-eks, azure-aks, gcp-gke, do-doks, on-prem-k3s, local-k3d
values/ # ALL real configuration
cluster/ # OpenTofu root for the live DOKS cluster (imported state)
deployments/ # <product>-<env>.yaml overlays + _base/<product>.yaml
infrastructure/ # Cluster-wide infra config (main.yaml) + secrets registry
scripts/ # Operational scripts (bootstrap, provision, secrets, admin)
docs/ # Architecture, operations, security documentation
Tool versions and tasks are managed with mise:
mise install # install pinned tool versions
mise tasks # list all tasks
mise run lint # yamllint + helm lint + tflint
mise run validate # template-render all charts against real valuesKey tasks: lint, validate, check, fmt, bootstrap, provision, secrets, admin, cluster-plan, cluster-apply.
Everything is GitOps — push to main and ArgoCD syncs:
- Deployments: edit
values/deployments/<client>-<env>.yaml(overlays onvalues/deployments/_base/<product>.yaml), commit, push. The auto-discover ApplicationSet picks it up and syncs the namespace{client}-{environment}. - Cluster-wide infrastructure: edit
values/infrastructure/main.yaml(gateway listeners, cert issuers, snippets policies, ...). - Cluster itself (node pools, k8s version):
values/cluster+mise run cluster-plan/mise run cluster-apply(OpenTofu). - Bootstrap (new/empty cluster): select the target kubectl context, then
mise run bootstrap -- --cluster-name <cluster>(e.g.mycure-doks-main) — installs ArgoCD and the root apps; everything else flows from Git. The--cluster-nameloadsvalues/clusters/<cluster>/argocd/bootstrap.yaml; a baremise run bootstrapdefaults--cluster-nametomycure-doks-main(seeds DOKS prod), so always pass--cluster-namefor any other cluster. Bootstrap validates the resolved values (real, non-genericargocd.clusterName- existing cluster paths) and aborts before touching the cluster if incomplete.
Direct kubectl changes are reverted by ArgoCD self-heal.
Domains: *.mycureapp.com, *.localfirsthealth.com, *.stg.localfirsthealth.com, *.mycure.md.
Index: docs/README.md
- System Architecture
- GitOps with ArgoCD
- Gateway API — NGINX Gateway Fabric, HTTPRoutes
- Multi-Domain Gateway
- Cluster Provisioning
- Client Onboarding
- Backup & DR · DR Runbooks
- Scaling Guide · Troubleshooting
- Security Hardening · Compliance (HIPAA, SOC2, GDPR)
- NetworkPolicies — default-deny, allow-specific (see
charts/security-baseline) - Pod Security Standards — restricted profile enforced per namespace
- TLS everywhere via cert-manager; secrets only via External Secrets + GCP SM
- Internal-by-default ingress — routes land on the tailnet gateway unless a deployment explicitly opts into the public gateway
- Namespaces:
{client}-{environment}(e.g.mycure-production) - Deployment files:
values/deployments/{client}-{environment}.yaml - Node pools (DOKS):
prod-db,prod-apps,infra,nonprod— taintednode-pool=<name>:NoScheduleexceptnonprod(see Scaling Guide) - Conventional commits:
feat:,fix:,chore:,docs:,refactor: - See CONTRIBUTING.md
