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