@catladder/cli
Version:
Panter cli tool for cloud CI/CD and DevOps
29 lines (28 loc) • 936 B
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;