Skip to content

Commit

Permalink
resolve issue reading amout of buindles
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Yacob <[email protected]>
  • Loading branch information
MarcosDY committed Sep 22, 2024
1 parent 7557f68 commit 3e9ec6e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

#!/bin/bash

MAX_RETRIES=10
RETRY_DELAY=2 # seconds between retries

Expand All @@ -19,7 +17,8 @@ for agent in "${agents[@]}"; do
-socketPath /opt/spire/sockets/workload_api.sock \
-write /tmp; then

bundleCount=$(docker compose exec -T $agent openssl x509 -in /tmp/bundle.0.pem | grep -c "BEGIN CERTIFICATE")
bundleCount=$(docker compose exec -T leafA-agent \
openssl storeutl -noout -text -certs /tmp/bundle.0.pem | grep -c "Certificate:")
if [ $bundleCount -eq 1 ]; then
log-debug "Validation successful for $agent: There is exactly one certificate in the chain."
break
Expand Down

0 comments on commit 3e9ec6e

Please sign in to comment.