Skip to content

Commit

Permalink
Fix provisioner name dereference panic (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis authored May 3, 2023
1 parent 33435cd commit 611e27d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/deprovisioning/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func NewCandidate(ctx context.Context, kubeClient client.Client, recorder events
instanceTypeMap := provisionerToInstanceTypes[node.Labels()[v1alpha5.ProvisionerNameLabelKey]]
// skip any nodes where we can't determine the provisioner
if provisioner == nil || instanceTypeMap == nil {
recorder.Publish(deprovisioningevents.Blocked(node.Node, node.Machine, fmt.Sprintf("owning provisioner %q not found", provisioner.Name))...)
recorder.Publish(deprovisioningevents.Blocked(node.Node, node.Machine, fmt.Sprintf("owning provisioner %q not found", node.Labels()[v1alpha5.ProvisionerNameLabelKey]))...)
return nil, fmt.Errorf("provisioner '%s' can't be resolved for state node", node.Labels()[v1alpha5.ProvisionerNameLabelKey])
}
instanceType := instanceTypeMap[node.Labels()[v1.LabelInstanceTypeStable]]
Expand Down

0 comments on commit 611e27d

Please sign in to comment.