Skip to content

fix(helm): deployment using helm chart#80

Merged
avivhalfon merged 18 commits intomainfrom
ah/TLP-1189/chore-fix-helm-management-mode
Jan 7, 2026
Merged

fix(helm): deployment using helm chart#80
avivhalfon merged 18 commits intomainfrom
ah/TLP-1189/chore-fix-helm-management-mode

Conversation

@avivhalfon
Copy link
Contributor

@avivhalfon avivhalfon commented Dec 31, 2025

Important

Enhances Helm chart with Management API features, TLS support, and improved configuration handling for deployments.

  • New Features:
    • Exposes Management API port (8080) in deployment.yaml when enabled.
    • Adds configurable models and pipelines entries in values.yaml for runtime configuration.
    • Introduces Management API gating with environment-driven mode and startup behavior in deployment.yaml.
  • Database and Security:
    • Enables native TLS support for database tooling in Cargo.toml and Dockerfile.db-based-migrations.
    • Adds SSL mode and improved DB URL/env handling in deployment.yaml and migration-job.yaml, including ConfigMap-based host/port/name and stronger secret/password sourcing.
  • Deployment and Configuration:
    • Aligns deployment and migration templates to the Management API structure in deployment.yaml and migration-job.yaml.
    • Updates values.yaml and values-db-example.yaml to reflect new configuration options and defaults.

This description was created by Ellipsis for 3a82d0a. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Exposes Management API port (8080) when enabled.
    • Adds configurable models and pipelines entries for runtime configuration.
    • Introduces management-mode gating that switches runtime mode, envs, and startup behavior.
  • Chores

    • Enables native TLS support for DB tooling and runtime.
    • Improves DB URL/env handling: supports ConfigMap-based host/port/name, stronger secret sourcing, and sslMode.
    • Aligns deployment and migration manifests, image/tag handling, probes, and migration job runtime limits.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 31, 2025

📝 Walkthrough

Walkthrough

Updated TLS usage for sqlx (Cargo.toml, Dockerfile) and refactored Helm charts to replace EE gating with a Management API mode: migrated hub.* → app.*, introduced management.database (host/port/name/sslMode/configMap support), management secrets, management port, and adjusted deployment, migration job, and values files.

Changes

Cohort / File(s) Summary
TLS dependency & build
Cargo.toml, Dockerfile.db-based-migrations
Switched sqlx features from runtime-tokioruntime-tokio-native-tls; added native-tls to sqlx-cli install features in Docker builder stage.
Helm deployment template
helm/templates/deployment.yaml
Replaced EE gating with management.enabled; introduced HUB_MODE (database/config), POSTGRES_DATABASE_HOST/PORT/NAME, POSTGRES_DATABASE_USER, DB_PASSWORD from management.database.*; DATABASE_URL now built from management DB fields (including sslMode); conditional configMap/secret usage, conditional startupProbe, adjusted volumes/volumeMounts, nodeSelector and env sources to management.*.
Helm migration job template
helm/templates/migration-job.yaml
Migrated hub.*app.*, image tag construction changed to repository:tag defaulting to Chart.Version; DB envs now support management.database.configMapName/configMapKeys fallback to explicit values; DB_PASSWORD sourced from management.database.existingSecret/passwordKey; added activeDeadlineSeconds: 300; updated metadata/labels to app.*.
Helm values & examples
helm/values.yaml, helm/values-db-example.yaml
Replaced ee: with management: blocks; added management.database.sslMode, configMapName/configMapKeys, service.managementPort (8080); introduced empty config.models and config.pipelines lists; simplified management secrets mapping and updated examples/comments.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Helm as Helm Chart
  participant K8s as Kubernetes (Deployment/Job)
  participant App as Application Pod
  participant DB as Postgres
  note over Helm,K8s `#eef2ff`: Chart renders using management.enabled
  Helm->>K8s: Render Deployment + Migration Job (management.enabled=true)
  K8s->>App: Start Pod with env POSTGRES_DATABASE_HOST/PORT/NAME/USER/sslMode
  alt DB config provided via ConfigMap
    K8s->>App: Mount ConfigMap keys -> env vars
  else DB config via values
    Helm->>K8s: Inject env vars from values.yaml
  end
  K8s->>K8s: Run Migration Job (activeDeadlineSeconds:300)
  Migration Job->>DB: Connect using DATABASE_URL (includes sslMode, password from management secret)
  App->>DB: Application runtime DB connections (HUB_MODE=database)
  note right of DB `#e8fff0`: DB interactions honor sslMode and secret-sourced password
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped through charts and crates today,
Swapped tokio threads for native TLS play.
Management mode now guides host, port, and key,
Migrations sip secrets, configMaps steep the tea.
A carrot-coded deploy—nimble, neat, and free.

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'fix(helm): deployment using helm chart' is vague and uses redundant language; it mentions 'helm chart' twice without clearly conveying what aspect of deployment was fixed. Revise the title to be more specific about the key change, such as 'fix(helm): add Management API support and native TLS configuration' or 'chore(helm): integrate Management API with native TLS support'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed The pull request fully addresses TLP-1189's objectives by implementing Management API gating, native TLS support, management-driven configuration, and ConfigMap-based DB settings across Helm templates and build artifacts.
Out of Scope Changes check ✅ Passed All changes are directly aligned with TLP-1189 objectives: Helm chart updates for Management API integration, native TLS in build files, and configuration structure rework for management-driven deployments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@avivhalfon avivhalfon changed the title ah/TLP 1189/chore fix helm management mode fix(helm): deployment using helm chart Dec 31, 2025
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 663ee4b in 1 minute and 13 seconds. Click for details.
  • Reviewed 633 lines of code in 10 files
  • Skipped 0 files when reviewing.
  • Skipped posting 14 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .cz.yaml:5
  • Draft comment:
    Version bumped to 0.7.6; verify compatibility with all commitizen tooling.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. .github/workflows/docker.yml:4
  • Draft comment:
    Workflow trigger now fires on branch 'main' instead of tags; confirm this change is intentional.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. .github/workflows/docker.yml:24
  • Draft comment:
    The 'Extract version from .cz.yaml' step relies on yq; ensure yq is available and consider pinning its version for consistency.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
4. .github/workflows/version.yml:11
  • Draft comment:
    Version bump workflow condition prevents recursive bumps; this appears intentional.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. Cargo.toml:54
  • Draft comment:
    Switched sqlx feature from 'runtime-tokio' to 'runtime-tokio-native-tls'; verify that TLS behavior meets your RDS SSL needs.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
6. Dockerfile.db-based-migrations:3
  • Draft comment:
    Added 'native-tls' to sqlx-cli installation; runtime certificates are handled via package installs. Looks appropriate.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
7. helm/Chart.yaml:5
  • Draft comment:
    Chart version updated to 0.7.6; ensure this remains in sync with your application version.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
8. helm/templates/deployment.yaml:57
  • Draft comment:
    Removed conditional image selection; confirm that always using '.Values.image.repository' with tag default is intended.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
9. helm/templates/deployment.yaml:63
  • Draft comment:
    Environment vars updated to use 'management.enabled' and new DB config; verify DB URL interpolation and secret references.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
10. helm/templates/deployment.yaml:140
  • Draft comment:
    Corrected startupProbe indentation for management API; this formatting looks correct.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
11. helm/templates/migration-job.yaml:1
  • Draft comment:
    Migration job is now conditional on 'management.enabled'; ensure this flag correctly governs migration execution.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
12. helm/templates/migration-job.yaml:5
  • Draft comment:
    Using '.Chart.Version' for the migration image tag default instead of AppVersion; verify this change is as intended.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
13. helm/values-db-example.yaml:97
  • Draft comment:
    Management config updated from 'ee' to 'management'; ensure users update their values accordingly.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
14. helm/values.yaml:111
  • Draft comment:
    Management section now replaces 'ee'; confirm consistency in service, DB, and migration settings.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_Ie5DgdVw8uQ0AeYB

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Cargo.toml (1)

75-75: Inconsistency: dev-dependencies missing native-tls support.

Line 75 still uses runtime-tokio instead of runtime-tokio-native-tls, which is inconsistent with the production dependencies at Line 54. This mismatch could cause issues if:

  • Integration tests need to connect to SSL-enabled databases
  • Development environments mirror production SSL requirements
🔎 Proposed fix to align dev-dependencies with production
-sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "migrate"] }
+sqlx = { version = "0.8", features = ["runtime-tokio-native-tls", "postgres", "migrate"] }
🧹 Nitpick comments (3)
.github/workflows/docker.yml (2)

9-40: Good structure for version extraction with validation.

The extract-version job correctly validates that both version and chart_name are non-empty before proceeding. However, note that yq returns the literal string null (not empty) when a key is missing.

🔎 Suggested fix to handle null values from yq
      - name: Extract version from .cz.yaml
        id: version
        run: |
          VERSION=$(yq '.commitizen.version' .cz.yaml)
-          if [[ -z "$VERSION" ]]; then
+          if [[ -z "$VERSION" || "$VERSION" == "null" ]]; then
            echo "Error: Could not extract version from .cz.yaml"
            exit 1
          fi
          echo "version=$VERSION" >> "$GITHUB_OUTPUT"

      - name: Helm Chart Name
        id: chartName
        run: |
          CHART_NAME=$(yq '.name' helm/Chart.yaml)
-          if [[ -z "$CHART_NAME" ]]; then
+          if [[ -z "$CHART_NAME" || "$CHART_NAME" == "null" ]]; then
            echo "Error: Could not extract chart name from helm/Chart.yaml"
            exit 1
          fi
          echo "chart_name=$CHART_NAME" >> $GITHUB_OUTPUT

116-116: Dependency chain may cause build-images to be skipped unintentionally.

When extract-version is skipped (non-bump commits), create-manifests will also be skipped because it depends on extract-version. However, build-images will still run, consuming CI resources without creating manifests or deploying.

Consider either:

  1. Adding the same if condition to build-images, or
  2. Using if: always() && needs.build-images.result == 'success' pattern if you want builds to run independently
helm/templates/deployment.yaml (1)

139-149: startupProbe uses readiness probe values instead of dedicated startup values.

The startupProbe configuration reuses .Values.probes.readiness.* defaults. For startup probes, you typically want longer initialDelaySeconds and higher failureThreshold to allow for slower cold starts without the probe configuration being counterintuitive.

Consider adding dedicated .Values.probes.startup.* configuration values:

          startupProbe:
            httpGet:
              path: /health
              port: management
-            initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds | default 10 }}
-            periodSeconds: {{ .Values.probes.readiness.periodSeconds | default 10 }}
-            timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds | default 5 }}
-            successThreshold: {{ .Values.probes.readiness.successThreshold | default 1 }}
-            failureThreshold: {{ .Values.probes.readiness.failureThreshold | default 3 }}
+            initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds | default 5 }}
+            periodSeconds: {{ .Values.probes.startup.periodSeconds | default 5 }}
+            timeoutSeconds: {{ .Values.probes.startup.timeoutSeconds | default 5 }}
+            successThreshold: {{ .Values.probes.startup.successThreshold | default 1 }}
+            failureThreshold: {{ .Values.probes.startup.failureThreshold | default 30 }}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 25672a0 and 663ee4b.

📒 Files selected for processing (10)
  • .cz.yaml
  • .github/workflows/docker.yml
  • .github/workflows/version.yml
  • Cargo.toml
  • Dockerfile.db-based-migrations
  • helm/Chart.yaml
  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
  • helm/values-db-example.yaml
  • helm/values.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (rust)
🔇 Additional comments (27)
helm/Chart.yaml (1)

5-5: LGTM! Version bump aligns with project versioning.

The Helm chart version has been correctly updated to 0.7.6, consistent with the version bumps in Cargo.toml and .cz.yaml.

Dockerfile.db-based-migrations (1)

3-4: LGTM! TLS support correctly added for secure database connections.

The addition of native-tls to sqlx-cli features enables SSL/TLS connections to databases like RDS, consistent with the runtime TLS support added in Cargo.toml.

helm/values.yaml (3)

35-36: LGTM! Comment correctly updated to reflect management mode.

The comment now accurately references management.enabled instead of the deprecated ee.enabled.


72-92: LGTM! New configuration arrays added with clear examples.

The addition of models and pipelines arrays provides extensibility for hub configuration in OSS mode, with helpful example comments for users.


121-121: Verify that sslMode: "require" is appropriate for all deployment environments.

Setting sslMode: "require" as the default enforces SSL for all PostgreSQL connections. While this enhances security, it may break deployments with databases that don't have SSL configured.

Consider:

  • Whether all target environments (staging, production) support SSL
  • If a more flexible default like "prefer" would be better for development environments
  • Document this requirement clearly in deployment guides

Do you want me to check if there are any related database configuration files or deployment guides that should be updated to document this SSL requirement?

Cargo.toml (2)

3-3: LGTM! Version bump aligns across project files.

The version has been correctly updated to 0.7.6, consistent with helm/Chart.yaml and .cz.yaml.


54-54: LGTM! TLS support correctly added for production runtime.

The change from runtime-tokio to runtime-tokio-native-tls enables SSL/TLS support for PostgreSQL connections in production, aligning with the sslMode: "require" configuration in Helm values.

.cz.yaml (1)

5-5: LGTM! Version bump is consistent.

The commitizen version has been updated to 0.7.6, aligning with the version bumps in Cargo.toml and helm/Chart.yaml.

.github/workflows/version.yml (2)

11-11: LGTM! Proper guard against infinite loop.

The condition !startsWith(github.event.head_commit.message, 'bump:') correctly prevents the workflow from triggering itself recursively when commitizen creates a bump commit.


25-32: The workflow permissions are correctly configured, but verify the GH_ACCESS_TOKEN secret exists in repository settings.

The job has permissions: contents: write at the workflow level (line 16), which grants the necessary write access. The commitizen-tools/commitizen-action is a legitimate, well-maintained action designed for this workflow. However, the secret itself must be configured in the repository—it cannot be verified in the codebase. Check that GH_ACCESS_TOKEN is defined in repository secrets with sufficient permissions to bypass any branch protection rules on main.

helm/templates/migration-job.yaml (4)

25-56: LGTM! Conditional database configuration adds flexibility.

The conditional logic based on configMapName allows dynamic database configuration from ConfigMaps while maintaining backward compatibility with static values. The SSL mode is correctly interpolated in the DATABASE_URL.


54-55: Good defaults with proper fallback handling.

The defaults for existingSecret and passwordKey provide sensible fallbacks:

  • existingSecret defaults to <app-fullname>-db-secret
  • passwordKey defaults to "password"

This improves usability while maintaining flexibility.


5-5: The helper functions app.fullname, app.labels, and app.selectorLabels are all properly defined in _helpers.tpl and correctly referenced in the migration-job.yaml template at lines 5, 7, and 17. No issues found.


23-23: No change needed; the current approach is intentional and consistent.

This project deliberately syncs image versions with chart versions. The .Chart.AppVersion is not defined in Chart.yaml, so using .Chart.Version is the correct approach. The Docker workflow confirms that migration images are tagged with the chart version extracted from .cz.yaml during the release process, which directly aligns with the Helm template's use of .Chart.Version. The comment in values.yaml explicitly documents this tagging strategy.

helm/values-db-example.yaml (5)

35-35: LGTM! Management port added for API exposure.

The addition of managementPort: 8080 provides a dedicated port for the Management API, separate from the main hub service port.


71-78: LGTM! Configuration structure enhanced with models and pipelines.

The comment clarification and addition of empty models and pipelines arrays improve the configuration structure for OSS mode.


96-115: LGTM! Clean restructuring from EE to Management API.

The renaming from ee to management and the addition of sslMode: "require" align with the PR objectives to standardize on management mode configuration.


136-136: LGTM! Migration image repository renamed consistently.

The repository name changed from hub-ee-migrations to hub-migrations, reflecting the consolidation of Enterprise Edition into the Management API structure.


148-190: LGTM! Comprehensive example configuration for Management API.

The commented example provides clear guidance for users configuring the Management API mode with all necessary fields including SSL mode, secrets, and resource limits.

.github/workflows/docker.yml (4)

41-43: Missing conditional on build-images job.

The build-images job runs unconditionally on every push to main, but downstream jobs (create-manifests, deploy, push-helm-chart) only run when extract-version succeeds (i.e., on bump commits or workflow_dispatch). This means Docker images are built on every push but manifests/deployments only happen for version bumps.

Is this intentional? If so, consider adding a comment to clarify. If not, the build-images job should also have the same if condition as extract-version.


156-172: Good use of SHORT_SHA for traceability.

The manifest creation correctly tags images with both semantic version and short SHA for traceability. The approach of computing GHCR_IMAGE and DOCKERHUB_IMAGE inline is clean.


186-196: Octopus release creation uses consistent versioning.

The release creation properly uses the extracted version for --version, --packageVersion, and package specification. This aligns with the PR objective of using centralized version management.


232-238: Helm chart push relies on predictable filename.

The push step assumes helm package creates a file named exactly $CHART_NAME-$VERSION.tgz. This should work correctly with standard Helm behavior.

helm/templates/deployment.yaml (4)

57-57: Image tag defaults to Chart.Version instead of Chart.AppVersion.

Typically, Chart.AppVersion is used for Docker image tags while Chart.Version tracks chart changes. Using Chart.Version means chart-only changes (no app changes) would require a new image tag.

Verify this is intentional. If the chart version and app version should track independently:

-          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.Version }}"
+          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"

150-157: Empty comment after conditional volume mount.

Line 157 contains a comment but no actual content for management mode. This is fine as documentation, but the trailing whitespace after the comment may cause YAML rendering issues in some edge cases.

The conditional volume mount logic correctly excludes config volumes in management mode.


63-111: Management mode environment configuration is well-structured.

The conditional logic properly handles both configMapName-based and direct value-based database configuration. The dynamic secrets iteration provides good flexibility.


160-169: Volumes section correctly conditionalizes OSS-only volumes.

The volumes are properly guarded by not .Values.management.enabled, ensuring management mode deployments don't include unnecessary config volumes.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 7dda611 in 1 minute and 24 seconds. Click for details.
  • Reviewed 40 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. helm/templates/deployment.yaml:89
  • Draft comment:
    Reorder the env vars so that DB_PASSWORD is defined before DATABASE_URL. This ensures that any runtime substitution of $(DB_PASSWORD) in DATABASE_URL can succeed.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. helm/templates/migration-job.yaml:46
  • Draft comment:
    Define DB_PASSWORD before DATABASE_URL so that $(DB_PASSWORD) is available for substitution at runtime.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_ftjASDlCJw6ecXtc

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
helm/templates/deployment.yaml (1)

91-99: Issue from previous review has been resolved.

The environment variable ordering issue identified in the previous review has been fixed. DB_PASSWORD (lines 92-96) now correctly appears before DATABASE_URL (lines 97-98) in the else branch, allowing Kubernetes to properly substitute $(DB_PASSWORD) in the DATABASE_URL value.

🧹 Nitpick comments (1)
helm/templates/deployment.yaml (1)

139-149: Consider dedicated startup probe configuration.

The startupProbe reuses all timing values from .Values.probes.readiness.* (lines 144-148). While this keeps the configuration DRY, startup probes typically benefit from different thresholds—particularly a higher failureThreshold to allow slow-starting applications more time before being marked as failed.

If the readiness timing is appropriate for startup checks, this is fine. Otherwise, consider adding .Values.probes.startup.* to values.yaml for independent tuning.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 663ee4b and 7dda611.

📒 Files selected for processing (2)
  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (rust)
🔇 Additional comments (3)
helm/templates/migration-job.yaml (2)

23-23: Verify using .Chart.Version for image tags is intentional.

The image tag now defaults to .Chart.Version (Helm chart version) rather than .Chart.AppVersion (application version). This couples the chart version to the application image version, which means chart metadata changes would affect deployed images.

Confirm this is the intended versioning strategy. Typically, .Chart.AppVersion is used for application image tags while .Chart.Version tracks chart changes independently.


48-56: LGTM!

The else branch correctly defines DB_PASSWORD before DATABASE_URL, allowing proper variable substitution. The default secret naming using app.fullname is consistent with the deployment template.

helm/templates/deployment.yaml (1)

57-57: Confirm chart version is the correct default for image tags.

The default image tag changed to .Chart.Version, which ties the deployed image version to the Helm chart version. This is consistent with the migration job template but differs from the typical pattern of using .Chart.AppVersion for application images.

If the chart version and application version are intentionally synchronized (as suggested by the version bump to 0.7.6), this is correct. Otherwise, consider whether .Chart.AppVersion better represents the deployed application version.

# EE-specific environment variables
- name: HUB_MODE
value: "database"
{{- if .Values.management.database.configMapName }}
Copy link
Member

@doronkopit5 doronkopit5 Dec 31, 2025

Choose a reason for hiding this comment

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

this big if hides a lot of problems:

  • you dont enforce same envvar names
  • you force to use the keys we defined on the configmap
  • you didnt even mention in the values.yaml its supported

Copy link
Member

Choose a reason for hiding this comment

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

you didnt solve the first point, you still define twice POSTGRES_DATABASE_HOST, POSTGRES_DATABASE_PORT, POSTGRES_DATABASE_NAME

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (3)
helm/values.yaml (1)

72-72: LGTM!

The comment now clearly indicates this configuration section is for OSS mode only and not used when management.enabled=true. This addresses the previous review feedback.

helm/templates/migration-job.yaml (1)

49-55: Add default for existingSecret for consistency with deployment.yaml.

Line 52 uses .Values.management.database.existingSecret without a fallback, unlike the else branch pattern in deployment.yaml. This was flagged in a previous review and should be addressed for defensive templating.

🔎 Proposed fix
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
-                  name: {{ .Values.management.database.existingSecret }}
+                  name: {{ .Values.management.database.existingSecret | default (printf "%s-db-secret" (include "app.fullname" .)) }}
                   key: {{ .Values.management.database.passwordKey }}
helm/templates/deployment.yaml (1)

92-98: Add default for existingSecret for defensive templating.

Similar to migration-job.yaml, line 95 uses .Values.management.database.existingSecret without a fallback. While values.yaml provides a default, the template should be defensive in case of misconfiguration.

🔎 Proposed fix
            - name: DB_PASSWORD
              valueFrom:
                secretKeyRef:
-                  name: {{ .Values.management.database.existingSecret }}
+                  name: {{ .Values.management.database.existingSecret | default (printf "%s-db-secret" (include "app.fullname" .)) }}
                   key: {{ .Values.management.database.passwordKey }}
🧹 Nitpick comments (7)
helm/values.yaml (1)

78-92: YAML structure issue: Example comments placed after empty list declarations.

The example comments appear after models: [] and pipelines: [], which is syntactically correct but unconventional. Users might expect the examples to be commented-out entries within the list. Consider restructuring:

🔎 Suggested restructure for clarity
   # Define models available in the hub
-  models: []
-    # Example:
-    # - key: gpt-4o
-    #   type: gpt-4o
-    #   provider: openai
+  models:
+    # - key: gpt-4o
+    #   type: gpt-4o
+    #   provider: openai
   # Define pipelines for routing
-  pipelines: []
-    # Example:
-    # - name: default
-    #   type: chat
-    #   plugins:
-    #     - model-router:
-    #         models:
-    #           - gpt-4o
+  pipelines:
+    # - name: default
+    #   type: chat
+    #   plugins:
+    #     - model-router:
+    #         models:
+    #           - gpt-4o
helm/templates/migration-job.yaml (1)

58-59: Consider using values from values.yaml instead of hardcoded values.

backoffLimit and activeDeadlineSeconds are hardcoded to 3 and 300, but values.yaml defines configurable values at management.migrations.backoffLimit and management.migrations.activeDeadlineSeconds. Use the template references for consistency.

🔎 Proposed fix
-  backoffLimit: 3
-  activeDeadlineSeconds: 300
+  backoffLimit: {{ .Values.management.migrations.backoffLimit }}
+  activeDeadlineSeconds: {{ .Values.management.migrations.activeDeadlineSeconds }}
helm/templates/deployment.yaml (3)

138-148: startupProbe reuses readiness probe configuration values.

The startupProbe uses .Values.probes.readiness.* values instead of dedicated startup probe configuration. This works but may cause confusion when tuning probes independently. Consider either:

  1. Adding a dedicated probes.startup section in values.yaml, or
  2. Adding a comment explaining the intentional reuse of readiness values.

156-156: Remove trailing comment or add content.

This comment line # Management mode doesn't need config file volume is orphaned after the {{- end }} block. It appears after the volumeMounts section ends, which is slightly confusing. Consider moving it inside the conditional block or removing it.


168-168: Remove trailing comment or add content.

Similar to line 156, this comment # Management mode doesn't need config volumes appears after the conditional block ends. Consider moving it inside the {{- if not .Values.management.enabled }} block or removing it for cleaner template output.

Cargo.toml (2)

75-75: Consider aligning dev-dependencies with production TLS configuration.

The dev-dependencies sqlx uses runtime-tokio while production uses runtime-tokio-native-tls. This creates an environment inconsistency where tests run without TLS but production enforces it.

If this is intentional (e.g., testcontainers don't require TLS), consider documenting it. Otherwise, aligning both to use runtime-tokio-native-tls would better match production behavior.

🔎 Proposed alignment with production configuration
-sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "migrate"] }
+sqlx = { version = "0.8", features = ["runtime-tokio-native-tls", "postgres", "migrate"] }

54-54: Consider using the split TLS feature approach for sqlx 0.8.

The runtime-tokio-native-tls feature is available in sqlx 0.8, but it's soft-deprecated. The recommended approach is to use runtime-tokio combined with tls-native-tls instead:

sqlx = { version = "0.8", features = ["runtime-tokio", "tls-native-tls", "postgres", "macros", "chrono", "uuid", "json", "migrate"] }

Additionally, consider whether dev-dependencies (line 75) should also include TLS features for consistency with your production environment, or if the current test-only configuration (runtime-tokio without TLS) is intentional for testcontainers usage.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7dda611 and 41a6165.

📒 Files selected for processing (4)
  • Cargo.toml
  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
  • helm/values.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (rust)
🔇 Additional comments (6)
helm/values.yaml (2)

35-36: LGTM!

Good clarification that the management port is only used when management.enabled is true.


112-125: LGTM on the management database configuration expansion.

The new sslMode, configMapName, and configMapKeys fields provide flexible database configuration options. The structure aligns well with the corresponding template changes in deployment.yaml and migration-job.yaml.

helm/templates/migration-job.yaml (2)

5-7: LGTM!

The migration to app.* helpers (fullname, labels, selectorLabels) is consistent with the naming convention updates across the Helm templates.


25-48: LGTM on the conditional database configuration handling.

The configMapName-based environment variable sourcing provides flexibility between ConfigMap-based and direct value configuration. The pattern is consistent with the deployment.yaml implementation.

helm/templates/deployment.yaml (2)

57-57: LGTM!

The image reference now correctly uses .Chart.Version as the default tag, consistent with the migration-job.yaml pattern.


63-91: LGTM on the management mode environment configuration.

The conditional handling for ConfigMap-based vs. direct value database configuration is well-structured. The HUB_MODE environment variable clearly indicates the deployment mode.

@avivhalfon avivhalfon force-pushed the ah/TLP-1189/chore-fix-helm-management-mode branch from 41a6165 to 36cf914 Compare January 1, 2026 12:58
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 36cf914 in 1 minute and 15 seconds. Click for details.
  • Reviewed 320 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 8 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .cz.yaml:5
  • Draft comment:
    Changed commitizen version from 0.7.6 to 0.7.2. Please confirm this downgrade is intentional and aligned with your release strategy.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm their intention regarding a dependency version change. This violates the rule against asking for confirmation of intention, especially related to dependencies.
2. .github/workflows/docker.yml:82
  • Draft comment:
    Removed the 'extract-version' job from the dependencies. Confirm that eliminating this step doesn’t affect downstream version propagation.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to confirm that removing a job from the dependencies doesn't affect downstream processes. This falls under asking the author to confirm their intention or ensure behavior, which is against the rules.
3. .github/workflows/docker.yml:159
  • Draft comment:
    Octopus release creation now uses a SHA-based version (sha-${GITHUB_SHA::7}) instead of an extracted semantic version. Verify this aligns with your versioning policies.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify if the change aligns with their versioning policies. This falls under the rule of not asking the author to confirm their intention or ensure the behavior is intended. Therefore, this comment should be removed.
4. .github/workflows/docker.yml:141
  • Draft comment:
    The 'docker buildx imagetools create' command uses a '*' wildcard to include digest files. Ensure that this glob reliably picks up the intended files and gracefully handles cases when no files match.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure that a command behaves as intended, which violates the rule against asking for confirmation or verification of behavior. It does not provide a specific suggestion or point out a clear issue with the code.
5. .github/workflows/docker.yml:208
  • Draft comment:
    Helm chart packaging now extracts the chart version and name using grep/awk. Consider using a dedicated YAML parser for robustness in case the formatting of Chart.yaml changes.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. helm/templates/migration-job.yaml:29
  • Draft comment:
    Dynamic use of configMapKeys (e.g. .Values.management.database.configMapKeys.host) improves flexibility. Ensure that these values are always provided in the values file to avoid missing key errors at runtime.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 20% <= threshold 50% The comment is asking the author to ensure that certain values are provided in the values file to avoid runtime errors. This is a general reminder rather than a specific suggestion or question about the code. It doesn't provide a specific code suggestion or ask for a specific test to be written. Therefore, it seems to violate the rule against asking the author to ensure behavior is intended or tested.
7. Cargo.toml:3
  • Draft comment:
    Version update in Cargo.toml to 0.7.2 is consistent with the Helm chart (Chart.yaml) update. Double-check that all related version references have been updated.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to double-check that all related version references have been updated. This falls under the rule of not asking the author to double-check things. Additionally, it comments on a version update, which is related to dependencies, and we should not comment on dependency changes.
8. helm/values.yaml:72
  • Draft comment:
    Typographical: Consider adding a space after the '#' in this comment. It currently reads "#Configuration for the hub (config mode only - not used when management.enabled=true)". For consistency, it should be "# Configuration for the hub (config mode only - not used when management.enabled=true)".
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_VmUMMM4rW7nHWaAc

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.


# Database dependencies - always available now
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "macros", "chrono", "uuid", "json", "migrate"] }
sqlx = { version = "0.8", features = ["runtime-tokio-native-tls", "postgres", "macros", "chrono", "uuid", "json", "migrate"] }
Copy link
Member

Choose a reason for hiding this comment

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

whats the reason to the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When trying to do the migration on stg - I got error for AWS RDS require TLS.
Meaning without it it will work locally - but not actually on the cloud

Comment on lines +66 to +67
- name: HUB_MODE
value: "database"
Copy link
Member

Choose a reason for hiding this comment

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

lets make this explicit also on the other side

# EE-specific environment variables
- name: HUB_MODE
value: "database"
{{- if .Values.management.database.configMapName }}
Copy link
Member

Choose a reason for hiding this comment

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

you didnt solve the first point, you still define twice POSTGRES_DATABASE_HOST, POSTGRES_DATABASE_PORT, POSTGRES_DATABASE_NAME

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed b78f193 in 1 minute and 40 seconds. Click for details.
  • Reviewed 103 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. helm/templates/deployment.yaml:73
  • Draft comment:
    The if/else logic for POSTGRES_DATABASE_HOST, _PORT, and _NAME is duplicated. Consider extracting this repeated pattern into a helper template for improved maintainability and clarity.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 30% vs. threshold = 50% The comment is about code that was changed in the diff - the restructuring of these environment variables is part of the changes. The suggestion to extract into a helper template is a code quality refactoring suggestion, which according to the rules is good if it's actionable and clear. However, I need to consider: 1) Is this actually duplication that warrants extraction? In Helm templates, extracting such patterns into helpers can be complex and may not always improve readability. 2) The pattern is only repeated 3 times, which is borderline for whether extraction is worth it. 3) The suggestion is somewhat vague - it doesn't specify exactly how to implement the helper template. 4) This is a refactoring suggestion on code that was just changed, which could be seen as bikeshedding rather than identifying a real issue. While there is repetition, extracting this into a helper template in Helm might actually make the code harder to read and understand, as it would require jumping to another file to see what's happening. The current inline approach is explicit and clear. Also, the suggestion lacks specific implementation details, making it less actionable. The comment is technically correct that there's a repeated pattern, but in the context of Helm templates, inline repetition for environment variables is common practice and often preferred for clarity. The suggestion may not actually improve maintainability in this case, and without specific implementation guidance, it's not clearly actionable. This comment suggests a refactoring that may not actually improve the code in the context of Helm templates. The current approach is clear and explicit, and the suggestion lacks specific implementation details. The comment should be deleted as it's not clearly beneficial or actionable.
2. helm/templates/migration-job.yaml:26
  • Draft comment:
    Similar to the deployment template, the if/else conditions for setting POSTGRES_DATABASE_HOST, _PORT, and _NAME are repeated. Refactoring into a common helper could reduce duplication.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 20% vs. threshold = 50% This is a code quality refactoring suggestion. The comment is about the changed code (the restructured if/else blocks). However, there are several concerns: 1) The comment references "the deployment template" which is a cross-file issue - I'm told to ignore cross-file issues. 2) While the suggestion is reasonable, it's a refactoring suggestion that goes beyond the scope of the actual change made. The PR author restructured the code but didn't introduce new duplication - the duplication already existed, they just reorganized it. 3) The comment doesn't point to a bug or clear issue, just suggests a potential improvement. 4) According to the rules, refactoring suggestions are good "But only if they are actionable and clear" - this one is somewhat vague (doesn't specify what the helper should look like). The comment is technically correct that there is duplication, and refactoring suggestions are allowed if actionable. The author did touch this code, so it's somewhat relevant to the changes. Maybe this is a reasonable time to suggest the refactoring since they're already modifying this section. While the author did modify this section, they didn't introduce the duplication - they just reorganized existing logic. The comment also references cross-file duplication ("Similar to the deployment template"), which I should ignore. The suggestion is also somewhat vague and doesn't provide a clear, actionable path forward. The rules emphasize only commenting when there's "clearly a code change required" - this is more of a nice-to-have optimization. This comment should be deleted. It references cross-file issues (deployment template), suggests a refactoring that goes beyond the scope of the actual change (the author reorganized existing code but didn't introduce new duplication), and isn't clearly actionable. The rules state to only comment when there's clearly a code change required, and this is more of an optional optimization.

Workflow ID: wflow_FezQEThVB4uxqSsU

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
helm/templates/deployment.yaml (1)

145-155: Consider dedicated configuration for startupProbe.

The startupProbe currently reuses values from .Values.probes.readiness.* (e.g., line 150), which may not be optimal for startup scenarios. Startup probes typically require different timing characteristics than readiness probes.

💡 Suggested improvement

Define dedicated startup probe configuration in values.yaml:

probes:
  startup:
    initialDelaySeconds: 0
    periodSeconds: 5
    timeoutSeconds: 5
    successThreshold: 1
    failureThreshold: 30  # Allow longer startup time
  readiness:
    # ... existing config

Then reference these in the template:

 {{- if .Values.management.enabled }}
 startupProbe:
   httpGet:
     path: /health
     port: management
-  initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds | default 10 }}
-  periodSeconds: {{ .Values.probes.readiness.periodSeconds | default 10 }}
-  timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds | default 5 }}
-  successThreshold: {{ .Values.probes.readiness.successThreshold | default 1 }}
-  failureThreshold: {{ .Values.probes.readiness.failureThreshold | default 3 }}
+  initialDelaySeconds: {{ .Values.probes.startup.initialDelaySeconds | default 0 }}
+  periodSeconds: {{ .Values.probes.startup.periodSeconds | default 5 }}
+  timeoutSeconds: {{ .Values.probes.startup.timeoutSeconds | default 5 }}
+  successThreshold: {{ .Values.probes.startup.successThreshold | default 1 }}
+  failureThreshold: {{ .Values.probes.startup.failureThreshold | default 30 }}
 {{- end }}
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 36cf914 and b78f193.

📒 Files selected for processing (2)
  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-01T12:50:14.957Z
Learnt from: avivhalfon
Repo: traceloop/hub PR: 80
File: helm/templates/migration-job.yaml:25-55
Timestamp: 2026-01-01T12:50:14.957Z
Learning: In helm/templates/migration-job.yaml for the traceloop/hub project, the `.Values.management.database.existingSecret` field is intentionally required without a default value, as it's a mandatory configuration in values.yaml for database credentials.

Applied to files:

  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (rust)
🔇 Additional comments (3)
helm/templates/deployment.yaml (1)

156-175: The volume configuration logic is correct.

The conditional mounting of config volumes only in OSS mode (when management.enabled is false) properly reflects the architectural difference between the two modes.

helm/templates/migration-job.yaml (2)

25-58: Environment variable ordering and configuration structure look correct.

The environment variables are properly ordered for Kubernetes $(VAR) substitution:

  1. POSTGRES_DATABASE_HOST, POSTGRES_DATABASE_PORT, POSTGRES_DATABASE_NAME are defined first
  2. DB_PASSWORD is defined before DATABASE_URL
  3. DATABASE_URL references all previous variables

The ConfigMap support pattern is consistent with deployment.yaml, and SSL mode is properly included for secure connections.


1-63: Migration job configuration is well-structured.

The job template properly:

  • Gates execution behind management.enabled
  • Uses Helm hooks for pre-install/pre-upgrade execution
  • Configures appropriate timeouts and retry limits
  • Maintains consistency with the deployment template for database configuration

name: {{ .Values.management.database.existingSecret }}
key: {{ .Values.management.database.passwordKey }}
- name: DATABASE_URL
value: "postgresql://{{ .Values.management.database.user }}:$(DB_PASSWORD)@$(POSTGRES_DATABASE_HOST):$(POSTGRES_DATABASE_PORT)/$(POSTGRES_DATABASE_NAME)?sslmode={{ .Values.management.database.sslMode }}"
Copy link
Member

Choose a reason for hiding this comment

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

usually user is also a configmap, make it like others

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 3a82d0a in 50 seconds. Click for details.
  • Reviewed 68 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. helm/templates/deployment.yaml:99
  • Draft comment:
    POSTGRES_DATABASE_USER is added and DATABASE_URL now references it. Ensure this change is intentional and that the configMap alternative properly provides the user value.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
2. helm/templates/migration-job.yaml:52
  • Draft comment:
    The migration job now mirrors the deployment with POSTGRES_DATABASE_USER and DATABASE_URL using the new env var. Verify that the key names in the configMap (if used) are correct.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. helm/values.yaml:124
  • Draft comment:
    A new 'user' key is added in management.database with default 'postgresUser'. Ensure documentation and downstream usage align with this change.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_3sH7VAbO6kwdus2m

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @helm/values.yaml:
- Around line 119-127: Add a comment block above the configMapName and
configMapKeys entries that documents that configMapName enables reading DB
connection details from an existing ConfigMap (when empty the chart uses direct
values from values.yaml or secrets, when populated the chart reads connection
fields from the named ConfigMap), and list each mapping in configMapKeys (host →
key in ConfigMap for DB host, port → key for DB port, name → key for DB database
name, user → key for DB user) plus note interaction with existingSecret and
passwordKey (password still read from the named secret key unless overridden).
Ensure the comment clearly states expected behavior when configMapName is empty
vs populated and how to map custom key names via configMapKeys.
🧹 Nitpick comments (3)
helm/templates/migration-job.yaml (1)

25-60: Consider a helper template to reduce duplication.

The ConfigMap-or-value pattern is repeated four times for POSTGRES_DATABASE_HOST, PORT, NAME, and USER. This creates maintenance overhead when the pattern needs to change. doronkopit5's past feedback noted: "you still define twice POSTGRES_DATABASE_HOST, POSTGRES_DATABASE_PORT, POSTGRES_DATABASE_NAME."

While Helm doesn't support looping over environment variables directly, you could define a named template in _helpers.tpl that takes the field name and config key as parameters to generate the conditional block. This would centralize the pattern in one place.

💡 Example helper template approach

In _helpers.tpl:

{{- define "app.dbEnvVar" -}}
{{- $field := .field -}}
{{- $configKey := .configKey -}}
{{- $root := .root -}}
- name: POSTGRES_DATABASE_{{ upper $field }}
  {{- if $root.Values.management.database.configMapName }}
  valueFrom:
    configMapKeyRef:
      name: {{ $root.Values.management.database.configMapName }}
      key: {{ index $root.Values.management.database.configMapKeys $configKey }}
  {{- else }}
  value: {{ index $root.Values.management.database $field | quote }}
  {{- end }}
{{- end -}}

Then use it:

{{- include "app.dbEnvVar" (dict "field" "host" "configKey" "host" "root" .) }}
{{- include "app.dbEnvVar" (dict "field" "port" "configKey" "port" "root" .) }}
{{- include "app.dbEnvVar" (dict "field" "name" "configKey" "name" "root" .) }}
{{- include "app.dbEnvVar" (dict "field" "user" "configKey" "user" "root" .) }}
helm/templates/deployment.yaml (2)

72-107: Consider a helper template to reduce duplication (consistent with migration-job.yaml).

This file has the same ConfigMap-or-value pattern repeated four times, identical to helm/templates/migration-job.yaml lines 25-60. Keeping these duplications in sync across files increases maintenance burden. As noted in the migration-job review, a helper template in _helpers.tpl could centralize this pattern for both files.


154-164: Confirm management /health endpoint and add dedicated startup probe configuration.

The management API correctly exposes a /health endpoint on the management port (verified in src/management/mod.rs), so the endpoint path in line 157 is correct.

However, the startup probe reuses readiness probe values (lines 159-163) without dedicated configuration. Consider adding probes.startup.* values in values.yaml with higher failureThreshold and periodSeconds to allow sufficient time for initial startup (database connection, configuration polling, etc.).

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b78f193 and 3a82d0a.

📒 Files selected for processing (3)
  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
  • helm/values.yaml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2026-01-01T12:50:14.957Z
Learnt from: avivhalfon
Repo: traceloop/hub PR: 80
File: helm/templates/migration-job.yaml:25-55
Timestamp: 2026-01-01T12:50:14.957Z
Learning: In helm/templates/migration-job.yaml for the traceloop/hub project, the `.Values.management.database.existingSecret` field is intentionally required without a default value, as it's a mandatory configuration in values.yaml for database credentials.

Applied to files:

  • helm/values.yaml
  • helm/templates/deployment.yaml
  • helm/templates/migration-job.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (rust)

Comment on lines +119 to 127
configMapName: ""
configMapKeys:
host: "postgresHost"
port: "postgresPort"
name: "postgresDatabase"
user: "postgresUser"
existingSecret: "hub-postgres-secret"
passwordKey: "password"

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Document ConfigMap-based database configuration.

The configMapName and configMapKeys fields lack documentation. Users won't understand when or how to use ConfigMap-based database configuration versus direct values. Past review feedback from doronkopit5 noted that ConfigMap support "didnt even mention in the values.yaml its supported."

Add a comment block explaining:

  • Purpose of configMapName (enables reading DB connection details from an existing ConfigMap)
  • Behavior when configMapName is empty vs populated
  • The meaning and mapping of each key in configMapKeys
📝 Suggested documentation addition
     user: "hub_user"
     sslMode: "require"
+    # Optional: Use an existing ConfigMap for database connection details
+    # When configMapName is set, host/port/name/user are read from the ConfigMap
+    # instead of using the direct values above. Leave empty to use direct values.
     configMapName: ""
+    # Keys to lookup in the ConfigMap when configMapName is set
     configMapKeys:
       host: "postgresHost"
       port: "postgresPort"
       name: "postgresDatabase"
       user: "postgresUser"
+    # Secret containing the database password (required)
     existingSecret: "hub-postgres-secret"
     passwordKey: "password"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In @helm/values.yaml around lines 119 - 127, Add a comment block above the
configMapName and configMapKeys entries that documents that configMapName
enables reading DB connection details from an existing ConfigMap (when empty the
chart uses direct values from values.yaml or secrets, when populated the chart
reads connection fields from the named ConfigMap), and list each mapping in
configMapKeys (host → key in ConfigMap for DB host, port → key for DB port, name
→ key for DB database name, user → key for DB user) plus note interaction with
existingSecret and passwordKey (password still read from the named secret key
unless overridden). Ensure the comment clearly states expected behavior when
configMapName is empty vs populated and how to map custom key names via
configMapKeys.

@avivhalfon avivhalfon merged commit 042d254 into main Jan 7, 2026
6 checks passed
@avivhalfon avivhalfon deleted the ah/TLP-1189/chore-fix-helm-management-mode branch January 7, 2026 13:13
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