From e8f492f66eda872e6d737c3f0d825428cdbb1560 Mon Sep 17 00:00:00 2001 From: Mark McGarry Date: Tue, 15 Jul 2025 17:44:13 +0100 Subject: [PATCH] fix(injector-annotations): lease duration env var in vault config --- agent-inject/agent/annotations.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/agent-inject/agent/annotations.go b/agent-inject/agent/annotations.go index 3cff78fc..44f571d2 100644 --- a/agent-inject/agent/annotations.go +++ b/agent-inject/agent/annotations.go @@ -591,6 +591,10 @@ func Init(pod *corev1.Pod, cfg AgentConfig) error { pod.ObjectMeta.Annotations[AnnotationAgentDisableKeepAlives] = cfg.DisableKeepAlives } + if _, ok := pod.ObjectMeta.Annotations[AnnotationTemplateConfigLeaseRenewalThreshold]; !ok { + pod.ObjectMeta.Annotations[AnnotationTemplateConfigLeaseRenewalThreshold] = strconv.FormatFloat(cfg.LeaseRenewalThreshold, 'f', -1, 64) + } + // validate JSON patches if patch, ok := pod.ObjectMeta.Annotations[AnnotationAgentJsonPatch]; ok { // ignore empty string