-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
[Helm] Automate datasource import #10771
[Helm] Automate datasource import #10771
Conversation
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.
One quick thing, otherwise LGTM
data: | ||
{{- range $path, $config := .Values.extraConfigs }} | ||
{{ $path }}: | | ||
{{ $config | indent 4 -}} |
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.
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. |
@@ -238,4 +253,4 @@ nodeSelector: {} | |||
|
|||
tolerations: [] | |||
|
|||
affinity: {} | |||
affinity: {} |
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.
affinity: {} | |
affinity: {} | |
{{ $path }}: | | ||
{{ tpl $config . | indent 4 -}} | ||
{{- end -}} | ||
{{- 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.
{{- 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:
extraConfigs
to which we can pass a yaml file that we exported previously, that defines a datasource.extraConfigMountPath
location at which this file will beChanges in the chart:
Added a configMap template file that only creates the ConfigMap if the
extraConfigs
is set.In the init-job file, the new "extra-config" volume is mounted only if
extraConfigs
is 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.