Skip to content

Commit

Permalink
Update Makefile to poll for CSR creation (aws#49)
Browse files Browse the repository at this point in the history
* Update Makefile to poll for CSR creation
  • Loading branch information
pshuman-heb committed Apr 3, 2020
1 parent ae2d415 commit 25793ab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ deploy-config: prep-config
kubectl apply -f deploy/deployment.yaml
kubectl apply -f deploy/service.yaml
kubectl apply -f deploy/mutatingwebhook-ca-bundle.yaml
sleep 1
until kubectl get csr -o \
jsonpath='{.items[?(@.spec.username=="system:serviceaccount:default:pod-identity-webhook")].metadata.name}' | \
grep -m 1 "csr-"; \
do echo "Waiting for CSR to be created" && sleep 1 ; \
done
kubectl certificate approve $$(kubectl get csr -o jsonpath='{.items[?(@.spec.username=="system:serviceaccount:default:pod-identity-webhook")].metadata.name}')

delete-config:
Expand Down

0 comments on commit 25793ab

Please sign in to comment.