Bring your own infrastructure
Install into your own VPC, GKE cluster, Postgres, secrets and monitoring, or install the chart only through your own Argo CD.
Every piece of infrastructure the install creates is optional, or swappable for one you already run. The defaults are what every install gets, so changing nothing changes nothing. MedHook never creates a Google Cloud project: it installs into the one you name.
The choices
| Component | Default | Bring your own (Terraform setting) |
|---|---|---|
| Google APIs | enabled by Terraform | enable_project_apis = false; the preflight lists any that are off |
| VPC and node subnet | created | existing_network, existing_subnetwork (names, or self links for a Shared VPC host) |
| Cloud NAT | created, with a fixed egress IP | cloud_nat_enabled = false when your VPC already has NAT |
| GKE cluster | a private cluster | existing_cluster = { name, location }: Terraform installs the chart's dependencies only |
| Postgres | Cloud SQL | database = "external" with external_database: an existing Cloud SQL instance or any Postgres 14+ |
| Redis | in the cluster | redis = "memorystore", or the chart's externalRedis |
| Secret names | <prefix>-<name> | existing_secrets: your own secret ids; MedHook neither creates them nor writes their values |
| Container registry | created | existing_docker_repository; skip the mirror when your CI already pushes the images |
| Release bundle registry | created | existing_files_repository, or files_repository_enabled = false |
| Audit archive bucket | created, retention six years | existing_audit_archive_bucket (you own its retention) |
| Build bucket | created | build_source_bucket_enabled = false for Helm or Argo CD installs |
| Public ingress | Google load balancer with a fixed IP and TLS policy | public_ingress_enabled = false: keep the engine internal or use your own ingress or gateway |
| VPN | Classic VPN gateway | vpn_mode = "ha", "both" or "none" |
| Deploy identity | a deployer service account | deployer_enabled = false when your CI or Argo CD deploys |
| Alerts | Cloud Monitoring policies | cloud_monitoring_alerts_enabled = false |
| Dashboards | Prometheus and Grafana in the cluster | in_cluster_monitoring_enabled = false |
Each choice also drops the matching permissions from what the installer needs. See Least privilege.
Your own monitoring
Turn off the in-cluster Prometheus and Grafana and the Cloud Monitoring alerts, and send metrics where you already look. Every engine pod keeps serving Prometheus metrics at /api/metrics, with a bearer token (METRICS_TOKEN), and carries the standard prometheus.io scrape annotations.
- New Relic through OpenTelemetry: an OpenTelemetry Collector with the Prometheus receiver scraping the engine pods, exporting over OTLP to New Relic with your license key.
- New Relic through Prometheus remote-write: Prometheus in agent mode, or your existing Prometheus, scraping the same pods and remote-writing to New Relic.
- Google Cloud Monitoring: Google Managed Prometheus with a
PodMonitoringfor the engine pods.
Let the collector reach the engine with the chart's engine.networkPolicy.extraFrom. Page on the engine's readiness check (/api/ready), pod restarts, the error-log rate, the license metric, database health, and VPN tunnel state.
Helm only via Argo CD
If Argo CD already runs your workloads, it can install the chart instead of the deploy build. The bundle's argocd/ folder holds an Application, the values it needs and an External Secrets example.
- Apply Terraform with
helm_values_secret_enabled = falseanddeployer_enabled = false, and committerraform output -raw helm_valuesto your values repository. It holds no secrets. - Create the engine's Secret your way: External Secrets from Secret Manager, the Secret Manager CSI driver or Sealed Secrets. Name it in
global.existingSecret; the chart then renders no Secret and every pod reads yours. Generate the metrics and MLLP tokens once and keep them. - Set
argocd.enabled: true. The database migration then runs as an Argo CD Sync hook on every sync, and engine pods wait for it. A sync with no new migration applies nothing. - Pin every image by digest from your registry.
- In your CI, before a release bump reaches the branch Argo CD watches, run
deploy/argocd-precheck.shon the rendered chart. It refuses images from outside your registry or without a digest, verifies the license in the new engine image, waits out a running migration and takes a Cloud SQL backup.