From 379fe32584d86b379638b217a0dfa2a3e6da22d6 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 23 Dec 2018 16:48:24 +0100 Subject: [PATCH] Make IsMaster private --- pkg/actuators/machine/actuator.go | 2 +- pkg/actuators/machine/utils.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/actuators/machine/actuator.go b/pkg/actuators/machine/actuator.go index 437836acf8..33f13f0bad 100644 --- a/pkg/actuators/machine/actuator.go +++ b/pkg/actuators/machine/actuator.go @@ -186,7 +186,7 @@ func (a *Actuator) CreateMachine(cluster *clusterv1.Cluster, machine *clusterv1. } // We explicitly do NOT want to remove stopped masters. - if !IsMaster(machine) { + if !isMaster(machine) { // Prevent having a lot of stopped nodes sitting around. err = removeStoppedMachine(machine, awsClient) if err != nil { diff --git a/pkg/actuators/machine/utils.go b/pkg/actuators/machine/utils.go index d23dd295ae..7af2008d63 100644 --- a/pkg/actuators/machine/utils.go +++ b/pkg/actuators/machine/utils.go @@ -180,8 +180,8 @@ func providerConfigFromMachine(client client.Client, machine *clusterv1.Machine, return &config, nil } -// IsMaster returns true if the machine is part of a cluster's control plane -func IsMaster(machine *clusterv1.Machine) bool { +// isMaster returns true if the machine is part of a cluster's control plane +func isMaster(machine *clusterv1.Machine) bool { if machineType, exists := machine.ObjectMeta.Labels[providerconfigv1.MachineTypeLabel]; exists && machineType == "master" { return true }