refactor(controller): do not fail scheduler if namespace exists
When creating a scheduler, we fail if the namespace already exists. This is problematic if there are other GR providers running at the same namespace, like maestro v10 for example. Thus, don't fail scheduler creation if namespace exists.
refactor(controller): do not delete namespace on scheduler delete
There can be other GR providers running into the same namespace, thus we don't want to cascade delete the k8s namespace on scheduler deletion
refactor(watcher): filter pod events by heritage label
There can be other resources/pods running in the namespace that are not managed by Maestro. In that case, we want to filter the watcher to only receive pod events from the ones created by v9
coverage: 78.143% (+0.06%) from 78.079%
when pulling 597ef9ca7433eb06ff9107d2b1fb0249bb06d97b on feat/filter-events-by-heritage
into 4338d9d96cc88baa0c783b49e9ed199a90770b05 on v9.16.0.
coverage: 78.077% (-0.002%) from 78.079%
when pulling 367abb68e7672d4a821b4502060a5c9bd12699d3 on feat/filter-events-by-heritage
into 4338d9d96cc88baa0c783b49e9ed199a90770b05 on v9.16.0.
Wdyt about adding a configuration option for the namespace deletion? My concern here is that when not having other GR providers, it's good to delete te namespace.
When creating a scheduler, we fail if the namespace already exists. This is problematic if there are other GR providers running at the same namespace, like maestro v10 for example. Thus, don't fail scheduler creation if namespace exists.
There can be other GR providers running into the same namespace, thus we don't want to cascade delete the k8s namespace on scheduler deletion
There can be other resources/pods running in the namespace that are not managed by Maestro. In that case, we want to filter the watcher to only receive pod events from the ones created by v9