Skip to content

Commit b5e1d93

Browse files
committed
superset discovers elastic
1 parent 08e12e5 commit b5e1d93

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

charts/superset/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type: application
2222
# This is the chart version. This version number should be incremented each time you make changes
2323
# to the chart and its templates, including the app version.
2424
# Versions are expected to follow Semantic Versioning (https://semver.org/)
25-
version: 0.1.2
25+
version: 0.1.3
2626

2727
# This is the version number of the application being deployed. This version number should be
2828
# incremented each time you make changes to the application. Versions are not expected to
@@ -33,5 +33,5 @@ dependencies:
3333
version: 0.12.4
3434
repository: https://apache.github.io/superset
3535
- name: library-chart
36-
version: 1.5.20
36+
version: 1.5.23
3737
repository: https://inseefrlab.github.io/helm-charts-interactive-services

charts/superset/templates/_discovery.tpl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ Create the name of the config map S3 to use
3939
{{- $service:= ( index $secret.data "elastic-service" | default "") | b64dec }}
4040
{{- $name:= ( index $secret.data "elastic-name" | default "") | b64dec }}
4141
{{- $port:= ( index $secret.data "elastic-port") | b64dec }}
42-
{{- $data := dict "elastic" $elastic "service" $service "name" $name "port" $port}}
42+
{{- $password := ( index $secret.data "elastic-password" | default "") | b64dec }}
43+
{{- $tls := ( index $secret.data "elastic-tls" | default "ZmFsc2U=") | b64dec }}
44+
{{- $username := ( index $secret.data "elastic-username" | default "") | b64dec }}
45+
{{- $data := dict "elastic" $elastic "service" $service "name" $name "port" $port "password" $password "username" $username "tls" $tls }}
4346
{{- if $test }}
4447
{{ printf "databases:" | indent 2 }}
4548
{{- $test = 0}}
@@ -96,12 +99,23 @@ Create the name of the config map S3 to use
9699
{{- $service:= .service }}
97100
{{- $port:= .port }}
98101
{{- $name:= .name }}
102+
{{- $username:= .username }}
103+
{{- $password:= .password }}
104+
{{- $tls:= .tls }}
99105
{{- if $elastic }}
100106
{{ printf "- allow_file_upload: true"| indent 2}}
101107
{{ printf "allow_ctas: true"| indent 4}}
102108
{{ printf "allow_cvas: true"| indent 4}}
103109
{{ printf "database_name: %s" $name | indent 4}}
110+
{{- if eq $tls "true" }}
111+
{{- if and $password $username }}
112+
{{ printf "sqlalchemy_uri: elasticsearch+https://%s:%s@%s:%s/" $username $password $service $port | indent 4 }}
113+
{{- else }}
114+
{{ printf "sqlalchemy_uri: elasticsearch+https://%s:%s/" $service $port | indent 4 }}
115+
{{- end }}
116+
{{- else }}
104117
{{ printf "sqlalchemy_uri: elasticsearch+http://%s:%s/" $service $port | indent 4}}
118+
{{- end }}
105119
{{ printf "tables: []" | indent 4}}
106120
{{- end }}
107121
{{- end -}}

0 commit comments

Comments
 (0)