-
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
fix: Add liveness and readiness probes #339
Conversation
Signed-off-by: Jason Parraga <[email protected]>
Signed-off-by: Jason Parraga <[email protected]>
@@ -274,10 +275,12 @@ func (r *ExecutorReconciler) createDeployment( | |||
ImagePullPolicy: corev1.PullIfNotPresent, | |||
Image: ImageString(executor.Spec.Image), | |||
Args: []string{appConfigFlag, appConfigFilepath}, | |||
Ports: newContainerPortsMetrics(config), | |||
Ports: newContainerPortsHTTPWithMetrics(config), |
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.
This is a bug fix since the executor does have an HTTP server.
@@ -314,10 +315,12 @@ func newSchedulerDeployment( | |||
ImagePullPolicy: corev1.PullIfNotPresent, | |||
Image: ImageString(scheduler.Spec.Image), | |||
Args: []string{"run", appConfigFlag, appConfigFilepath}, | |||
Ports: newContainerPortsGRPCWithMetrics(config), | |||
Ports: newContainerPortsAll(config), |
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.
Another bug fix since the scheduler has all the ports.
@@ -371,6 +380,36 @@ func createEnv(crdEnv []corev1.EnvVar) []corev1.EnvVar { | |||
return envVars | |||
} | |||
|
|||
func CreateProbesWithScheme(scheme corev1.URIScheme) (*corev1.Probe, *corev1.Probe) { |
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.
The values here are pretty standardized for now but we might want to support customization later.
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.
Yeah, seems good enough for starters.
Signed-off-by: Jason Parraga <[email protected]>
84b45bd
to
90e9d45
Compare
Description
The pull request updates various controllers to add readiness & liveness probes to containers where applicable. These probes should help indicate when it is safe to cutover to new deployments.
I cross referenced https://github.com/armadaproject/armada/tree/master/deployment (I may have found some bugs in here tho) as well as each application's config structs to understand which ports they expose.
Fixes #334
Type of change
Please select the type of change your PR introduces:
How Has This Been Tested?
Added unit tests to assert the fully generated deployment with probes.
Checklist: