From fb9f1e4c6f3386452d818497aad133c695feced5 Mon Sep 17 00:00:00 2001 From: HighPon Date: Mon, 16 Dec 2024 03:59:38 +0000 Subject: [PATCH] fix: k8s manifest for exportation --- cmd/index/job/exportation/sample.yaml | 2 +- k8s/index/job/exportation/cronjob.yaml | 19 ++++--------------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/cmd/index/job/exportation/sample.yaml b/cmd/index/job/exportation/sample.yaml index 4cc6ce98fd..4ed586d02f 100644 --- a/cmd/index/job/exportation/sample.yaml +++ b/cmd/index/job/exportation/sample.yaml @@ -75,7 +75,7 @@ exporter: index_path: "/var/export/index" gateway: addrs: - - localhost:20000 + - vald-lb-gateway.default.svc.cluster.local:8081 health_check_duration: "1s" connection_pool: enable_dns_resolver: true diff --git a/k8s/index/job/exportation/cronjob.yaml b/k8s/index/job/exportation/cronjob.yaml index 60768bbf77..4c3ceda683 100644 --- a/k8s/index/job/exportation/cronjob.yaml +++ b/k8s/index/job/exportation/cronjob.yaml @@ -51,7 +51,8 @@ spec: pyroscope.io/port: "6060" spec: initContainers: - - name: wait-for-agent + initContainers: + - name: wait-for-gateway-lb image: busybox:stable imagePullPolicy: Always command: @@ -59,20 +60,8 @@ spec: - -e - -c - | - until [ "$(wget --server-response --spider --quiet http://vald-agent.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do - echo "waiting for agent to be ready..." - sleep 2; - done - - name: wait-for-discoverer - image: busybox:stable - imagePullPolicy: Always - command: - - /bin/sh - - -e - - -c - - | - until [ "$(wget --server-response --spider --quiet http://vald-discoverer.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do - echo "waiting for discoverer to be ready..." + until [ "$(wget --server-response --spider --quiet http://vald-lb-gateway.default.svc.cluster.local:3001/readiness 2>&1 | awk 'NR==1{print $2}')" == "200" ]; do + echo "waiting for gateway-lb to be ready..." sleep 2; done containers: