Merge branch 'main' into 45-allow-database-to-have-external-apps

This commit is contained in:
Mart van Santen 2022-10-06 16:51:38 +08:00
commit 4f8455c675
3 changed files with 14 additions and 1 deletions

View file

@ -14,12 +14,17 @@ from kubernetes.utils import create_from_yaml
from kubernetes.utils.create_from_yaml import FailToCreateError
from flask import current_app
from config import LOAD_INCLUSTER_CONFIG
# Load the kube config once
#
# By default this loads whatever we define in the `KUBECONFIG` env variable,
# otherwise loads the config from default locations, similar to what kubectl
# does.
config.load_kube_config()
if LOAD_INCLUSTER_CONFIG:
config.load_incluster_config()
else:
config.load_kube_config()
def create_variables_secret(app_slug, variables_filepath):
"""Checks if a variables secret for app_name already exists, generates it if necessary.