Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/simonkrenger/echoenv

Container to show environment variables and HTTP request information. Useful for debugging.
https://github.com/simonkrenger/echoenv

container debugging-tool environment-variables kubernetes query-parameters

Last synced: about 2 months ago
JSON representation

Container to show environment variables and HTTP request information. Useful for debugging.

Awesome Lists containing this project

README

        

# echoenv

A small container that returns the environment variables plus some basic request information on port 8080.

Example:

```
$ podman run -d -p 8080:8080 quay.io/simonkrenger/echoenv
$ curl localhost:8080/abc | jq
{
"clientIP": "172.20.0.1",
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"HOSTNAME=95b22f86671a",
"GIN_MODE=release",
"container=podman",
"PORT=8080",
"HOME=/"
],
"hostname": "95b22f86671a",
"process": {
"gid": 0,
"pid": 1,
"uid": 0
},
"request": {
"header": {
"Accept": [
"*/*"
],
"User-Agent": [
"curl/7.66.0"
]
},
"host": "localhost:8080",
"method": "GET",
"protocol": "HTTP/1.1",
"requestURI": "/abc",
"url": {
"Scheme": "",
"Opaque": "",
"User": null,
"Host": "",
"Path": "/abc",
"RawPath": "",
"ForceQuery": false,
"RawQuery": "",
"Fragment": ""
}
}
}
```

Or as a `Pod`:

```
apiVersion: v1
kind: Pod
metadata:
name: echoenv-pod
labels:
app: echoenv
spec:
containers:
- name: echoenv
image: quay.io/simonkrenger/echoenv:latest
ports:
- containerPort: 8080
```