[Helm] Automate datasource import#10771
Conversation
craig-rueda
left a comment
There was a problem hiding this comment.
One quick thing, otherwise LGTM
| data: | ||
| {{- range $path, $config := .Values.extraConfigs }} | ||
| {{ $path }}: | | ||
| {{ $config | indent 4 -}} |
There was a problem hiding this comment.
Can you pipe the val to tpl?
So, {{ tpl $config . | indent 4 -}}
|
Changes made :) |
|
Please trim trailing whitespace to fix the precommit hook, after that should be good to merge. |
| tolerations: [] | ||
|
|
||
| affinity: {} | ||
| affinity: {} No newline at end of file |
There was a problem hiding this comment.
| affinity: {} | |
| affinity: {} | |
| {{ $path }}: | | ||
| {{ tpl $config . | indent 4 -}} | ||
| {{- end -}} | ||
| {{- end -}} No newline at end of file |
There was a problem hiding this comment.
| {{- end -}} | |
| {{- end -}} | |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
|
What is the status on these changes? I'd really like to see them integrated. |
* master: (23 commits) feat(explore): clear search on dataset change (apache#12909) chore: remove SIP-38 feature flag (apache#12894) fix: Config for dataset health check (apache#12906) fix(chart): allow null for most query object props (apache#12905) feat: add separate endpoint to fetch function names for autocomplete (apache#12840) chore: add required review on master (apache#12694) fix: comment typo (apache#12898) Migrates Radio component from Bootstrap to AntD. (apache#12738) fix: allow users to reset their passwords (apache#12886) fix(explore): missing select when groupby without metrics (apache#12890) refactor: dbapi exception mapping for dbapi's (apache#12869) feat(style-theme): add support for custom superset themes (apache#12858) chore(lint): fix pre-commit error (apache#12884) refactor(color-schemes): refactor setting of color schemes (apache#12857) feat(native-filters): Add defaultValue for Native filters modal (apache#12199) feat(release): add github token to changelog script (apache#12872) fix(menu): always show settings dropdown (apache#12877) Migrates Label component from Bootstrap to AntD. (apache#12774) [Helm] Automate datasource import (apache#10771) build: Skip loading example data from configs in CI (apache#12610) ...
|
if someone is looking why import with this step is not present in master branch at this moment. |
|
@ejianu @craig-rueda I have noticed that databases imported in this manner do not mask the password value like the ones added in the UI. Is this expected? |
SUMMARY
Helm chart change: Added 2 possible properties which will essentially automate the creation of database connections in superset.
Changes in the values file:
extraConfigsto which we can pass a yaml file that we exported previously, that defines a datasource.extraConfigMountPathlocation at which this file will beChanges in the chart:
Added a configMap template file that only creates the ConfigMap if the
extraConfigsis set.In the init-job file, the new "extra-config" volume is mounted only if
extraConfigsis set.In this way, the original approach should not be affected.
TEST PLAN
set the following property, the datasource file will be mounted at some location:
extraConfigMountPath: "/app/configs"under the Init job configuration in the init script add a command that imports the file we defined previously:
echo "Initializing connection.... "
superset import_datasources -p {{ .Values.extraConfigMountPath }}/datasources.yaml
Check if the datasource was imported correctly.