Skip to content

Commit

Permalink
Include quantity in error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ElanHasson authored Dec 12, 2023
1 parent e87470e commit 2acea3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster-autoscaler/cloudprovider/rancher/rancher_nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ func parseResourceAnnotations(annotations map[string]string) (corev1.ResourceLis

cpuResources, err := resource.ParseQuantity(cpu)
if err != nil {
return nil, fmt.Errorf("unable to parse cpu resources: %w", err)
return nil, fmt.Errorf("unable to parse cpu resources: %q: %w", cpu, err)
}
memory, ok := annotations[resourceMemoryAnnotation]
if !ok {
Expand All @@ -467,7 +467,7 @@ func parseResourceAnnotations(annotations map[string]string) (corev1.ResourceLis

memoryResources, err := resource.ParseQuantity(memory)
if err != nil {
return nil, fmt.Errorf("unable to parse memory resources: %w", err)
return nil, fmt.Errorf("unable to parse memory resources: %q: %w", memoryResources, err)
}
ephemeralStorage, ok := annotations[resourceEphemeralStorageAnnotation]
if !ok {
Expand All @@ -476,7 +476,7 @@ func parseResourceAnnotations(annotations map[string]string) (corev1.ResourceLis

ephemeralStorageResources, err := resource.ParseQuantity(ephemeralStorage)
if err != nil {
return nil, fmt.Errorf("unable to parse ephemeralStorage resources: %w", err)
return nil, fmt.Errorf("unable to parse ephemeral storage resources: %q: %w", ephemeralStorageResources, err)
}

return corev1.ResourceList{
Expand Down

0 comments on commit 2acea3b

Please sign in to comment.