From 9d692593198902d43e62ae1b3c7b37dbf36f62ef Mon Sep 17 00:00:00 2001 From: xuezhao Date: Wed, 12 Jun 2024 18:20:36 +0800 Subject: [PATCH] fix config checker error. (#199) Signed-off-by: xuezhaojun --- .gitignore | 2 ++ cmd/addon-agent/main.go | 1 + .../templates/addon-agent-deployment.yaml | 16 ++++++++-------- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 42130a32..89baa3c7 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ cluster-proxy-*.tgz /testbin join.sh + +vendor/* diff --git a/cmd/addon-agent/main.go b/cmd/addon-agent/main.go index 8931a665..fec5a45c 100644 --- a/cmd/addon-agent/main.go +++ b/cmd/addon-agent/main.go @@ -91,6 +91,7 @@ func main() { if err != nil { klog.Fatalf("failed create certificates checker: %v", err) } + cc.SetReload(true) go serveHealthProbes(ctx.Done(), ":8888", map[string]healthz.Checker{ "certificates": cc.Check, diff --git a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml index 5d56660c..412acdbd 100644 --- a/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml +++ b/pkg/proxyagent/agent/manifests/charts/addon-agent/templates/addon-agent-deployment.yaml @@ -54,6 +54,14 @@ spec: privileged: false runAsNonRoot: true readOnlyRootFilesystem: true + livenessProbe: + httpGet: + path: /healthz + scheme: HTTP + port: 8888 + initialDelaySeconds: 10 + failureThreshold: 1 + periodSeconds: 10 env: {{- if .Values.proxyConfig.HTTP_PROXY }} - name: HTTP_PROXY @@ -101,14 +109,6 @@ spec: privileged: false runAsNonRoot: true readOnlyRootFilesystem: true - livenessProbe: - httpGet: - path: /healthz - scheme: HTTP - port: 8888 - initialDelaySeconds: 10 - failureThreshold: 3 - periodSeconds: 10 volumeMounts: - name: hub-kubeconfig mountPath: /etc/kubeconfig/