-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/kube event listener #114
Conversation
… feature/kube-event-controller
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.
Other than two comments, lgtm
…DataCentre/stackn into feature/kube-event-controller
_ = delete_and_deploy_resource.delay(appinstance.pk, new_release_name) | ||
else: | ||
# Otherwise, we update the resources in the same helm release | ||
_ = deploy_resource.delay(appinstance.pk, "update") |
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.
I haven't tested this yet but .delay() here is supposed to add this as a task in the queue for celery and not using it might just run it in the studio pod instead. Would be good to test if this is the case
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.
It adds the task to celery anyways, but the delay function just applies it asynchronously. But we should add delay here again. This is a mistake.
…DataCentre/stackn into feature/kube-event-controller
Description
As you know, the current functionality for updating the app status is far from optimal. This PR proposes a remake of this functionality by introducing an event listener. Instead of asking K8s if there has been a change, we now receive notifications that a change has been made.
The event listener is added as a celery task and fires up when celery is ready. It updates the appinstance state if a change has been made that either changed the state or if the app was deleted.
I've tested it and it works
serve-dev
Checklist
If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.
Further comments
Anything else you think we should know before merging your code!