acorn-io / runtime

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

Resolved offerings #2369

Closed g-linville closed 9 months ago

g-linville commented 10 months ago

Overview

This change refactors AppInstance.Status.Defaults to AppInstance.Status.ResolvedOfferings. This field used to store the default values for container memory requirements, the region, and volumeclass information for the AppInstance. With these changes, the ResolvedOfferings stores the actual value of the app's region, computeclass information for each container in the app (rather than just memory information), and volumeclass information for each volume. Now it is the source of absolute truth, and there is no need to compare AppInstance.Spec (overrides from the user), AppInstance.Status.AppSpec (defaults from the acorn image), and AppInstance.Status.Defaults (defaults from volume and compute classes) like we used to.

This is a breaking API change. I have updated all of the unit tests in here to reflect that change. (Sorry, there are a lot of them.) I believe this will not cause deployed apps to restart, but they will not get the status updates until they are processed again by the controller (which requires their generation to increase). If we want them to all restart and get the status updates as soon as this runtime change rolls out, I can do that pretty easily as well.

Checklist