Skip to content

Commit

Permalink
Make IsMaster private
Browse files Browse the repository at this point in the history
  • Loading branch information
ingvagabund committed Jan 7, 2019
1 parent 4198bc3 commit 379fe32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/actuators/machine/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions pkg/actuators/machine/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 379fe32

Please sign in to comment.