buildkite / agent-stack-k8s

Spin up an autoscaling stack of Buildkite Agents on Kubernetes
MIT License
80 stars 31 forks source link

Config to prevent podSpec alteration from plugin #357

Closed DrJosh9000 closed 3 months ago

DrJosh9000 commented 3 months ago

What

Add a prohibit-kubernetes-plugin option, usable as either a flag or config option, which causes jobs to fail if they contain plugins: - kubernetes: ....

Why

This is an easy way to lock down a k8s cluster and prevent users from doing such things as:

etc etc

How

The main change is to introduce the prohibit-kubernetes-plugin flag and config value, and then use it throughout the scheduler.

Because this balances things out of favour of a k8sPlugin-centric interpretation of celestial mechanics, some useful refactors were in order: