Adds a process-wide toggle that makes podinfo respond with HTTP 500 to all application endpoints while keeping Kubernetes probes, metrics, pprof and the control endpoints functional. This allows a single replica to be made selectively 'sick' to test client-side circuit breakers / outlier detection (Envoy, Istio DestinationRule.outlierDetection, etc.) without Kubernetes evicting the pod.
New endpoints:
POST /fault_injection/enable
POST /fault_injection/disable
GET /fault_injection/status
Includes unit tests for the handlers, the middleware behavior, and the path exclusion list.
Now it is possible to use the swagger webinterface
running on a host other than localhost e.g. in docker
or kubernetes.
Removed the @host line from pkg/api/server.go and
ran make swagger.
Fixes probably #179