Created
June 7, 2019 01:47
-
-
Save ducas/b007535bd43854d161ba513097c56a98 to your computer and use it in GitHub Desktop.
DaemonSet that queries a web endpoint and prints out timing used for determining where latency may be introduced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: DaemonSet | |
metadata: | |
name: curl-check | |
labels: | |
app: curl-check | |
spec: | |
template: | |
metadata: | |
labels: | |
app: curl-check | |
spec: | |
containers: | |
- name: curl | |
image: byrnedo/alpine-curl | |
command: ["/bin/sh"] | |
env: | |
- name: HTTP_ENDPOINT | |
value: https://google.com/ | |
args: | |
- -c | |
- 'while true; do curl -w "code: %{http_code}, namelookup: %{time_namelookup}, connect: %{time_connect}, appconnect: %{time_appconnect}, pretransfer: %{time_pretransfer}, redirect: %{time_redirect}, starttransfer: %{time_starttransfer}, total: %{time_total}" -o /dev/null -s $HTTP_ENDPOINT; echo ", date: $(date --utc +%FT%TZ)"; sleep 10; done' | |
imagePullPolicy: Always | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment