From db00cca99a2bba044e15609ab3d9ec2c9ddaef46 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Thu, 27 Mar 2025 02:09:49 -0400 Subject: [PATCH] Implement exponential backoff by configuring kube-client env vars --- .../templates/linux/cloudwatch-agent-custom-resource.yaml | 6 ++++++ charts/amazon-cloudwatch-observability/values.yaml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-custom-resource.yaml b/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-custom-resource.yaml index 1fbd9d3..8bb67f1 100644 --- a/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-custom-resource.yaml +++ b/charts/amazon-cloudwatch-observability/templates/linux/cloudwatch-agent-custom-resource.yaml @@ -229,6 +229,12 @@ spec: - name: K8S_CLUSTER_NAME value: {{ $.Values.clusterName }} {{- with $.Values.tolerations }} + {{- if $.Values.k8sClientExponentialBackoff.enabled }} + - name: KUBE_CLIENT_BACKOFF_BASE + value: {{ $.Values.k8sClientExponentialBackoff.backoffBaseSeconds | quote }} + - name: KUBE_CLIENT_BACKOFF_DURATION + value: {{ $.Values.k8sClientExponentialBackoff.backoffMaxDurationSeconds | quote }} + {{- end }} tolerations: {{- toYaml . | nindent 2}} {{- end }} --- diff --git a/charts/amazon-cloudwatch-observability/values.yaml b/charts/amazon-cloudwatch-observability/values.yaml index 6370b17..3752616 100644 --- a/charts/amazon-cloudwatch-observability/values.yaml +++ b/charts/amazon-cloudwatch-observability/values.yaml @@ -1451,3 +1451,7 @@ neuronMonitor: - SYS_ADMIN serviceAccount: name: # override exporter service account name +k8sClientExponentialBackoff: + enabled: true + backoffBaseSeconds: 1 + backoffMaxDurationSeconds: 120 \ No newline at end of file