Skip to content

Commit

Permalink
[ENHANCEMENT] deprecate datasources configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Akshay Iyyadurai Balasundaram <[email protected]>
  • Loading branch information
ibakshay committed Nov 8, 2024
1 parent 3389d64 commit 97ac588
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/perses/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: perses
description: Perses helm chart
icon: https://avatars.githubusercontent.com/u/77209215?s=200&v=4
type: application
version: 0.7.0
version: 0.7.1
appVersion: "v0.49.0"
sources:
- https://github.com/perses/perses
Expand Down
11 changes: 11 additions & 0 deletions charts/perses/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,14 @@
{{- if and .Values.persistence.enabled (eq .Values.persistence.storageClass "") }}
{{ fail "[ERROR] 'persistencen.storageClass' must be set." }}
{{ end }}

{{- if .Values.datasources }}
{{- if not (empty .Values.datasources) }}
#################################################################################
###### WARNING: The 'datasources' configuration field is deprecated #####
###### and will be removed in the future version. #####
###### Please migrate to using the 'sidecar' configuration #####
###### for provisioning datasources. #####
#################################################################################
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/perses/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ spec:
- name: data
mountPath: {{ .Values.config.database.file.folder }}
{{- end }}
{{- if .Values.datasources }}
{{- if not (empty .Values.datasources) }}
- name: datasources
mountPath: /etc/perses/datasources
{{- end }}
{{- end }}
{{- if .Values.sidecar.enabled }}
- name: provisioning
mountPath: {{ .Values.config.provisioning.folders | first }}
Expand Down Expand Up @@ -111,6 +117,13 @@ spec:
- name: config
configMap:
name: {{ include "perses.fullname" . }}
{{- if .Values.datasources }}
{{- if not (empty .Values.datasources) }}
- name: datasources
configMap:
name: {{ include "perses.fullname" . }}-datasources
{{- end }}
{{- end }}
{{- if .Values.sidecar.enabled }}
- name: provisioning
emptyDir: {}
Expand Down
4 changes: 3 additions & 1 deletion charts/perses/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@
"type": "object"
},
"datasources": {
"type": "array"
"type": "array",
"deprecated": true,
"description": "DEPRECATED: This field will be removed in the future release. Please use the 'sidecar' configuration instead to load datasources"
},
"config": {
"type": "object",
Expand Down
1 change: 1 addition & 0 deletions charts/perses/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ ingress:
# hosts: []

# -- Configure datasources
# DEPRECATED: This field will be removed in the future release. Please use the 'sidecar' configuration to provision datasources.
# ref: https://github.com/perses/perses/blob/90beed356243208f14cf2249bebb6f6222cb77ae/docs/datasource.md
datasources:
[]
Expand Down

0 comments on commit 97ac588

Please sign in to comment.