Skip to content

Commit

Permalink
allow overriding the UI token with an env var. (#144)
Browse files Browse the repository at this point in the history
Useful when the token is pulled from a secret
  • Loading branch information
arikalon1 authored Sep 29, 2024
1 parent 42c31a5 commit c93ed78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions holmes/core/supabase_dal.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ def __init__(self):
@staticmethod
def __load_robusta_config() -> Optional[RobustaToken]:
config_file_path = ROBUSTA_CONFIG_PATH
env_ui_token = os.environ.get("ROBUSTA_UI_TOKEN")
if env_ui_token:
# token provided as env var
return RobustaToken(**json.loads(base64.b64decode(env_ui_token)))

if not os.path.exists(config_file_path):
logging.info(f"No robusta config in {config_file_path}")
return None
Expand Down

0 comments on commit c93ed78

Please sign in to comment.