Readiness probe should be configurable for sidecar charms

Bug #1922265 reported by Tom Haddon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Unassigned

Bug Description

I've been working on a proof of concept sidecar charm, and I've noticed that it's configured with a readiness probe as follows:

$ microk8s.kubectl describe pod gunicorn-0 -n gunicorn | grep Readiness
    Readiness: http-get http://:3856/readiness delay=30s timeout=1s period=10s #success=1 #failure=2

I'm not sure how to change this to use the correct port for the workload it's running (in this case it should be port 80 rather than port 3856).

I've confirmed that if I have four instances of this charm running and connected to my ingress charm (which creates a kubernetes ingress and service) if I switch to a broken image (using `juju attach gunicorn gunicorn-image='gunicorncharmers/gunicorn-base:edge'`) then all four pods in turn are restarted to use the broken image. If we could configure the readiness probe then I'd have a way of stopping this process from breaking every unit in my application.

Tom Haddon (mthaddon)
tags: added: sidecar
description: updated
John A Meinel (jameinel)
Changed in juju:
importance: Undecided → High
milestone: none → 2.9.1
status: New → Triaged
Tom Haddon (mthaddon)
tags: added: sidecar-charm
removed: sidecar
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9.1 → 2.9.2
Changed in juju:
milestone: 2.9.2 → 2.9.3
Ian Booth (wallyworld)
Changed in juju:
milestone: 2.9.3 → 2.9-next
Ben Hoyt (benhoyt)
Changed in juju:
milestone: 2.9-next → none
Revision history for this message
Ben Hoyt (benhoyt) wrote :

Pebble now includes service auto-restarting and custom health checks, with level="alive" and level="ready" checks being used for K8s liveness/readiness probes in the context of Juju. These features were released in Juju 2.9.26 and are documented from here on: https://juju.is/docs/sdk/pebble#heading--service-auto-restart

Hopefully this gives you the level (so to speak!) of control you need. Let me know if you find anything amiss or if the documentation is lacking.

Changed in juju:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.