Skip to content

Commit

Permalink
fix: delete cluster to use --disable-nodegroup-eviction flag (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroniscode authored Jan 31, 2024
1 parent 35907db commit 774747f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/eksctl/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type ResourceManager struct {
Resource string
ConfigTemplate template.Template
CreateFlags []string
DeleteFlags []string
DeleteCommand template.Template
ApproveCreate bool
ApproveDelete bool
Expand Down Expand Up @@ -99,6 +100,10 @@ func (e *ResourceManager) DeleteWithConfigFile(options resource.Options) error {
args = append(args, "--approve")
}

if len(e.DeleteFlags) > 0 {
args = append(args, e.DeleteFlags...)
}

return Command(args, eksctlConfig)
}

Expand Down
1 change: 1 addition & 0 deletions pkg/resource/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func NewResource() *resource.Resource {
ConfigTemplate: &template.TextTemplate{
Template: eksctl.EksctlHeader + EksctlTemplate + nodegroup.EksctlTemplate,
},
DeleteFlags: []string{"--disable-nodegroup-eviction"},
},
}

Expand Down

0 comments on commit 774747f

Please sign in to comment.