Skip to content

Commit

Permalink
Update SupersetConfigOptions to include explicit config for MapboxApi…
Browse files Browse the repository at this point in the history
…Key (#179)

## Description

Explicity updated the supserset_config.py for the MAPBOX_API_KEY
  • Loading branch information
rsiwicki committed Apr 21, 2022
1 parent e194337 commit eb86d65
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
- Configuration option `rowLimit` added ([#173]).
- Configuration and environment overrides enabled ([#173]).
- Ability to add MAPBOX_API_KEY from secret added ([#178]).
- Update SupersetConfigOptions to include explicit config for MapboxApiKey ([#179])

[#173]: https://github.com/stackabletech/superset-operator/pull/173
[#178]: https://github.com/stackabletech/superset-operator/pull/178
[#179]: https://github.com/stackabletech/superset-operator/pull/179

## [0.4.0] - 2022-04-05

Expand Down
2 changes: 2 additions & 0 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pub enum SupersetConfigOptions {
SqlalchemyDatabaseUri,
StatsLogger,
RowLimit,
MapboxApiKey,
}

impl SupersetConfigOptions {
Expand All @@ -56,6 +57,7 @@ impl FlaskAppConfigOptions for SupersetConfigOptions {
SupersetConfigOptions::SecretKey => PythonType::Expression,
SupersetConfigOptions::SqlalchemyDatabaseUri => PythonType::Expression,
SupersetConfigOptions::StatsLogger => PythonType::Expression,
SupersetConfigOptions::MapboxApiKey => PythonType::Expression,
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions rust/operator-binary/src/superset_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ fn build_rolegroup_config_map(
.cloned()
.unwrap_or_default();

config.insert(
SupersetConfigOptions::MapboxApiKey.to_string(),
"os.environ.get('MAPBOX_API_KEY')".into(),
);

config.insert(
SupersetConfigOptions::SecretKey.to_string(),
"os.environ.get('SECRET_KEY')".into(),
Expand Down

0 comments on commit eb86d65

Please sign in to comment.