Skip to content

Commit 9ca7bb5

Browse files
feat(helm): Add comprehensive configuration support for ImmuDB
- Add environment variables configuration support - Add TOML configuration file support via ConfigMap - Add command line arguments support - Add S3 storage configuration capabilities - Add secure credential management via Kubernetes secrets - Bump chart version to 1.9.8 Resolves #2028
1 parent 97208c9 commit 9ca7bb5

File tree

4 files changed

+102
-2
lines changed

4 files changed

+102
-2
lines changed

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: immudb
33
description: The immutable database
44
type: application
5-
version: 1.9.7
5+
version: 1.9.8
66
appVersion: "1.9.7"

helm/templates/configmap.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{{- if .Values.config.enabled }}
2+
apiVersion: v1
3+
kind: ConfigMap
4+
metadata:
5+
name: {{ include "immudb.fullname" . }}-config
6+
labels:
7+
{{- include "immudb.labels" . | nindent 4 }}
8+
data:
9+
immudb.toml: |
10+
{{ .Values.config.data | indent 4 }}
11+
{{- end }}

helm/templates/statefulset.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,27 @@ spec:
3232
- name: immudb-storage
3333
persistentVolumeClaim:
3434
claimName: {{ include "immudb.fullname" . }}
35+
{{- if .Values.config.enabled }}
36+
- name: immudb-config
37+
configMap:
38+
name: {{ include "immudb.fullname" . }}-config
39+
{{- end }}
3540
containers:
3641
- name: {{ .Chart.Name }}
3742
securityContext:
3843
{{- toYaml .Values.securityContext | nindent 12 }}
3944
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
4045
imagePullPolicy: {{ .Values.image.pullPolicy }}
46+
{{- if or .Values.args .Values.config.enabled }}
47+
command: ["/usr/sbin/immudb"]
48+
args:
49+
{{- if .Values.config.enabled }}
50+
- --config=/etc/immudb/immudb.toml
51+
{{- end }}
52+
{{- range .Values.args }}
53+
- {{ . | quote }}
54+
{{- end }}
55+
{{- end }}
4156
ports:
4257
- name: http
4358
containerPort: 8080
@@ -57,14 +72,23 @@ spec:
5772
httpGet:
5873
path: /readyz
5974
port: metrics
60-
{{- if $.Values.adminPassword }}
6175
env:
76+
{{- if $.Values.adminPassword }}
6277
- name: IMMUDB_ADMIN_PASSWORD
6378
valueFrom:
6479
secretKeyRef:
6580
name: {{ include "immudb.fullname" . }}-credentials
6681
key: immudb-admin-password
6782
{{- end}}
83+
{{- range .Values.env }}
84+
- name: {{ .name }}
85+
{{- if .value }}
86+
value: {{ .value | quote }}
87+
{{- else if .valueFrom }}
88+
valueFrom:
89+
{{- toYaml .valueFrom | nindent 14 }}
90+
{{- end }}
91+
{{- end }}
6892
resources:
6993
{{- toYaml .Values.resources | nindent 12 }}
7094
volumeMounts:
@@ -73,6 +97,11 @@ spec:
7397
{{- if $.Values.volumeSubPath.enabled }}
7498
subPath: {{ $.Values.volumeSubPath.path | quote }}
7599
{{- end}}
100+
{{- if .Values.config.enabled }}
101+
- mountPath: /etc/immudb
102+
name: immudb-config
103+
readOnly: true
104+
{{- end }}
76105
{{- with .Values.nodeSelector }}
77106
nodeSelector:
78107
{{- toYaml . | nindent 8 }}

helm/values.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,66 @@ volume:
1818
size: 5Gi
1919
adminPassword: ""
2020

21+
# ImmuDB Configuration Options
22+
# You can configure immudb using three methods:
23+
# 1. Environment variables (env)
24+
# 2. Configuration file (config)
25+
# 3. Command line arguments (args)
26+
27+
# Environment variables for immudb
28+
# All immudb configuration can be set via environment variables by prefixing with "IMMUDB_"
29+
# Examples:
30+
# - IMMUDB_PORT=3323
31+
# - IMMUDB_ADDRESS=0.0.0.0
32+
# - IMMUDB_DEVMODE=false
33+
env: []
34+
# - name: IMMUDB_PORT
35+
# value: "3323"
36+
# - name: IMMUDB_DEVMODE
37+
# value: "false"
38+
# - name: IMMUDB_PGSQL_SERVER
39+
# value: "true"
40+
# - name: IMMUDB_S3_STORAGE
41+
# value: "true"
42+
# - name: IMMUDB_S3_BUCKET_NAME
43+
# value: "my-immudb-bucket"
44+
45+
# Configuration file for immudb
46+
# If enabled, creates a ConfigMap with immudb.toml configuration file
47+
# This will be mounted to /etc/immudb/immudb.toml
48+
config:
49+
enabled: false
50+
# Configuration in TOML format
51+
# See https://docs.immudb.io/master/running/configuration.html for all options
52+
data: |
53+
dir = "/var/lib/immudb"
54+
network = "tcp"
55+
address = "0.0.0.0"
56+
port = 3322
57+
dbname = "immudb"
58+
auth = true
59+
devmode = false
60+
pgsql-server = true
61+
pgsql-server-port = 5432
62+
metrics-server = true
63+
metrics-server-port = 9497
64+
web-server = true
65+
web-server-port = 8080
66+
# S3 configuration example:
67+
# s3-storage = true
68+
# s3-bucket-name = "my-immudb-bucket"
69+
# s3-endpoint = "s3.amazonaws.com"
70+
# s3-location = "us-east-1"
71+
72+
# Command line arguments for immudb
73+
# These will be passed directly to the immudb command
74+
# See `immudb --help` for all available options
75+
args: []
76+
# - "--devmode"
77+
# - "--pgsql-server=false"
78+
# - "--s3-storage"
79+
# - "--s3-bucket-name=my-immudb-bucket"
80+
2181
podAnnotations: {}
2282

2383
podSecurityContext:

0 commit comments

Comments
 (0)