Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/interface/cli/commands/hybrid/delete.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ const deleteCmd = new Command({
.option('kube-config-path', {
describe: 'Path to kubeconfig file (default is $HOME/.kube/config)',
})
.option('keep-cluster-integration', {
describe: 'If true, will not delete dangling cluster integrations from Codefresh',
type: Boolean,
})
.option('values', {
describe: 'specify values in a YAML file',
})
Expand All @@ -142,6 +146,7 @@ const deleteCmd = new Command({
verbose,
force,
'kube-config-path': kubeConfigPath,
'keep-cluster-integration': keepClusterIntegration,
} = _argv;
let {
url,
Expand Down Expand Up @@ -249,7 +254,7 @@ const deleteCmd = new Command({
const runtimesToDelete = _.filter(runtimes, re => attachedRuntimes.includes(_.get(re, 'metadata.name')));
const defaultRuntime = _.get(_.find(runtimes, re => re.default), 'metadata.name');

const clustersToDelete = getClustersToDelete(clusters, runtimes, runtimesToDelete);
const clustersToDelete = keepClusterIntegration ? [] : getClustersToDelete(clusters, runtimes, runtimesToDelete);
const appProxyToDelete = getAppProxyToDelete(runtimesToDelete);

if (!force) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.81.4",
"version": "0.81.5",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand Down