@@ -133,11 +133,11 @@ subject="system:serviceaccount:venafi:venafi-components"
133
133
audience=" https://${VEN_API_HOST} "
134
134
issuerURL=" $( kubectl create token -n venafi venafi-components | step crypto jwt inspect --insecure | jq -r ' .payload.iss' ) "
135
135
openidDiscoveryURL=" ${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' )
137
137
138
138
# Create the Venafi agent service account if one does not already exist
139
139
while 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 \
141
141
| jq -r ' .[] | select(.issuerURL==$issuerURL and .subject == $subject) | .companyId' \
142
142
--arg issuerURL " ${issuerURL} " \
143
143
--arg subject " ${subject} " )
@@ -163,11 +163,12 @@ while true; do
163
163
--arg audience " ${audience} " \
164
164
--arg issuerURL " ${issuerURL} " \
165
165
--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} ) " \
168
168
| curl https://${VEN_API_HOST} /v1/serviceaccounts \
169
169
-H " tppl-api-key: $VEN_API_KEY " \
170
- -fsSL --json @-
170
+ --fail-with-body \
171
+ -sSL --json @-
171
172
done
172
173
173
174
kubectl apply -n venafi -f - << EOF
0 commit comments