@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
23 lines • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.additionalKubernetesSecretKeys = void 0;
const additionalKubernetesSecretKeys = ({ deployConfigRaw, }) => {
var _a, _b, _c, _d;
if (!deployConfigRaw) {
return [];
}
const keys = [];
if ((_b = (_a = deployConfigRaw.values) === null || _a === void 0 ? void 0 : _a.mongodb) === null || _b === void 0 ? void 0 : _b.enabled) {
keys.push("MONGODB_ROOT_PASSWORD");
if (deployConfigRaw.values.mongodb.architecture === "replicaset") {
keys.push("MONGODB_REPLICASET_KEY");
}
}
if ((_d = (_c = deployConfigRaw.values) === null || _c === void 0 ? void 0 : _c.cloudsql) === null || _d === void 0 ? void 0 : _d.enabled) {
keys.push("POSTGRESQL_PASSWORD");
keys.push("cloudsqlProxyCredentials");
}
return keys.map((key) => ({ key }));
};
exports.additionalKubernetesSecretKeys = additionalKubernetesSecretKeys;
//# sourceMappingURL=additionalSecretKeys.js.map