Skip to content

feat(hub): replace redis subchart with self-managed Redis - #169

Open
maxju wants to merge 2 commits into
developfrom
feat/self-hosted-redis
Open

feat(hub): replace redis subchart with self-managed Redis#169
maxju wants to merge 2 commits into
developfrom
feat/self-hosted-redis

Conversation

@maxju

@maxju maxju commented Aug 10, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added a configurable, self-managed Redis deployment with optional persistent storage and custom service ports.
    • Added support for shared Redis host configuration across platform components.
    • Hub Adapter now receives message broker, S3, and FHIR connection settings when applicable.
    • Added support for SeaweedFS name overrides and updated storage configuration options.
  • Bug Fixes

    • Added validation for Harbor settings and SeaweedFS URL prefixes.
    • Improved Redis connectivity configuration and service discovery.
  • Chores

    • Updated platform component image versions.
    • Renamed the Hub client secret to use clearer terminology.

@maxju maxju added the deploy/preview Deploy 1 hub and 2 nodes to the preview cluster label Aug 10, 2026
@maxju
maxju changed the base branch from master to develop August 10, 2026 15:08
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 16d2081b-0aef-43b6-8b82-e66737da2c8f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Flame Hub replaces its Redis dependency with an in-chart Redis deployment and configurable connectivity. Harbor settings gain validation. Flame Node updates service environment variables, Secret naming, URL validation, ingress values, and component image versions.

Changes

Flame platform chart updates

Layer / File(s) Summary
Redis deployment and configuration
charts/flame-hub/Chart.yaml, charts/flame-hub/values.yaml, charts/flame-hub/templates/_helpers.tpl, charts/flame-hub/templates/redis/*
Flame Hub replaces the Bitnami Redis dependency with a configurable Redis StatefulSet and headless Service.
Redis connection wiring
charts/flame-hub/templates/credentials-secret.yaml, charts/flame-hub/templates/server-*/deployment.yaml, charts/third-party/authup/*
Flame Hub services and Authup use configurable Redis hosts and ports.
Harbor and SeaweedFS validation
charts/flame-hub/templates/_helpers.tpl, charts/flame-hub/templates/_urls.tpl, charts/flame-hub/templates/harbor/secret.yaml, charts/flame-hub/README.md
Harbor exposure and credential references are validated. Harbor Secret documentation reflects custom Secret usage. SeaweedFS supports fullnameOverride.
Flame Node integration updates
charts/flame-node/templates/*, charts/flame-node/values.yaml
Flame Node updates Secret naming, service endpoint variables, SeaweedFS URL validation, ingress values, and component image tags.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: hub

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing the Redis subchart with a self-managed Redis deployment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/self-hosted-redis

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@privateaim-flux

privateaim-flux Bot commented Aug 10, 2026

Copy link
Copy Markdown

Flux Status

ℹ️ HelmRelease/pr-169-hub/hub

Helm install succeeded for release pr-169-hub/hub.v1 with chart flame-hub@0.1.0+00cde42b6595

Metadata:

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/flame-hub/templates/_helpers.tpl`:
- Around line 94-96: Separate the consumer Redis host from the chart-managed
Service name: in charts/flame-hub/templates/_helpers.tpl lines 94-96, retain
flameHub.redis.host for connectivity and add a fixed chart-managed Service-name
helper; in charts/flame-hub/values.yaml lines 72-77, add and document
redis.enabled: false for external Redis; in
charts/flame-hub/templates/redis/service.yaml line 4 and
charts/flame-hub/templates/redis/statefulset.yaml line 8, use the new
Service-name helper and conditionally skip both resources when redis.enabled is
false.

In `@charts/flame-hub/templates/_urls.tpl`:
- Around line 175-178: Update the Harbor validation near $exposeType to also
reject configurations where harbor.expose.type is clusterIP and
harbor.expose.tls.enabled is false, since wait-for-harbor expects HTTPS.
Preserve the existing rejection for non-clusterIP exposure and provide a clear
failure message directing users to enable TLS or configure the init container
for the selected protocol.

In `@charts/third-party/authup/values.yaml`:
- Around line 41-44: Propagate the effective Redis port into Authup: add a
templatable redis.port value in charts/third-party/authup/values.yaml#L41-L44,
pass the configured Redis service port from
charts/flame-hub/values.yaml#L203-L205 in a way available to the Authup
subchart, and update both hardcoded 6379 references in
charts/third-party/authup/templates/deployment.yaml#L32 and `#L78` to use
redis.port.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bc9fc807-8c58-4071-b05c-edb8a879c115

📥 Commits

Reviewing files that changed from the base of the PR and between 0c32c1b and 209fe6a.

📒 Files selected for processing (21)
  • charts/flame-hub/Chart.yaml
  • charts/flame-hub/README.md
  • charts/flame-hub/templates/_helpers.tpl
  • charts/flame-hub/templates/_urls.tpl
  • charts/flame-hub/templates/credentials-secret.yaml
  • charts/flame-hub/templates/harbor/secret.yaml
  • charts/flame-hub/templates/redis/service.yaml
  • charts/flame-hub/templates/redis/statefulset.yaml
  • charts/flame-hub/templates/server-core/deployment.yaml
  • charts/flame-hub/templates/server-messenger/deployment.yaml
  • charts/flame-hub/templates/server-storage/deployment.yaml
  • charts/flame-hub/templates/server-telemetry/deployment.yaml
  • charts/flame-hub/values.yaml
  • charts/flame-node/templates/_helpers.tpl
  • charts/flame-node/templates/data-store/httproute.yaml
  • charts/flame-node/templates/hub-adapter/deployment.yaml
  • charts/flame-node/templates/secret.yaml
  • charts/flame-node/templates/storage-service/deployment.yaml
  • charts/flame-node/values.yaml
  • charts/third-party/authup/templates/deployment.yaml
  • charts/third-party/authup/values.yaml
💤 Files with no reviewable changes (1)
  • charts/flame-hub/Chart.yaml

Comment on lines +94 to +96
{{- define "flameHub.redis.host" -}}
{{- $redis := (((.Values.global).flameHub).redis) | default dict -}}
{{- $redis.host | default (printf "%s-redis" .Release.Name) -}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Separate the Redis connection host from the chart-managed Service name.

If global.flameHub.redis.host is set to external-redis, Line 4 creates a local Service with that name and selectors for this chart’s Redis Pod. Consumers then resolve the local Service instead of the intended external Redis. If the external endpoint is an FQDN, Kubernetes rejects it as a Service name.

  • charts/flame-hub/templates/_helpers.tpl#L94-L96: keep flameHub.redis.host for consumer connectivity only. Add a separate fixed chart-managed Service-name helper.
  • charts/flame-hub/values.yaml#L72-L77: add an explicit external-Redis mode, such as redis.enabled: false, and document that mode.
  • charts/flame-hub/templates/redis/service.yaml#L4-L4: use the chart-managed Service-name helper. Do not render this Service for external Redis.
  • charts/flame-hub/templates/redis/statefulset.yaml#L8-L8: use the chart-managed Service-name helper. Do not render this StatefulSet for external Redis.
📍 Affects 4 files
  • charts/flame-hub/templates/_helpers.tpl#L94-L96 (this comment)
  • charts/flame-hub/values.yaml#L72-L77
  • charts/flame-hub/templates/redis/service.yaml#L4-L4
  • charts/flame-hub/templates/redis/statefulset.yaml#L8-L8
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/flame-hub/templates/_helpers.tpl` around lines 94 - 96, Separate the
consumer Redis host from the chart-managed Service name: in
charts/flame-hub/templates/_helpers.tpl lines 94-96, retain flameHub.redis.host
for connectivity and add a fixed chart-managed Service-name helper; in
charts/flame-hub/values.yaml lines 72-77, add and document redis.enabled: false
for external Redis; in charts/flame-hub/templates/redis/service.yaml line 4 and
charts/flame-hub/templates/redis/statefulset.yaml line 8, use the new
Service-name helper and conditionally skip both resources when redis.enabled is
false.

Comment on lines +41 to +44
redis:
# Redis host authup connects to. Rendered with tpl, so a parent chart may pass a
# helper, e.g. '{{ include "flameHub.redis.host" . }}'. Defaults to <release>-redis.
host: ""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Propagate the effective Redis port into Authup.

If redis.service.port differs from 6379, Hub workloads and redis-connection-string use the configured port, but Authup’s init container always waits on port 6379. Authup never starts in that configuration.

  • charts/third-party/authup/values.yaml#L41-L44: add a templatable redis.port value.
  • charts/flame-hub/values.yaml#L203-L205: pass the effective Redis port through globally shared values or a helper that is valid in the Authup subchart context.
  • charts/third-party/authup/templates/deployment.yaml#L32-L32: replace hardcoded 6379 with redis.port.
  • charts/third-party/authup/templates/deployment.yaml#L78-L78: replace hardcoded 6379 with redis.port.
📍 Affects 3 files
  • charts/third-party/authup/values.yaml#L41-L44 (this comment)
  • charts/flame-hub/values.yaml#L203-L205
  • charts/third-party/authup/templates/deployment.yaml#L32-L32
  • charts/third-party/authup/templates/deployment.yaml#L78-L78
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/third-party/authup/values.yaml` around lines 41 - 44, Propagate the
effective Redis port into Authup: add a templatable redis.port value in
charts/third-party/authup/values.yaml#L41-L44, pass the configured Redis service
port from charts/flame-hub/values.yaml#L203-L205 in a way available to the
Authup subchart, and update both hardcoded 6379 references in
charts/third-party/authup/templates/deployment.yaml#L32 and `#L78` to use
redis.port.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/flame-hub/templates/_helpers.tpl`:
- Around line 94-96: Separate the consumer Redis host from the chart-managed
Service name: in charts/flame-hub/templates/_helpers.tpl lines 94-96, retain
flameHub.redis.host for connectivity and add a fixed chart-managed Service-name
helper; in charts/flame-hub/values.yaml lines 72-77, add and document
redis.enabled: false for external Redis; in
charts/flame-hub/templates/redis/service.yaml line 4 and
charts/flame-hub/templates/redis/statefulset.yaml line 8, use the new
Service-name helper and conditionally skip both resources when redis.enabled is
false.

In `@charts/flame-hub/templates/_urls.tpl`:
- Around line 175-178: Update the Harbor validation near $exposeType to also
reject configurations where harbor.expose.type is clusterIP and
harbor.expose.tls.enabled is false, since wait-for-harbor expects HTTPS.
Preserve the existing rejection for non-clusterIP exposure and provide a clear
failure message directing users to enable TLS or configure the init container
for the selected protocol.

In `@charts/third-party/authup/values.yaml`:
- Around line 41-44: Propagate the effective Redis port into Authup: add a
templatable redis.port value in charts/third-party/authup/values.yaml#L41-L44,
pass the configured Redis service port from
charts/flame-hub/values.yaml#L203-L205 in a way available to the Authup
subchart, and update both hardcoded 6379 references in
charts/third-party/authup/templates/deployment.yaml#L32 and `#L78` to use
redis.port.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bc9fc807-8c58-4071-b05c-edb8a879c115

📥 Commits

Reviewing files that changed from the base of the PR and between 0c32c1b and 209fe6a.

📒 Files selected for processing (21)
  • charts/flame-hub/Chart.yaml
  • charts/flame-hub/README.md
  • charts/flame-hub/templates/_helpers.tpl
  • charts/flame-hub/templates/_urls.tpl
  • charts/flame-hub/templates/credentials-secret.yaml
  • charts/flame-hub/templates/harbor/secret.yaml
  • charts/flame-hub/templates/redis/service.yaml
  • charts/flame-hub/templates/redis/statefulset.yaml
  • charts/flame-hub/templates/server-core/deployment.yaml
  • charts/flame-hub/templates/server-messenger/deployment.yaml
  • charts/flame-hub/templates/server-storage/deployment.yaml
  • charts/flame-hub/templates/server-telemetry/deployment.yaml
  • charts/flame-hub/values.yaml
  • charts/flame-node/templates/_helpers.tpl
  • charts/flame-node/templates/data-store/httproute.yaml
  • charts/flame-node/templates/hub-adapter/deployment.yaml
  • charts/flame-node/templates/secret.yaml
  • charts/flame-node/templates/storage-service/deployment.yaml
  • charts/flame-node/values.yaml
  • charts/third-party/authup/templates/deployment.yaml
  • charts/third-party/authup/values.yaml
💤 Files with no reviewable changes (1)
  • charts/flame-hub/Chart.yaml
🛑 Comments failed to post (1)
charts/flame-hub/templates/_urls.tpl (1)

175-178: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Reject HTTP-only Harbor configurations.

If harbor.expose.type is clusterIP and harbor.expose.tls.enabled is false, this validation passes. The wait-for-harbor init container always calls harbor.internalHost with https:// (Lines 56-62 in charts/flame-hub/templates/server-core/deployment.yaml). (raw.githubusercontent.com) The pod then waits forever.

Fail when TLS is disabled, or make the init container use the configured protocol.

Proposed validation
 {{- if ne $exposeType "clusterIP" -}}
 {{- fail (printf "harbor.expose.type=%q is not supported by this chart: harbor.internalHost (used by the wait-for-harbor init container and in-cluster access) only resolves the clusterIP Service. Set harbor.expose.type=clusterIP, or use externalHarbor." $exposeType) -}}
 {{- end -}}
+{{- if not .Values.harbor.expose.tls.enabled -}}
+{{- fail "harbor.expose.tls.enabled must be true when Harbor is accessed through harbor.internalHost." -}}
+{{- end -}}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

{{- $exposeType := .Values.harbor.expose.type | default "clusterIP" -}}
{{- if ne $exposeType "clusterIP" -}}
{{- fail (printf "harbor.expose.type=%q is not supported by this chart: harbor.internalHost (used by the wait-for-harbor init container and in-cluster access) only resolves the clusterIP Service. Set harbor.expose.type=clusterIP, or use externalHarbor." $exposeType) -}}
{{- end -}}
{{- if not .Values.harbor.expose.tls.enabled -}}
{{- fail "harbor.expose.tls.enabled must be true when Harbor is accessed through harbor.internalHost." -}}
{{- end -}}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/flame-hub/templates/_urls.tpl` around lines 175 - 178, Update the
Harbor validation near $exposeType to also reject configurations where
harbor.expose.type is clusterIP and harbor.expose.tls.enabled is false, since
wait-for-harbor expects HTTPS. Preserve the existing rejection for non-clusterIP
exposure and provide a clear failure message directing users to enable TLS or
configure the init container for the selected protocol.

@privateaim-flux

privateaim-flux Bot commented Aug 10, 2026

Copy link
Copy Markdown

Flux Status

ℹ️ HelmRelease/pr-169-node-bunny/node

Helm install succeeded for release pr-169-node-bunny/node.v1 with chart flame-node@0.1.0+00cde42b6595

Metadata:

@privateaim-flux

privateaim-flux Bot commented Aug 10, 2026

Copy link
Copy Markdown

Flux Status

ℹ️ HelmRelease/pr-169-node-bear/node

Helm install succeeded for release pr-169-node-bear/node.v1 with chart flame-node@0.1.0+00cde42b6595

Metadata:

@maxju maxju added deploy/preview Deploy 1 hub and 2 nodes to the preview cluster and removed deploy/preview Deploy 1 hub and 2 nodes to the preview cluster labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deploy/preview Deploy 1 hub and 2 nodes to the preview cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant