Skip to content
Operate

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.

On this page

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

ComponentDefaultBring your own (Terraform setting)
Google APIsenabled by Terraformenable_project_apis = false; the preflight lists any that are off
VPC and node subnetcreatedexisting_network, existing_subnetwork (names, or self links for a Shared VPC host)
Cloud NATcreated, with a fixed egress IPcloud_nat_enabled = false when your VPC already has NAT
GKE clustera private clusterexisting_cluster = { name, location }: Terraform installs the chart's dependencies only
PostgresCloud SQLdatabase = "external" with external_database: an existing Cloud SQL instance or any Postgres 14+
Redisin the clusterredis = "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 registrycreatedexisting_docker_repository; skip the mirror when your CI already pushes the images
Release bundle registrycreatedexisting_files_repository, or files_repository_enabled = false
Audit archive bucketcreated, retention six yearsexisting_audit_archive_bucket (you own its retention)
Build bucketcreatedbuild_source_bucket_enabled = false for Helm or Argo CD installs
Public ingressGoogle load balancer with a fixed IP and TLS policypublic_ingress_enabled = false: keep the engine internal or use your own ingress or gateway
VPNClassic VPN gatewayvpn_mode = "ha", "both" or "none"
Deploy identitya deployer service accountdeployer_enabled = false when your CI or Argo CD deploys
AlertsCloud Monitoring policiescloud_monitoring_alerts_enabled = false
DashboardsPrometheus and Grafana in the clusterin_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 PodMonitoring for 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.

  1. Apply Terraform with helm_values_secret_enabled = false and deployer_enabled = false, and commit terraform output -raw helm_values to your values repository. It holds no secrets.
  2. 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.
  3. 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.
  4. Pin every image by digest from your registry.
  5. In your CI, before a release bump reaches the branch Argo CD watches, run deploy/argocd-precheck.sh on 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.

Reference