mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Override config directory with env var.
Until this change, the config directory was assumed to be located at '/config'. This patch retains that default behaviour, but enables users/devs to override that behaviour by setting the HOMEPAGE_CONFIG_DIR variable.
This commit is contained in:
@@ -4,12 +4,12 @@ import { readFileSync } from "fs";
|
||||
import yaml from "js-yaml";
|
||||
import { KubeConfig } from "@kubernetes/client-node";
|
||||
|
||||
import checkAndCopyConfig, { substituteEnvironmentVars } from "utils/config/config";
|
||||
import checkAndCopyConfig, { CONF_DIR, substituteEnvironmentVars } from "utils/config/config";
|
||||
|
||||
export default function getKubeConfig() {
|
||||
checkAndCopyConfig("kubernetes.yaml");
|
||||
|
||||
const configFile = path.join(process.cwd(), "config", "kubernetes.yaml");
|
||||
const configFile = path.join(CONF_DIR, "kubernetes.yaml");
|
||||
const rawConfigData = readFileSync(configFile, "utf8");
|
||||
const configData = substituteEnvironmentVars(rawConfigData);
|
||||
const config = yaml.load(configData);
|
||||
|
||||
Reference in New Issue
Block a user