As I learn new programming languages (e.g. Kotlin, Go) it'll be helpful to have a framework / rubric for evaluating how well they can handle real-world challenges.
Create a Kubernetes-based framework to help force this: I will "learn" the programming language by creating a new implementation which "passes" the framework's battery of tests. It should:
Accept a Docker image URI (forces the language to be Dockerizeable)
Spin up a new container running docker run ${URI} --config path/to/config.yaml, where config.yaml is a mounted configuration file of prespecified "shape". This forces parsing of both command line arguments and YAML files. If no --config value is specified, if the value is a non-existent path, or the path does not parse as YAML of the expected shape, fail with non-zero exit code.
port: 1234
target: http://some-other-service/
Run a process hosting an OpenAPI-documented spec that binds to the configured port. This forces a REST service + OpenAPI support.
The service should expose a GET /health endpoint that can be called from readiness and liveness probes.
Once alive, the service should expose an endpoint that accepts a POST /forward request like below and make the appropriate forwarded HTTP request to the configured target, passing on OpenTelemetry context headers and generating at least one OpenTelemetry trace along the way before proxying back the response.
As I learn new programming languages (e.g. Kotlin, Go) it'll be helpful to have a framework / rubric for evaluating how well they can handle real-world challenges.
Create a Kubernetes-based framework to help force this: I will "learn" the programming language by creating a new implementation which "passes" the framework's battery of tests. It should:
docker run ${URI} --config path/to/config.yaml
, whereconfig.yaml
is a mounted configuration file of prespecified "shape". This forces parsing of both command line arguments and YAML files. If no--config
value is specified, if the value is a non-existent path, or the path does not parse as YAML of the expected shape, fail with non-zero exit code.GET /health
endpoint that can be called from readiness and liveness probes.POST /forward
request like below and make the appropriate forwarded HTTP request to the configuredtarget
, passing on OpenTelemetry context headers and generating at least one OpenTelemetry trace along the way before proxying back the response.