Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Amshuman K R <amshuman.rao.karaya@sap.com>
  • Loading branch information
prashanth26 and Amshuman K R committed May 12, 2020
1 parent d86c027 commit 793b105
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/machine_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (c *controller) validateMachineClass(classSpec *v1alpha1.ClassSpec) (interf
return MachineClass, secretRef, err
}
default:
klog.V(2).Infof("ClassKind %q not found", classSpec.Kind)
klog.V(4).Infof("ClassKind %q not found. Machine maybe be processed by external controller", classSpec.Kind)
}

return MachineClass, secretRef, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/provider/machinecontroller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (c *controller) Run(workers int, stopCh <-chan struct{}) {
prometheus.MustRegister(c)

for i := 0; i < workers; i++ {
createWorker(c.machineClassQueue, "ClustermachineClass", maxRetries, true, c.reconcileClustermachineClassKey, stopCh, &waitGroup)
createWorker(c.machineClassQueue, "ClusterMachineClass", maxRetries, true, c.reconcileClusterMachineClassKey, stopCh, &waitGroup)
createWorker(c.nodeQueue, "ClusterNode", maxRetries, true, c.reconcileClusterNodeKey, stopCh, &waitGroup)
createWorker(c.machineQueue, "ClusterMachine", maxRetries, true, c.reconcileClusterMachineKey, stopCh, &waitGroup)
createWorker(c.machineSafetyOrphanVMsQueue, "ClusterMachineSafetyOrphanVMs", maxRetries, true, c.reconcileClusterMachineSafetyOrphanVMs, stopCh, &waitGroup)
Expand Down
8 changes: 4 additions & 4 deletions pkg/util/provider/machinecontroller/machineclass.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ func (c *controller) machineClassUpdate(oldObj, newObj interface{}) {
c.machineClassAdd(newObj)
}

// reconcileClustermachineClassKey reconciles an machineClass due to controller resync
// reconcileClusterMachineClassKey reconciles an machineClass due to controller resync
// or an event on the machineClass.
func (c *controller) reconcileClustermachineClassKey(key string) error {
func (c *controller) reconcileClusterMachineClassKey(key string) error {
_, name, err := cache.SplitMetaNamespaceKey(key)
if err != nil {
return err
Expand All @@ -104,10 +104,10 @@ func (c *controller) reconcileClustermachineClassKey(key string) error {
return err
}

return c.reconcileClustermachineClass(class)
return c.reconcileClusterMachineClass(class)
}

func (c *controller) reconcileClustermachineClass(class *v1alpha1.MachineClass) error {
func (c *controller) reconcileClusterMachineClass(class *v1alpha1.MachineClass) error {
klog.V(4).Info("Start Reconciling machineclass: ", class.Name)
defer func() {
c.enqueueMachineClassAfter(class, 10*time.Minute)
Expand Down

0 comments on commit 793b105

Please sign in to comment.