Skip to content

Commit a67621a

Browse files
committed
Address review comments
1 parent 5cab328 commit a67621a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

pkg/cluster/majorversionupgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (c *Cluster) majorVersionUpgrade() error {
129129
return nil
130130
}
131131

132-
if !IsInMainternanceWindow(c.Spec.MaintenanceWindows) {
132+
if !IsInMaintenanceWindow(c.Spec.MaintenanceWindows) {
133133
c.logger.Infof("skipping major version upgrade, not in maintenance window")
134134
return nil
135135
}

pkg/cluster/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ func parseResourceRequirements(resourcesRequirement v1.ResourceRequirements) (ac
663663
return resources, nil
664664
}
665665

666-
func IsInMainternanceWindow(specMaintenanceWindows []acidv1.MaintenanceWindow) bool {
666+
func IsInMaintenanceWindow(specMaintenanceWindows []acidv1.MaintenanceWindow) bool {
667667
if len(specMaintenanceWindows) == 0 {
668668
return true
669669
}

pkg/cluster/util_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ func TestIsInMaintenanceWindow(t *testing.T) {
705705
for _, tt := range tests {
706706
t.Run(tt.name, func(t *testing.T) {
707707
cluster.Spec.MaintenanceWindows = tt.windows
708-
if IsInMainternanceWindow(cluster.Spec.MaintenanceWindows) != tt.expected {
709-
t.Errorf("Expected isInMainternanceWindow to return %t", tt.expected)
708+
if IsInMaintenanceWindow(cluster.Spec.MaintenanceWindows) != tt.expected {
709+
t.Errorf("Expected IsInMaintenanceWindow to return %t", tt.expected)
710710
}
711711
})
712712
}

pkg/controller/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (c *Controller) attemptToMoveMasterPodsOffNode(node *v1.Node) error {
139139
for pod, cl := range masterPods {
140140
podName := util.NameFromMeta(pod.ObjectMeta)
141141

142-
if !cluster.IsInMainternanceWindow(cl.Spec.MaintenanceWindows) {
142+
if !cluster.IsInMaintenanceWindow(cl.Spec.MaintenanceWindows) {
143143
c.logger.Infof("skipping master pod migration, not in maintenance window")
144144
continue
145145
}

0 commit comments

Comments
 (0)