Skip to content

Commit 6520aec

Browse files
committed
fix(kontinuous): deploy Valkey via a direct Helm dependency
Drop the .kontinuous/charts/valkey wrapper subchart and alias hack. Declare the upstream valkey-io/valkey-helm chart directly as a Helm dependency in .kontinuous/Chart.yaml, which is the canonical kontinuous pattern for external charts. Values now pass straight through to the upstream chart — no 'server:' nesting, labels read 'app.kubernetes.io/name: valkey' (not 'server'). Fixes the connection timeouts observed in the app pod: the previous wrapper produced a subchart whose service/pod labels were shifted by the alias, which could leave endpoints out of sync with the service selector depending on kontinuous's build order. Also drop stale 'Redis-compatible' wording from docs/comments.
1 parent 0c0a9c8 commit 6520aec

8 files changed

Lines changed: 46 additions & 71 deletions

File tree

.kontinuous/Chart.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dependencies:
2+
- name: valkey
3+
repository: https://valkey.io/valkey-helm
4+
version: 0.9.4

.kontinuous/charts/valkey/Chart.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.kontinuous/charts/valkey/values.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.kontinuous/env/prod/values.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,18 @@ app:
1818
memory: 2G
1919

2020
valkey:
21-
server:
22-
replica:
23-
enabled: true
24-
replicas: 2
25-
persistence:
26-
size: 1Gi
27-
podDisruptionBudget:
28-
enabled: true
29-
maxUnavailable: 1
30-
resources:
31-
requests:
32-
cpu: 100m
33-
memory: 256Mi
34-
limits:
35-
cpu: 1
36-
memory: 1Gi
21+
replica:
22+
enabled: true
23+
replicas: 2
24+
persistence:
25+
size: 1Gi
26+
podDisruptionBudget:
27+
enabled: true
28+
maxUnavailable: 1
29+
resources:
30+
requests:
31+
cpu: 100m
32+
memory: 256Mi
33+
limits:
34+
cpu: 1
35+
memory: 1Gi

.kontinuous/values.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,30 @@ app:
8888
pg:
8989
~chart: pg
9090

91-
# Valkey (Redis-compatible) cache.
92-
# Deployed via the project-local `valkey` wrapper chart (.kontinuous/charts/valkey)
93-
# which pulls the official valkey-io/valkey-helm chart as a dependency.
94-
# Base defaults live in the wrapper's values.yaml; per-env overrides below.
95-
valkey: {}
91+
# Valkey cache. Official valkey-io/valkey-helm chart pulled as a Helm dependency
92+
# from .kontinuous/Chart.yaml. Values below flow straight through to that chart.
93+
valkey:
94+
# Pin service name so VALKEY_URL (redis://valkey:6379) resolves in every namespace.
95+
fullnameOverride: valkey
96+
image:
97+
tag: "9.0.2"
98+
service:
99+
type: ClusterIP
100+
port: 6379
101+
# Standalone by default. Prod overrides to master/replica topology.
102+
replica:
103+
enabled: false
104+
dataStorage:
105+
enabled: false
106+
auth:
107+
enabled: false
108+
resources:
109+
requests:
110+
cpu: 50m
111+
memory: 128Mi
112+
limits:
113+
cpu: 500m
114+
memory: 512Mi
96115

97116
clamav:
98117
~chart: clamav

packages/app/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ MAIL_ENABLED="true"
2828
SMTP_HOST="localhost"
2929
SMTP_PORT="1025"
3030
MAIL_FROM="no-reply@egapro.local"
31-
# Valkey (Redis-compatible) cache — optional, app works without it (in-memory fallback)
31+
# Valkey cache — optional, app works without it (in-memory fallback)
3232
VALKEY_URL="redis://localhost:6379"

packages/app/cache-handler.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-check
22
/**
3-
* Custom Next.js cache handler backed by Valkey (Redis-compatible).
3+
* Custom Next.js cache handler backed by Valkey.
44
*
55
* Implements the legacy cacheHandler interface (get, set, revalidateTag, resetRequestCache).
66
* Used for ISR pages, fetch cache, route handlers, and image optimization.

packages/app/src/env.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export const env = createEnv({
8989
SMTP_USER: z.string().optional(),
9090
SMTP_PASS: z.string().optional(),
9191
MAIL_FROM: z.string().default("no-reply@egapro.local"),
92-
// Valkey (Redis-compatible) cache URL — optional. When absent, the custom
92+
// Valkey cache URL — optional. When absent, the custom
9393
// cache handler (cache-handler.cjs) gracefully degrades to no-op.
9494
// The handler reads process.env.VALKEY_URL directly (it runs outside
9595
// the app module graph), but we declare it here for validation and docs.

0 commit comments

Comments
 (0)