edgelesssys / contrast

Deploy and manage confidential containers on Kubernetes
https://docs.edgeless.systems/contrast
GNU Affero General Public License v3.0
160 stars 6 forks source link

kubeclient: combine duplicate code for WaitFor* functions #606

Closed davidweisse closed 1 week ago

davidweisse commented 1 week ago

The functions WaitForDeployment, WaitForDaemonSet and WaitForStatefulSet are combined into one WaitFor function, which takes the resource kind as an input and performs all the logic that the previous functions had.

Additionally, the context error is now checked when receiving from the watcher channel, which is closed when the context expires, so you don't get error messages like this: https://github.com/edgelesssys/contrast/actions/runs/9522518982/job/26252214876#step:12:118