Skip to content

Commit a799e90

Browse files
committed
operator-chart 0.2.7: replace nats subchart with natsURL string
0.2.6 was architecturally wrong — gating on nats.enabled would have created one NATS pod per module install. NATS lives once per cluster (deployed separately, e.g. via tinysystems-crd); every module's chart install gets a natsURL string pointing at the shared endpoint. Sets TINY_NATS_URL on the controller-manager pod when natsURL is non-empty. Empty = SDK v0.10.23+ falls back to gRPC transport (no behavior change vs older charts).
1 parent d8a89ab commit a799e90

4 files changed

Lines changed: 19 additions & 63 deletions

File tree

charts/tinysystems-operator/Chart.lock

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ dependencies:
55
- name: postgresql
66
repository: https://charts.bitnami.com/bitnami
77
version: 15.5.20
8-
- name: nats
9-
repository: https://nats-io.github.io/k8s/helm/charts/
10-
version: 2.14.0
11-
digest: sha256:d074913592f5bc254374360e3361b6c16d87e7e57588f2d1cbe9afc1dc503883
12-
generated: "2026-05-29T18:26:30.084538+01:00"
8+
digest: sha256:e2716e3030e7c7479cce7e86e619f8e8e36bf38e9503b1a3653d80e79dcb7ea5
9+
generated: "2026-05-29T21:00:31.944215+01:00"

charts/tinysystems-operator/Chart.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: tinysystems-operator
33
description: TinySystems Operator Helm chart for Kubernetes
44
type: application
5-
version: 0.2.6
5+
version: 0.2.7
66
appVersion: "0.1.3"
77

88
# Curated bundles: third-party releases module authors can request
@@ -31,13 +31,4 @@ dependencies:
3131
repository: "https://charts.bitnami.com/bitnami"
3232
condition: pgvector.enabled
3333
alias: pgvector
34-
# NATS JetStream — infrastructure bundle for the SDK's eventual
35-
# JetStream-backed primitives (State KV, durable edge transport).
36-
# Default off; flip on with --set nats.enabled=true. When the SDK
37-
# version that uses NATS lands we'll flip this default to true and
38-
# bump operator-chart's major.
39-
- name: nats
40-
version: "2.14.0"
41-
repository: "https://nats-io.github.io/k8s/helm/charts/"
42-
condition: nats.enabled
4334

charts/tinysystems-operator/templates/deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ spec:
6363
value: {{ quote .Values.kubernetesClusterDomain }}
6464
- name: SELF_SERVICE_HOST
6565
value: {{ include "tinysystems-operator.fullname" . }}-manager-service:8483
66-
{{- if .Values.nats.enabled }}
67-
# NATS bundle is on — point the SDK at the in-cluster JetStream
68-
# broker. Service name is {release}-nats (from the nats subchart's
69-
# fullname helper), reached via in-namespace DNS.
66+
{{- if .Values.natsURL }}
67+
# Cross-module wire goes through this NATS endpoint. SDK
68+
# ≥ v0.10.23 reads TINY_NATS_URL and uses NATS subjects
69+
# instead of gRPC AddressPool. Empty = legacy gRPC.
7070
- name: TINY_NATS_URL
71-
value: "nats://{{ .Release.Name }}-nats:4222"
71+
value: {{ .Values.natsURL | quote }}
7272
{{- end }}
7373
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag | default .Chart.AppVersion }}
7474
imagePullPolicy: {{ .Values.controllerManager.manager.imagePullPolicy }}

charts/tinysystems-operator/values.yaml

Lines changed: 11 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -135,47 +135,15 @@ pgvector:
135135
persistence:
136136
size: 8Gi
137137

138-
# NATS — JetStream broker for the SDK's durable primitives. Off by
139-
# default; flip on with --set nats.enabled=true. When the SDK gains
140-
# JetStream-backed State / edges this default will flip to true.
138+
# NATS endpoint — when set, the SDK uses NATS for cross-module
139+
# messaging (TINY_NATS_URL plumbed to the controller-manager pod).
140+
# Empty = legacy gRPC AddressPool transport.
141141
#
142-
# Default config is a single-replica, file-storage JetStream node
143-
# sized for a typical small-to-medium cluster. Bump to 3-node RAFT
144-
# by setting --set nats.config.cluster.enabled=true,nats.statefulSet.merge.spec.replicas=3.
145-
nats:
146-
enabled: false
147-
config:
148-
cluster:
149-
enabled: false
150-
jetstream:
151-
enabled: true
152-
fileStore:
153-
enabled: true
154-
pvc:
155-
enabled: true
156-
size: 20Gi
157-
memoryStore:
158-
enabled: false
159-
statefulSet:
160-
merge:
161-
spec:
162-
replicas: 1
163-
container:
164-
merge:
165-
resources:
166-
requests:
167-
cpu: 100m
168-
memory: 256Mi
169-
limits:
170-
cpu: 500m
171-
memory: 512Mi
172-
service:
173-
merge:
174-
spec:
175-
type: ClusterIP
176-
reloader:
177-
enabled: false
178-
natsBox:
179-
enabled: false
180-
promExporter:
181-
enabled: false
142+
# Each cluster runs ONE NATS instance (deployed separately, e.g. via
143+
# tinysystems-crd or an admin's choice). Every module's chart install
144+
# points its natsURL at the same endpoint. Subjects route messages —
145+
# no per-module broker.
146+
#
147+
# Example:
148+
# --set natsURL=nats://nats.tinysystems-system.svc.cluster.local:4222
149+
natsURL: ""

0 commit comments

Comments
 (0)