Kubernetes Operator for Scaling Resources on Cron Schedules
Overview
Create a Kubernetes Operator that scales up resources by a certain percentage at a certain time and restores the original configuration after a specified duration has passed. Design a CRD interface for the operator and write the controller logic to implement the scaling behavior.
Assume that the operator is intended to be used with typical web server deployments that already have a Horizontal Pod Autoscaler configured. An example use case might be to scale up resources by 20% at 8:50 AM, expecting a large traffic spike around that time.
The utility should prioritize maintainability and be designed as if it would be handed off to another team for continued use and development.
Submission Instructions
- Work from this repo locally.
- Build the utility and commit your work locally.
- Compress the repo into
{YOUR_NAME}.tar.gz
and return it via email to infra+sre-practical@xxxxxx.com
.
- Be sure to submit by the designated time.
Deliverables
All documentation, code, tests, etc should be committed to this repository.
Evaluation Criteria
Correctness
TeamSnap will build and deploy the operator to test that it works as is documented.
Maintainability
Is the code clean and well-documented?
Notes
Feel free to use any libraries, frameworks, or tools that you deem appropriate. We found it useful to use this sdk https://sdk.operatorframework.io/ when designing this challenge.
Make reasonable assumptions where information is missing but document them clearly.
We value your time, this test is designed to take 1-2 hours and has a strict deadline to avoid overworking the problem.
If you have partially completed work you wish to be considered, please create an unfinished
branch. Utilize the main
branch (master
in my case) for your mainline, completed work.