Skip to content

Instantly share code, notes, and snippets.

@ryuheechul
Last active December 3, 2018 05:45
Show Gist options
  • Save ryuheechul/0be8149be82a53fa81f43692339af7f4 to your computer and use it in GitHub Desktop.
Save ryuheechul/0be8149be82a53fa81f43692339af7f4 to your computer and use it in GitHub Desktop.
prctl - Probe and Resource ConTroL (for k8s)

prctl - Probe and Resource ConTroL (for k8s)

Just an Gist idea for now

Why?

  • It's mundane to edit every Deployment in your k8s cluster to have your desired state for Liveness/Readiness Probe and Resources for each container
  • Manaul operations also don't help collaborations of discussions to have right values for the states

How this would be better than manual approach?

  • One(ish) place to read and edit desired states
  • Keep alerting if the state of the container is different than the repository linked
  • Can change the state of a Deployment with just a simple single click(ish) way provided by an alert
  • Can have default state for not specified Deployments per Namespace
  • Can be used by other tools like Observe and Suggest better state ™ which is also my new idea for a new tool yet

Roadmap

if this ever get started

  • Print current state of every Container in every Deployment by Namespace
  • Decide the first version of the format for the desired state; Probably will use yaml for that
  • Suggest to change the state of any Container if it's different than what you described in the repository
  • Repeat the process above by a schedule like a CronJob
  • That's it for now

Glossary

the repository

Thinking to use either git or s3 to save/edit desired states; Probably not Configmap.. but who knows

@ryuheechul
Copy link
Author

A technology called Kubernetes Operators might be a good tool to implement this feature

an example of an Operator: https://sysdig.com/blog/kubernetes-monitoring-prometheus-operator-part3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment