mirror of
https://github.com/actions-runner-controller/actions-runner-controller.git
synced 2026-10-18 06:07:51 +02:00
Recreate the listener pod when its config secret changes
Replacing the integrity hash with a pod spec comparison lost the one signal the spec cannot carry. The listener mounts its config as a secret volume and parses it once at startup, so a change to the scale set URL, the TLS certificate, the metrics configuration or the scaler tuning only reaches the listener after a restart. The pod references the secret by name, so the spec is byte-identical before and after and the pod was never recreated. The desired pod now carries the config secret's resource version as an annotation, which is free to read and moves exactly when the secret is written. An empty annotation on the live pod is ignored so that pods created by an older controller are not all recreated on upgrade. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Copilot App
parent
2558bfa6a2
commit
f22def86e0
@@ -56,6 +56,13 @@ const (
|
||||
// runner spec from one that reported it against a spec that has since been
|
||||
// updated.
|
||||
AnnotationKeyActionableRevision = "actions.github.com/actionable-revision"
|
||||
// AnnotationKeyListenerConfigResourceVersion records the resource version of
|
||||
// the listener config secret the listener pod was created from. The pod
|
||||
// mounts that secret and parses it once at startup, so a change to its
|
||||
// contents only takes effect after a restart. Nothing about the change is
|
||||
// visible in the pod spec, which references the secret by name, so the
|
||||
// resource version is carried on the pod to make the drift observable.
|
||||
AnnotationKeyListenerConfigResourceVersion = "actions.github.com/listener-config-resource-version"
|
||||
)
|
||||
|
||||
// Labels applied to listener roles
|
||||
|
||||
Reference in New Issue
Block a user