Skip to content

Commit 622da79

Browse files
Cr 16524 (#781)
* added option to keep cluster integration when deleting runner * bump
1 parent 22017b0 commit 622da79

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/interface/cli/commands/hybrid/delete.cmd.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ const deleteCmd = new Command({
124124
.option('kube-config-path', {
125125
describe: 'Path to kubeconfig file (default is $HOME/.kube/config)',
126126
})
127+
.option('keep-cluster-integration', {
128+
describe: 'If true, will not delete dangling cluster integrations from Codefresh',
129+
type: Boolean,
130+
})
127131
.option('values', {
128132
describe: 'specify values in a YAML file',
129133
})
@@ -142,6 +146,7 @@ const deleteCmd = new Command({
142146
verbose,
143147
force,
144148
'kube-config-path': kubeConfigPath,
149+
'keep-cluster-integration': keepClusterIntegration,
145150
} = _argv;
146151
let {
147152
url,
@@ -249,7 +254,7 @@ const deleteCmd = new Command({
249254
const runtimesToDelete = _.filter(runtimes, re => attachedRuntimes.includes(_.get(re, 'metadata.name')));
250255
const defaultRuntime = _.get(_.find(runtimes, re => re.default), 'metadata.name');
251256

252-
const clustersToDelete = getClustersToDelete(clusters, runtimes, runtimesToDelete);
257+
const clustersToDelete = keepClusterIntegration ? [] : getClustersToDelete(clusters, runtimes, runtimesToDelete);
253258
const appProxyToDelete = getAppProxyToDelete(runtimesToDelete);
254259

255260
if (!force) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.81.4",
3+
"version": "0.81.5",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)