Skip to content

Commit

Permalink
example: replace wget with bash magic
Browse files Browse the repository at this point in the history
Fixes #1254

Sadly envoyproxy/proxy does not ship with wget, or curl, so resort to
bash-fu to hit Envoy's healthcheck/fail endpoint.

Signed-off-by: Dave Cheney <dave@cheney.net>
  • Loading branch information
davecheney committed Aug 16, 2019
1 parent 96cbecd commit a51b662
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 6 deletions.
9 changes: 8 additions & 1 deletion examples/deployment-grpc-v2/02-contour.yaml
Expand Up @@ -69,7 +69,14 @@ spec:
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
command:
- bash
- -c
- --
- echo
- -ne
- "POST /healthcheck/fail HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
- '>/dev/tcp/localhost/9001'
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
Expand Down
9 changes: 8 additions & 1 deletion examples/ds-grpc-v2/02-contour.yaml
Expand Up @@ -70,7 +70,14 @@ spec:
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
command:
- bash
- -c
- --
- echo
- -ne
- "POST /healthcheck/fail HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
- '>/dev/tcp/localhost/9001'
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
Expand Down
9 changes: 8 additions & 1 deletion examples/ds-hostnet-split/03-envoy.yaml
Expand Up @@ -70,7 +70,14 @@ spec:
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
command:
- bash
- -c
- --
- echo
- -ne
- "POST /healthcheck/fail HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
- '>/dev/tcp/localhost/9001'
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
initContainers:
Expand Down
9 changes: 8 additions & 1 deletion examples/ds-hostnet/02-contour.yaml
Expand Up @@ -74,7 +74,14 @@ spec:
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
command:
- bash
- -c
- --
- echo
- -ne
- "POST /healthcheck/fail HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
- '>/dev/tcp/localhost/9001'
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
Expand Down
9 changes: 8 additions & 1 deletion examples/render/daemonset-rbac.yaml
Expand Up @@ -260,7 +260,14 @@ spec:
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
command:
- bash
- -c
- --
- echo
- -ne
- "POST /healthcheck/fail HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
- '>/dev/tcp/localhost/9001'
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
Expand Down
9 changes: 8 additions & 1 deletion examples/render/deployment-rbac.yaml
Expand Up @@ -259,7 +259,14 @@ spec:
lifecycle:
preStop:
exec:
command: ["wget", "-qO-", "--post-data=''", "http://localhost:9001/healthcheck/fail"]
command:
- bash
- -c
- --
- echo
- -ne
- "POST /healthcheck/fail HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n"
- '>/dev/tcp/localhost/9001'
initContainers:
- image: gcr.io/heptio-images/contour:master
imagePullPolicy: Always
Expand Down

0 comments on commit a51b662

Please sign in to comment.