@@ -133,11 +133,11 @@ subject="system:serviceaccount:venafi:venafi-components"
133133audience=" https://${VEN_API_HOST} "
134134issuerURL=" $( kubectl create token -n venafi venafi-components | step crypto jwt inspect --insecure | jq -r ' .payload.iss' ) "
135135openidDiscoveryURL=" ${issuerURL} /.well-known/openid-configuration"
136- jwksURI=$( curl -fsSL ${openidDiscoveryURL} | jq -r ' .jwks_uri' )
136+ jwksURI=$( curl --fail-with-body -sSL ${openidDiscoveryURL} | jq -r ' .jwks_uri' )
137137
138138# Create the Venafi agent service account if one does not already exist
139139while true ; do
140- tenantID=$( curl -fsSL -H " tppl-api-key: $VEN_API_KEY " https://${VEN_API_HOST} /v1/serviceaccounts \
140+ tenantID=$( curl --fail-with-body -sSL -H " tppl-api-key: $VEN_API_KEY " https://${VEN_API_HOST} /v1/serviceaccounts \
141141 | jq -r ' .[] | select(.issuerURL==$issuerURL and .subject == $subject) | .companyId' \
142142 --arg issuerURL " ${issuerURL} " \
143143 --arg subject " ${subject} " )
@@ -163,11 +163,12 @@ while true; do
163163 --arg audience " ${audience} " \
164164 --arg issuerURL " ${issuerURL} " \
165165 --arg jwksURI " ${jwksURI} " \
166- --argjson teams " $( curl https://${VEN_API_HOST} /v1/teams -fsSL -H tppl-api-key:\ ${VEN_API_KEY} ) " \
167- --argjson applications " $( curl https://${VEN_API_HOST} /outagedetection/v1/applications -fsSL -H tppl-api-key:\ ${VEN_API_KEY} ) " \
166+ --argjson teams " $( curl https://${VEN_API_HOST} /v1/teams --fail-with-body -sSL -H tppl-api-key:\ ${VEN_API_KEY} ) " \
167+ --argjson applications " $( curl https://${VEN_API_HOST} /outagedetection/v1/applications --fail-with-body -sSL -H tppl-api-key:\ ${VEN_API_KEY} ) " \
168168 | curl https://${VEN_API_HOST} /v1/serviceaccounts \
169169 -H " tppl-api-key: $VEN_API_KEY " \
170- -fsSL --json @-
170+ --fail-with-body \
171+ -sSL --json @-
171172done
172173
173174kubectl apply -n venafi -f - << EOF
0 commit comments