Skip to content

feat(helm): add Hypersense backend and ETL helm support - #302

Open
GauravRawat369 wants to merge 3 commits into
mainfrom
add-hypersense-helm-support
Open

feat(helm): add Hypersense backend and ETL helm support#302
GauravRawat369 wants to merge 3 commits into
mainfrom
add-hypersense-helm-support

Conversation

@GauravRawat369

@GauravRawat369 GauravRawat369 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

This pull request adds support for deploying the Hypersense Backend and ETL services as part of the Helm chart, including their configuration, secrets, and service definitions. It introduces new templates for deployments and services, shared configuration and secret management, and a dedicated values file for deploying with remote registry images. The changes also improve PostgreSQL and Redis integration for these new services and the main application.

Hypersense services integration:

  • Added deployment and service templates for hypersense-backend and hypersense-etl, including environment variable configuration, health checks, and resource management. These deployments use shared ConfigMaps and Secrets for database and Redis connection details. [1] [2] [3] [4]
  • Introduced templates for creating a shared ConfigMap and Secret holding DB/Redis connection information and DB password, used by both Hypersense services. These can be overridden to use externally managed resources. [1] [2]
  • Added helper template functions to generate names for the Hypersense services, their shared ConfigMap, and Secret, supporting both in-cluster and external resource scenarios.

Configuration and values:

  • Added a new values file, values-hypersense.yaml, providing configuration for a deployed environment using remote registry images, persistent storage, and setup instructions for required image pull secrets. This file enables out-of-the-box deployment of all services, including Hypersense, with options for external resource integration.

Main application improvements:

  • Updated the main deployment to supply PostgreSQL and Redis connection information via environment variables when enabled, improving compatibility with the new Hypersense services and external resources.
image image
 decision-engine git:(main) ✗ curl -s http://localhost:8080/health  
{"message":"Health is good"}%    
curl --location 'http://localhost:8080/merchant-account/create' \
--header 'Content-Type: application/json' \
--data '{
  "merchant_id": "test_merchant_1234"  
}'
{
    "message": "Merchant account created successfully",
    "merchant_id": "test_merchant_1234",
    "gateway_success_rate_based_decider_input": null
}

Copilot AI review requested due to automatic review settings July 2, 2026 07:26
@GauravRawat369 GauravRawat369 self-assigned this Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the Helm chart to optionally deploy two additional workloads—hypersense-backend and hypersense-etl—alongside decision-engine, using shared ConfigMap/Secret wiring for DB/Redis connectivity and providing example values files for local and “deployed” setups.

Changes:

  • Added Helm templates for Hypersense backend/ETL Deployments and Services, plus shared ConfigMap/Secret templates for DB/Redis coordinates and DB password.
  • Introduced values-local.yaml and values-hypersense.yaml to support local-image and remote-registry deployments of Hypersense services.
  • Updated decision-engine Deployment to inject PostgreSQL connection env vars when PostgreSQL is enabled.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
helm-charts/values.yaml Adds Hypersense values, shared resource settings, and a Postgres initdb script for creating a Hypersense DB.
helm-charts/values-local.yaml New local dev values file enabling Hypersense services with locally built images and ephemeral PG/Redis.
helm-charts/values-hypersense.yaml New deployed-environment values file enabling Hypersense services with private ECR images + pull secret.
helm-charts/templates/hypersense-secret.yaml New shared Secret template for Hypersense DB password injection.
helm-charts/templates/hypersense-config.yaml New shared ConfigMap template for Hypersense DB/Redis connection coordinates.
helm-charts/templates/hypersense-backend-deployment.yaml New Deployment template for hypersense-backend with env wiring, probes, resources, and optional migration flag.
helm-charts/templates/hypersense-backend-service.yaml New Service template for hypersense-backend.
helm-charts/templates/hypersense-etl-deployment.yaml New Deployment template for hypersense-etl with env wiring (incl. ClickHouse), probes, resources, and optional migration flag.
helm-charts/templates/hypersense-etl-service.yaml New Service template for hypersense-etl.
helm-charts/templates/deployment.yaml Adds Postgres env-var wiring to the main decision-engine Deployment when PostgreSQL is enabled.
helm-charts/templates/_helpers.tpl Adds helper functions to generate names for Hypersense services and shared ConfigMap/Secret.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread helm-charts/values.yaml
Comment on lines +340 to +343
service:
port: 8081
resources: {}
healthcheck:
Comment on lines +227 to +243
{{/*
Name of the shared Hypersense ConfigMap (DB/Redis connection coordinates).
Mirrors hypersense-main's configMapName: referenced by backend + etl via configMapKeyRef.
Override hypersenseShared.configMapName to point at a pre-existing (external) ConfigMap.
*/}}
{{- define "decision-engine.hypersenseConfigMapName" -}}
{{- .Values.hypersenseShared.configMapName | default (printf "%s-hypersense-config" (include "decision-engine.fullname" .)) }}
{{- end }}

{{/*
Name of the shared Hypersense Secret (DB password).
Mirrors hypersense-main's secretsName: referenced by backend + etl via secretKeyRef.
Override hypersenseShared.secretName to point at a pre-existing (external) Secret.
*/}}
{{- define "decision-engine.hypersenseSecretName" -}}
{{- .Values.hypersenseShared.secretName | default (printf "%s-hypersense-secret" (include "decision-engine.fullname" .)) }}
{{- end }}
Comment thread helm-charts/values.yaml
Comment on lines +177 to +181
initdb:
scripts:
create_hypersense_db.sql: |
CREATE DATABASE hypersense_db;
GRANT ALL PRIVILEGES ON DATABASE hypersense_db TO db_user;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants