mirror of
https://github.com/goharbor/harbor.git
synced 2024-09-03 18:00:29 +02:00
17 lines
566 B
Python
17 lines
566 B
Python
import os
|
|
from g import config_dir, templates_dir, DEFAULT_GID, DEFAULT_UID
|
|
from utils.jinja import render_jinja
|
|
from utils.misc import prepare_dir
|
|
|
|
EXPORTER_CONFIG_DIR = os.path.join(config_dir, "exporter")
|
|
EXPORTER_CONF_ENV = os.path.join(config_dir, "exporter", "env")
|
|
EXPORTER_ENV_TEMPLATE_PATH = os.path.join(templates_dir, "exporter", "env.jinja")
|
|
|
|
def prepare_exporter(config_dict):
|
|
prepare_dir(EXPORTER_CONFIG_DIR, uid=DEFAULT_UID, gid=DEFAULT_GID)
|
|
|
|
render_jinja(
|
|
EXPORTER_ENV_TEMPLATE_PATH,
|
|
EXPORTER_CONF_ENV,
|
|
**config_dict)
|