-
Notifications
You must be signed in to change notification settings - Fork 32
[TimescaleDB] Replace TDEngine with TimescaleDB for model monitoring #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
d0793e7
b00d396
dae6292
874c470
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,7 +48,7 @@ pipelines: | |
| kube-prometheus-stack: | ||
| enabled: false | ||
|
|
||
| tdengine: | ||
| timescaledb: | ||
| enabled: false | ||
|
|
||
| kafka: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 }} | ||
|
|
@@ -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 }} | ||
| {{- end }} | ||
|
Comment on lines
+310
to
312
|
||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
| 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 | ||||||||||||
|
||||||||||||
| 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. |
| 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 }} |
There was a problem hiding this comment.
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.