Skip to content

Commit

Permalink
Merge pull request #1686 from enxebre/add-label
Browse files Browse the repository at this point in the history
BUG 1702050: Add aws role labels back (revert #1474)
  • Loading branch information
openshift-merge-robot committed May 1, 2019
2 parents ef2362d + 0fe8619 commit aa70e4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion pkg/asset/machines/aws/machines.go
Expand Up @@ -49,7 +49,9 @@ func Machines(clusterID string, config *types.InstallConfig, pool *types.Machine
Namespace: "openshift-machine-api",
Name: fmt.Sprintf("%s-%s-%d", clusterID, pool.Name, idx),
Labels: map[string]string{
"machine.openshift.io/cluster-api-cluster": clusterID,
"machine.openshift.io/cluster-api-cluster": clusterID,
"machine.openshift.io/cluster-api-machine-role": role,
"machine.openshift.io/cluster-api-machine-type": role,
},
},
Spec: machineapi.MachineSpec{
Expand Down
12 changes: 8 additions & 4 deletions pkg/asset/machines/aws/machinesets.go
Expand Up @@ -58,15 +58,19 @@ func MachineSets(clusterID string, config *types.InstallConfig, pool *types.Mach
Replicas: &replicas,
Selector: metav1.LabelSelector{
MatchLabels: map[string]string{
"machine.openshift.io/cluster-api-machineset": name,
"machine.openshift.io/cluster-api-cluster": clusterID,
"machine.openshift.io/cluster-api-machineset": name,
"machine.openshift.io/cluster-api-cluster": clusterID,
"machine.openshift.io/cluster-api-machine-role": role,
"machine.openshift.io/cluster-api-machine-type": role,
},
},
Template: machineapi.MachineTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: map[string]string{
"machine.openshift.io/cluster-api-machineset": name,
"machine.openshift.io/cluster-api-cluster": clusterID,
"machine.openshift.io/cluster-api-machineset": name,
"machine.openshift.io/cluster-api-cluster": clusterID,
"machine.openshift.io/cluster-api-machine-role": role,
"machine.openshift.io/cluster-api-machine-type": role,
},
},
Spec: machineapi.MachineSpec{
Expand Down

0 comments on commit aa70e4c

Please sign in to comment.