Skip to content

Commit 4e76bc9

Browse files
committed
always run script predelete
1 parent b61b727 commit 4e76bc9

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

px-deploy.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ func main() {
511511
cmdCreate.Flags().StringVarP(&createRegion, "region", "r", "", "AWS, GCP or Azure region (default "+defaults.Aws_Region+", "+defaults.Gcp_Region+" or "+defaults.Azure_Region+")")
512512
cmdCreate.Flags().StringVarP(&flags.Cloud, "cloud", "C", "", "aws | gcp | azure | vsphere (default "+defaults.Cloud+")")
513513
cmdCreate.Flags().StringVarP(&flags.Ssh_Pub_Key, "ssh_pub_key", "", "", "ssh public key which will be added for root access on each node")
514-
cmdCreate.Flags().BoolVarP(&flags.Run_Predelete, "predelete", "", false, "run predelete scripts on destruction (true/false)")
515514
cmdCreate.Flags().StringVarP(&createEnv, "env", "e", "", "Comma-separated list of environment variables to be passed, for example foo=bar,abc=123")
516515
cmdCreate.Flags().BoolVarP(&flags.DryRun, "dry_run", "d", false, "dry-run, create local files only. Works only on aws / azure")
517516
cmdCreate.Flags().BoolVarP(&flags.NoSync, "no_sync", "", false, "do not sync assets/infra/scripts/templates from container to local dir, allows to change local scripts")
@@ -1635,11 +1634,6 @@ func prepare_predelete(config *Config, runtype string, destroyForce bool) {
16351634

16361635
var name_pre, name_post string
16371636

1638-
// script predelete only executes if set in config
1639-
if !config.Run_Predelete && runtype == "script" {
1640-
return
1641-
}
1642-
16431637
clusters, _ := strconv.Atoi(config.Clusters)
16441638
predelete_status := make(chan Predelete_Status_Return, clusters)
16451639

templates/training-backup.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ description: Deploys training clusters
22
scripts: ["training-cluster"]
33
px_version: 3.5.1
44
k8s_version: 1.33.5
5-
run_predelete: true
65
scripts: ["install-px", "training-backup-cluster"]
76
cluster:
87
- id: 1

templates/training.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ description: Deploys training clusters
22
scripts: ["training-cluster"]
33
px_version: 3.5.2
44
k8s_version: 1.33.5
5-
run_predelete: true
65
cluster:
76
- id: 1
87
scripts: ["install-awscli", "etcd", "wetty", "snoop", "training-bastion"]

0 commit comments

Comments
 (0)