-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort kubernetes objects before applying. #244
Conversation
Instead of just applying namespces before everything else, let's sort all the objects. There's more inter-dependences between various kinds, e.g. CRDs need to be applied before the actual custom resources, StorageClasses before the PVCs, ... . Signed-off-by: Milan Plzik <milan.plzik@grafana.com>
This looks good, though I wonder if it would fit better into It would need to be deterministic for this though:
|
As suggested in #244 (comment) , `Reconcile()` might be a better place for sorting, since we're already doing sort-of (pun intended) similar thing there. Signed-off-by: Milan Plzik <milan.plzik@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Some refactoring ;)
Signed-off-by: Milan Plzik <milan.plzik@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Instead of just applying namespces before everything else, let's sort
all the objects. There's more inter-dependences between various kinds,
e.g. CRDs need to be applied before the actual custom resources,
StorageClasses before the PVCs, ... .