Chris Loukas
20a136a73c
Revisit random-delay
...
If enabled it will still delay randomly between 0-5 seconds.
However, the functionality to fine grain this is added.
Both seconds and milliseconds are supported now. Moreover,
min/max values for random delay can be condigured through
pflag params
2020-06-25 11:41:21 +03:00
stefanprodan
3197ad3e45
Register hostname and version in cache
...
If the caching server is online, podinfo registers its hostname and version in Redis. The set expires after one minute and it's refreshed every 30 seconds.
2020-05-20 13:51:07 +03:00
stefanprodan
5ba5808722
Add cache CRUD API
2020-05-20 12:59:27 +03:00
stefanprodan
73b658d711
Add cache API
...
- implement cache with Redis
- add cache-server to args and config
- add Redis deployment to webapp overlays
2020-05-16 09:53:17 +03:00
stefanprodan
ba12154f68
Format imports
2020-03-24 13:03:51 +02:00
Hidde Beydals
ed2a774e10
Add --unhealthy and --unready flags
...
Depending on the flag set, the healthy or ready state is never
reached.
2020-01-23 21:06:22 +01:00
Yusuke Kuoka
0ff49e5057
feat: Add H2C support
...
`podinfo --h2c` allows upgrading a HTTP/1.1 connection to HTTP/2 Cleartext.
This allows `podinfo` to be used in e.g. a H2C load-test like `echo "GET http://localhost:9898/status/200 " | vegeta -h2c`, or a H2C connectivity test like done with `curl -v http2 http://localhost:9898/status/200 `.
I have manually verified this to work by running `curl -v --http2` on macOS and seeing the H2C upgrade happens onl when `-h2c` is provided to `podinfo`.
Without `-h2c`:
```
$ curl -v --http2 localhost:9898/status/200
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9898 (#0 )
> GET /status/200 HTTP/1.1
> Host: localhost:9898
> User-Agent: curl/7.54.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=utf-8
< X-Content-Type-Options: nosniff
< Date: Mon, 04 Nov 2019 04:58:01 GMT
< Content-Length: 19
<
{
"status": 200
* Connection #0 to host localhost left intact
}
```
With `-h2c`:
```
$ curl -v --http2 localhost:9898/status/200
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 9898 (#0 )
> GET /status/200 HTTP/1.1
> Host: localhost:9898
> User-Agent: curl/7.54.0
> Accept: */*
> Connection: Upgrade, HTTP2-Settings
> Upgrade: h2c
> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA
>
< HTTP/1.1 101 Switching Protocols
< Connection: Upgrade
< Upgrade: h2c
* Received 101
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Connection state changed (MAX_CONCURRENT_STREAMS updated)!
< HTTP/2 200
< content-type: application/json; charset=utf-8
< x-content-type-options: nosniff
< content-length: 19
< date: Mon, 04 Nov 2019 04:58:28 GMT
<
{
"status": 200
* Connection #0 to host localhost left intact
}
`
2019-11-04 14:10:50 +09:00
stefanprodan
c5df50c774
Make UI logo URL configurable
2019-10-12 17:41:21 +03:00
stefanprodan
a12d0a1ed7
Add support for multiple backends
...
When calling /echo, the backends requests will be run in parallel and the results are aggregated and returned to the caller as a json array
2019-09-27 11:52:22 +03:00
stefanprodan
02d7f06d35
Release 2.1.0
2019-08-07 15:54:03 +03:00
stefanprodan
555450868e
Move Swagger doc to server.go
2019-08-07 15:22:05 +03:00
stefanprodan
94085d6dc6
Add schemes to Swagger docs
2019-08-07 15:17:34 +03:00
stefanprodan
e97c926611
Add license to swagger docs
2019-08-07 14:54:33 +03:00
stefanprodan
2479134e78
Implement swagger support
...
- add swagger definitions for all API routes
- self-host the swagger UI on `/swagger/`
- serve swagger spec on `/swagger.json`
2019-08-07 14:17:35 +03:00
stefanprodan
c287ab7daf
Rename imports and use go modules
2019-08-06 15:05:15 +03:00
Ian Duffy
198211e20b
Add delayed chunk endpoint
...
Adds an endpoint that does chunk based encoding. The endpoint just stalls
and eventually returns the stall time.
Similar to the delay endpoint but in a chunked maner.
Fixed up the metrics interceptor to wrap ResponseWriter correctly too.
2019-08-04 00:34:12 +01:00
stefanprodan
951d82abb9
Add option to run the metrics exporter on a different port
...
Add port-metrics flag, when specified the Prometheus /metrics endpoint will be exposed on that port.
2019-06-15 17:07:34 +03:00
stefanprodan
62ccb1b67e
run go 1.11 fmt
2018-12-20 09:41:08 +02:00
Stefan Prodan
1af24bd3cd
Run gofmt
2018-10-26 18:20:54 +03:00
Stefan Prodan
18a22d1b94
Add shutdown delay (wait for the readiness probe)
2018-09-25 12:01:01 +03:00
Stefan Prodan
59cd692141
Add websocket echo handler
2018-09-11 22:13:54 +03:00
Stefan Prodan
6c98fbf1f4
Add JWT token issue and validate handlers
2018-09-10 11:36:11 +03:00
Stefan Prodan
54f6d9f74d
Add env handler
2018-09-10 01:29:49 +03:00
Stefan Prodan
979fd669df
Use gorilla mux route name as Prometheus path label
2018-08-21 15:19:21 +03:00
Stefan Prodan
d362dc5f81
Set env var prefix to PODINFO
2018-08-21 11:58:37 +03:00
Stefan Prodan
593ccaa0cd
Add random delay and errors middleware
2018-08-21 03:12:20 +03:00
Stefan Prodan
0f098cf0f1
Add config file support
2018-08-21 02:02:47 +03:00
Stefan Prodan
f2d95bbf80
Add logging middleware and log level option
2018-08-20 17:03:07 +03:00
Stefan Prodan
774d34c1dd
Rewrite HTTP server with gorilla mux
2018-08-20 11:29:11 +03:00
Stefan Prodan
f13d006993
Add Kubernetes probes handlers
2018-08-20 11:28:06 +03:00
Stefan Prodan
aeeb146c2a
Add UI handler
2018-08-20 11:27:40 +03:00
Stefan Prodan
11bd74eff2
Add local storage read/write handler
2018-08-20 11:27:08 +03:00
Stefan Prodan
af6d11fd33
Add panic handler
2018-08-20 11:26:24 +03:00
Stefan Prodan
49746fe2fb
Add fscache reader handler
2018-08-20 11:26:08 +03:00
Stefan Prodan
da24d729bb
Add runtime info handler
2018-08-20 11:25:36 +03:00
Stefan Prodan
449fcca3a9
Add HTTP status code handler
2018-08-20 11:25:15 +03:00
Stefan Prodan
2b0a742974
Add echo headers handler
2018-08-20 11:24:49 +03:00
Stefan Prodan
153f4dce45
Add echo handler with backend propagation
2018-08-20 11:24:23 +03:00
Stefan Prodan
4c8d11cc3e
Add delay handler
2018-08-20 11:23:45 +03:00
Stefan Prodan
08415ce2ce
Add version handler
2018-08-20 11:23:13 +03:00