Skip to content

silvermullet/dinghy-ping

Repository files navigation

Dinghy Ping

GitHub Super-Linter Helm Lint and Test Helm Chart Release Docker Release Docker Latest

Tuple

dinghy

Dinghy Ping is a simple network debugging interface meant to be deployed into your compute infrastructure (ie, Kubernetes). Used for debugging network connectivity to other services local to Dinghy Ping or external to the compute infrastructure (egress). Meant to answer simple connectivity questions developers might have when deploying their applications to a container orchestration setup where routing and accessibility may be different from their local development environments.

dinghy ping input

Helm Install

Helm must be installed to use the charts. Please refer to Helm's documentation to get started.

Once Helm has been set up correctly, add the repo as follows:

helm repo add dinghy-ping https://silvermullet.github.io/dinghy-ping

If you had already added this repo earlier, run helm repo update to retrieve the latest versions of the packages. You can then run helm search repo dinghy-ping to see the charts.

To install the dinghy-ping chart:

helm install my-dinghy-ping dinghy-ping/dinghy-ping

To uninstall the chart:

helm delete my-dinghy-ping

Requirements

  • If using a LoadBalancer with your ingress, there may be some configuration requirements to support web sockets. For example, an AWS ELB must be using "tcp" for backend request. See this for more details as to why: kubernetes/ingress-nginx#3746

Display for response headers

Screen Shot 2019-07-25 at 11 05 32 AM

Formated display for response body

Screen Shot 2019-07-25 at 11 07 28 AM

Streaming Pod logs, per namespace

dinghy_logs_streaming_g1

Dinghy ping single endpoint

curl "http://127.0.0.1/dinghy/ping/https/google.com"

Dinghy ping single endpoint with params

curl "http://127.0.0.1/dinghy/ping/https/www.google.com/search?source=hp&ei=aIHTW9mLNuOJ0gK8g624Ag&q=dinghy&btnK=Google+Search&oq=dinghy&gs_l=psy-ab.3..35i39l2j0i131j0i20i264j0j0i20i264j0l4.4754.5606..6143...1.0..0.585.957.6j5-1......0....1..gws-wiz.....6..0i67j0i131i20i264.oe0qJ9brs-8"

Dinghy ping multiple sites

# dinghy-ping multiple sites
curl -vX POST "http://127.0.0.1/dinghy/ping/domains" \
  -d @tests/multiple_domains.json \
  --header "Content-Type: application/json"

Deployment pod logs API

# 1000 line truncated response
curl "https://127.0.0.1/deployment-logs/kube-addons/dinghy-ping?json=true?preview=true"
# Full logs 
curl "https://127.0.0.1/deployment-logs/kube-addons/dinghy-ping?json=true"

Local development on Mac with Docker controlled K8s

Install Docker for MacOS and enable Kubernetes
  • requires Docker for Mac 2.x or greater
  • Enable Kubernetes on Docker for Mac under preferences
  • Python 3.x
  • Python Poetry
  • Install Tilt

Install Python Poetry

curl -sSL https://install.python-poetry.org | python3 -

Tilt

poetry install
tilt up

Navigate to http://127.0.0.1:8080/

Run tests
pytest tests/