Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/asset/machines/aws/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ items:
replicas: {{$instance.Replicas}}
selector:
matchLabels:
sigs.k8s.io/cluster-api-machineset: worker
sigs.k8s.io/cluster-api-machineset: {{$c.ClusterName}}-worker-{{$index}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really want to use the index here? This implies that the order of the worker machine pools in the install config is important, which I don't think that it is. Shouldn't we be using the name of the machine pool from the install config instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what the purpose of having a name in the install-config.yml for each worker machine pool is if we are not going to use it for the name of the machine set.

sigs.k8s.io/cluster-api-cluster: {{$c.ClusterName}}
template:
metadata:
labels:
sigs.k8s.io/cluster-api-machineset: worker
sigs.k8s.io/cluster-api-machineset: {{$c.ClusterName}}-worker-{{$index}}
sigs.k8s.io/cluster-api-cluster: {{$c.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: worker
sigs.k8s.io/cluster-api-machine-type: worker
Expand Down
4 changes: 2 additions & 2 deletions pkg/asset/machines/libvirt/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ spec:
replicas: {{.Replicas}}
selector:
matchLabels:
sigs.k8s.io/cluster-api-machineset: worker
sigs.k8s.io/cluster-api-machineset: {{.ClusterName}}-worker-0
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: worker
sigs.k8s.io/cluster-api-machine-type: worker
template:
metadata:
labels:
sigs.k8s.io/cluster-api-machineset: worker
sigs.k8s.io/cluster-api-machineset: {{.ClusterName}}-worker-0
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: worker
sigs.k8s.io/cluster-api-machine-type: worker
Expand Down
4 changes: 2 additions & 2 deletions pkg/asset/machines/openstack/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ spec:
replicas: {{.Replicas}}
selector:
matchLabels:
sigs.k8s.io/cluster-api-machineset: worker
sigs.k8s.io/cluster-api-machineset: {{.ClusterName}}-worker-0
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
template:
metadata:
labels:
sigs.k8s.io/cluster-api-machineset: worker
sigs.k8s.io/cluster-api-machineset: {{.ClusterName}}-worker-0
sigs.k8s.io/cluster-api-cluster: {{.ClusterName}}
sigs.k8s.io/cluster-api-machine-role: worker
sigs.k8s.io/cluster-api-machine-type: worker
Expand Down