kubernetes-operator

module
v0.0.0-...-5429bc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2024 License: MIT

README

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
  1. Work from this repo locally.
  2. Build the utility and commit your work locally.
  3. Compress the repo into {YOUR_NAME}.tar.gz and return it via email to infra+sre-practical@xxxxxx.com.
  4. 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.

Directories

Path Synopsis
api
v1
Package v1 contains API Schema definitions for the infra v1 API group +kubebuilder:object:generate=true +groupName=infra.31780.com
Package v1 contains API Schema definitions for the infra v1 API group +kubebuilder:object:generate=true +groupName=infra.31780.com
internal
test

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL