This is a simple helloworld application for DevOps tech test, written in Go version 1.16
The application listens on port 1337
by default.
Following are the endpoints available.
/
/healthz
/greetings
There is no time limit for this exercise, however we would recommend you aim to complete the exercise in 2-3 hours.
Once you are happy with your solution, commit and push your work back up to this repository in a branch named solution
.
Please commit your work in a way that each task can be easily identified in the commit history and cherry-picked.
The work we want committed should be enough for us to independently repeat your results.
Please do not make any code change to the helloworld application itself, but you are free to install applications on Kubernetes that may help you to complete task #3 and #4.
-
Create a single Dockerfile to build and run the application into a deployable container image.
The final image should only contain the application binary. -
Setup and run a single node Kubernetes either locally or on a local VM.
Please document or script the approach you have taken so we can repeat it. -
You have a choice:
3a. Create a Helm chart for helloworld
OR
3b. Create a Kustomization for helloworldRegardless of what you choose, the application should be:
- Highly available
- Accessible publicly through an ingress
- Configured so that kubelet knows:
- when a container is ready to start accepting traffic
- when a container is in an unhealthy state and needs to be restarted
-
Use Terraform, and the Terraform Helm Provider or the Terraform Kubernetes Provider respectively, to deploy your Helm chart into your Kubernetes instance.
Ensure you can request the/greetings
endpoint from outside your Kubernetes instance and receive a response. -
The application endpoint
/greetings
looks for an environment variable namedCANDIDATE_FIRSTNAME
in order to display the message properly.
Update your chart or deployment to set this environment variable to your first name so the page shows something likeHello xxx, welcome to Hello World!
Please include some guidance on how to repeat your results, if necessary.
Good luck!