Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/mlrun-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: mlrun-ce
version: 0.10.1-rc3
version: 0.10.1-rc4
description: MLRun Open Source Stack
home: https://iguazio.com
icon: https://www.iguazio.com/wp-content/uploads/2019/10/Iguazio-Logo.png
Expand Down
2 changes: 1 addition & 1 deletion charts/mlrun-ce/admin_installation_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pipelines:
kube-prometheus-stack:
enabled: false

tdengine:
timescaledb:
enabled: false

kafka:
Expand Down
42 changes: 26 additions & 16 deletions charts/mlrun-ce/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,25 @@ Model monitoring DSN
{{- end -}}
{{- end -}}

{{/*
TimescaleDB helpers
*/}}

{{/*
Expand the name of the chart.
*/}}
{{- define "mlrun-ce.tdengine.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- define "mlrun-ce.timescaledb.name" -}}
{{- default "timescaledb" .Values.timescaledb.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "mlrun-ce.tdengine.fullname" -}}
{{- if .Values.tdengine.fullnameOverride }}
{{- .Values.tdengine.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- define "mlrun-ce.timescaledb.fullname" -}}
{{- if .Values.timescaledb.fullnameOverride }}
{{- .Values.timescaledb.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.tdengine.nameOverride }}
{{- $name := default "timescaledb" .Values.timescaledb.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -277,27 +279,35 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "mlrun-ce.tdengine.chart" -}}
{{- define "mlrun-ce.timescaledb.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
TimescaleDB Common labels
*/}}
{{- define "mlrun-ce.tdengine.labels" -}}
helm.sh/chart: {{ include "mlrun-ce.tdengine.chart" . }}
{{ include "mlrun-ce.tdengine.selectorLabels" . }}
{{- define "mlrun-ce.timescaledb.labels" -}}
helm.sh/chart: {{ include "mlrun-ce.timescaledb.chart" . }}
{{ include "mlrun-ce.timescaledb.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
TimescaleDB Selector labels
*/}}
{{- define "mlrun-ce.tdengine.selectorLabels" -}}
app.kubernetes.io/name: {{ include "mlrun-ce.tdengine.name" . }}
{{- define "mlrun-ce.timescaledb.selectorLabels" -}}
app.kubernetes.io/name: {{ include "mlrun-ce.timescaledb.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: timescaledb
{{- end }}

{{/*
TimescaleDB connection string for MLRun model monitoring
*/}}
{{- define "mlrun-ce.timescaledb.connectionString" -}}
postgresql://{{ .Values.timescaledb.auth.username }}:{{ .Values.timescaledb.auth.password }}@{{ include "mlrun-ce.timescaledb.fullname" . }}:{{ .Values.timescaledb.service.port }}/{{ .Values.timescaledb.auth.database }}
Comment on lines +310 to +311
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The connection string template includes credentials in plaintext. Ensure that this template is only used internally within the cluster and that the resulting connection strings are not logged or exposed in error messages. Consider documenting proper usage to prevent credential leakage.

Copilot uses AI. Check for mistakes.
{{- end }}
Comment on lines +310 to 312
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The new TimescaleDB connection string helper is defined but doesn't appear to be integrated with the existing model monitoring DSN template at lines 242-250. The model monitoring DSN only handles MySQL case and custom DSN values, but doesn't automatically use TimescaleDB when it's enabled. Consider updating the mlrun-ce.mlrun.modelMonitoring.DSN template to include a case for TimescaleDB.

Copilot uses AI. Check for mistakes.

13 changes: 0 additions & 13 deletions charts/mlrun-ce/templates/tdengine/configmap.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions charts/mlrun-ce/templates/tdengine/service.yaml

This file was deleted.

149 changes: 0 additions & 149 deletions charts/mlrun-ce/templates/tdengine/statefulset.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions charts/mlrun-ce/templates/timescaledb/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.timescaledb.enabled -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "mlrun-ce.timescaledb.fullname" . }}-secret
labels:
{{- include "mlrun-ce.timescaledb.labels" . | nindent 4 }}
type: Opaque
Copy link

Copilot AI Dec 30, 2025

Choose a reason for hiding this comment

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

The TimescaleDB credentials are being stored in plaintext in a Secret using stringData. While Kubernetes Secrets provide base64 encoding at rest, consider documenting that users should enable encryption at rest for Secrets in their cluster, or provide guidance on using external secret management systems for production deployments.

Suggested change
type: Opaque
type: Opaque
# NOTE: The values below contain sensitive credentials. Kubernetes Secrets are only base64-encoded by
# default; for production clusters, ensure encryption at rest is enabled for Secrets or use an external
# secret management solution (for example, a CSI driver or External Secrets) to provide these values.

Copilot uses AI. Check for mistakes.
stringData:
username: {{ .Values.timescaledb.auth.username | quote }}
password: {{ .Values.timescaledb.auth.password | quote }}
{{- end }}
17 changes: 17 additions & 0 deletions charts/mlrun-ce/templates/timescaledb/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.timescaledb.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "mlrun-ce.timescaledb.fullname" . }}
labels:
{{- include "mlrun-ce.timescaledb.labels" . | nindent 4 }}
spec:
type: {{ .Values.timescaledb.service.type }}
ports:
- name: postgresql
port: {{ .Values.timescaledb.service.port }}
targetPort: postgresql
protocol: TCP
selector:
{{- include "mlrun-ce.timescaledb.selectorLabels" . | nindent 4 }}
{{- end }}
Loading