timescale / promscale

[DEPRECATED] Promscale is a unified metric and trace observability backend for Prometheus, Jaeger and OpenTelemetry built on PostgreSQL and TimescaleDB.
https://www.timescale.com/promscale
Apache License 2.0
1.33k stars 169 forks source link

Keys from Promscales connection secret are removed during helm upgrade #1474

Closed raphaelzoellner closed 2 years ago

raphaelzoellner commented 2 years ago

Currently the following lines in Promscales helm chart have negative side effects for helm upgrades: https://github.com/timescale/promscale/blob/master/deploy/helm-chart/templates/secret-connection.yaml#L33-L44

{{- /*
  During upgrades we want to preserve password and user set from other sources.
  This is done in `data` field as Secrets are base64 encoded and it is easier to not decode them and place in `stringData` field. 
*/}}
{{- if .Release.IsUpgrade }}
data:
  {{- if eq (.Values.connection.password | toString) "" }}
  PROMSCALE_DB_PASSWORD: {{ index (lookup "v1" "Secret" .Release.Namespace (include "promscale.fullname" .) ).data "PROMSCALE_DB_PASSWORD" }}
  {{- end }}
  {{- if eq (.Values.connection.user | toString) "" }}
  PROMSCALE_DB_USER: {{ index (lookup "v1" "Secret" .Release.Namespace (include "promscale.fullname" .) ).data "PROMSCALE_DB_USER" }}
  {{- end }}
{{- end }}

Effects:

I suggest to remove the lines and instead make use of the already added connectionSecretName in case a secret is provided by another source than this helm chart.

VineethReddy02 commented 2 years ago

cc @timescale/o11y-services

paulfantom commented 2 years ago

We've moved the helm chart to the other repository and simplified the Secret update procedure while changing it in tobs. Now it is easier (it is the same what you proposed) and should be working. You can use it by using promscale helm chart version 13.0.0