Skip to content
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

feat: multiple improvements for REANA 0.9.4 #476

Merged
merged 2 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions reana_job_controller/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
"""Flask application configuration."""

import os
import secrets

from reana_commons.config import REANA_COMPONENT_PREFIX

from werkzeug.utils import import_string


SECRET_KEY = os.getenv("REANA_SECRET_KEY", secrets.token_hex())
"""Secret key used for the application user sessions.

A new random key is generated on every start of job-controller, but this is not an
issues as job-controller is never restarted (and thus the secret never changes)
during the execution of a single workflow."""

CACHE_ENABLED = False
"""Determines if jobs caching is enabled."""

Expand Down
1 change: 0 additions & 1 deletion reana_job_controller/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def create_app(config_mapping=None):
"""Create REANA-Job-Controller application."""
logging.basicConfig(level=REANA_LOG_LEVEL, format=REANA_LOG_FORMAT)
app = Flask(__name__)
app.secret_key = "mega secret key"
app.session = Session
app.config.from_object(config)
if config_mapping:
Expand Down
3 changes: 2 additions & 1 deletion reana_job_controller/kubernetes_job_manager.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of REANA.
# Copyright (C) 2019, 2020, 2021, 2022, 2023 CERN.
# Copyright (C) 2019, 2020, 2021, 2022, 2023, 2024 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -167,6 +167,7 @@ def execute(self):
"name": "job",
"env": [],
"volumeMounts": [],
"securityContext": {"allowPrivilegeEscalation": False},
}
],
"initContainers": [],
Expand Down
Loading