acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.14k stars 102 forks source link

fix: address issue with computeclass tables not converting properly #2438

Closed tylerslaton closed 5 months ago

tylerslaton commented 5 months ago

This fixes an issue where acorn offerings computeclasses and kubectl get clustercomputeclasses would fail with the following error:

  ✗  ERROR:  template: :1:39: executing "" at <memoryToRange .Memory>: error calling memoryToRange: object passed is not a ComputeClassMemory struct

This was due to a recent change where the Memory struct on apiv1.ComputeClass and adminv1.ClusterComputeClass are now different. The fix is to check for both types and process them accordingly when converting values into a table.

Checklist

cjellick commented 5 months ago

go ahead and merge. you addressed @Grant Linville's comment and he's getting lunch. donnie approved. im good with you merging it

tylerslaton commented 5 months ago

https://github.com/acorn-io/runtime/issues/2429