-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat: Add logic for queue controller (Part 1) #346
base: main
Are you sure you want to change the base?
Conversation
ad25360
to
2bac68c
Compare
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
801bf51
to
8ba5462
Compare
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
) | ||
|
||
// GetObject will get the object from Kubernetes and return if it is missing or an error. | ||
func GetObject( |
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.
Moved this so it could be used by other controller logic
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
d5df76e
to
8965ff9
Compare
setupLog.Error(err, "unable to create controller", "controller", "Queue") | ||
os.Exit(1) | ||
} | ||
//if err = (&corecontrollers.QueueReconciler{ |
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.
Commenting this out for now to avoid any NPEs in this intermediate state where the queue client can be nil.
Given that queues can be updated outside of Operator/CRD, how will we reconcile those changes? |
I am under the impression that someone would want to use the Queue CRs for a GitOps workflow. In such a scenario manually manipulating queues through Admittedly I'm not very familiar with building controllers so I'm not sure if reconciliation will happen without triggers from CR updates or not. If not, we might want to have some background trigger to prevent drift between the CR and reality. |
@Sovietaced it would be an anti-pattern to update via Kubernetes Operators watch and reconcile changes for CRDs, but it does not know anything about queues which are a concept in Armada, so it won't do anything if the queue got updated externally. |
@Sovietaced, on a successful reconcile, you could return |
Pull Request Template
Description
This pull request implements logic for the queue controller but does not wire it up to actually work yet. The queue controller reconciles queue custom resources against the Armada server so that queues can be managed by GitOps instead of using
armadactl
manually.I wanted to break this pull request out since I think the wiring part will be where most of the discussion and back/forth will be. The next pull request will include code for how to configure the API connection to the Armada API server and how to load that config through helm charts.
As part of this pull request I re arranged some of the common helpers so they could be used by the queue reconciling logic too.
Related to #323
Please select the type of change your PR introduces:
How Has This Been Tested?
This pull request includes unit tests and has been tested against our production environment.
Checklist: