Skip to content

Commit

Permalink
Update hack/e2e/test.sh
Browse files Browse the repository at this point in the history
Co-authored-by: Maël Valais <mael@vls.dev>
  • Loading branch information
wallrj and maelvls authored Nov 26, 2024
1 parent 7e0b8d0 commit 4545a5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hack/e2e/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ kubectl logs deployments/venafi-kubernetes-agent \
| timeout 60 jq 'if .msg | test("Data sent successfully") then . | halt_error(0) end'
set -o pipefail

# Create a unique TLS Secret and wait for it to appear in the Venafi certificate inventory API
commonname="venafi-kubernetes-agent-e2e.$(uuidgen)"
# Create a unique TLS Secret and wait for it to appear in the Venafi certificate
# inventory API. The case conversion is due to macOS' version of uuidgen which
# prints UUIDs in upper case, but DNS labels need lower case characters.
commonname="venafi-kubernetes-agent-e2e.$(uuidgen | tr '[:upper:]' '[:lower:]').example.com"
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls.key -out /tmp/tls.crt -subj "/CN=$commonname" 2>/dev/null
kubectl create secret tls "$commonname" --cert=/tmp/tls.crt --key=/tmp/tls.key -o yaml --dry-run=client | kubectl apply -f -

Expand Down

0 comments on commit 4545a5e

Please sign in to comment.