MCPcopy Create free account
hub / github.com/SocketCluster/socketcluster / k8sUndeploy

Function k8sUndeploy

bin/actions/k8s.js:458–476  ·  view source on GitHub ↗
(arg1)

Source from the content-addressed store, hash-verified

456};
457
458const k8sUndeploy = async function (arg1) {
459 let appPath = arg1 || '.';
460
461 let pkg = parsePackageFile(appPath);
462 let appName = pkg.name;
463
464 let kubernetesDirPath = appPath + '/kubernetes';
465 let kubeFiles = fs.readdirSync(kubernetesDirPath);
466 kubeFiles.forEach((configFilePath) => {
467 let absolutePath = path.resolve(kubernetesDirPath, configFilePath);
468 try {
469 execSync(`kubectl delete -f ${absolutePath}`, { stdio: 'inherit' });
470 } catch (err) {}
471 });
472
473 this.successLog(`The '${appName}' app was undeployed successfully.`);
474
475 process.exit();
476};
477
478const k8sAddSecret = async function (arg, options) {
479 let secretName = options.s || DEFAULT_TLS_SECRET_NAME;

Callers

nothing calls this directly

Calls 1

parsePackageFileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…