Skip to content

Commit 8ec4deb

Browse files
authored
fix: remap dry-run config field (#12)
1 parent 8749132 commit 8ec4deb

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

autopilot/main.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ import (
2929

3030
type (
3131
AzureK8sAutopilot struct {
32-
DryRun bool
33-
3432
ctx context.Context
3533
Config config.Opts
3634

autopilot/task.repair.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (r *AzureK8sAutopilot) repairRun(contextLogger *zap.SugaredLogger) {
6565
continue
6666
}
6767

68-
if r.DryRun {
68+
if r.Config.DryRun {
6969
nodeContextLogger.Infof("node %s repair skipped, dry run", node.Name)
7070
if err := r.repair.nodeLock.Add(node.Name, true, r.Config.Repair.LockDuration); err != nil {
7171
nodeContextLogger.Error(err)

autopilot/task.update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (r *AzureK8sAutopilot) updateRun(contextLogger *zap.SugaredLogger) {
3131
return
3232
}
3333

34-
if !r.DryRun {
34+
if !r.Config.DryRun {
3535
for _, node := range candidateList {
3636
// concurrency update limit
3737
if r.Config.Update.Limit > 0 && r.update.nodeLock.ItemCount() >= r.Config.Update.Limit {

0 commit comments

Comments
 (0)