Skip to content

Repository files navigation

cocoon-webhook

Kubernetes admission webhook for the cocoonstack VM platform, enforcing controller ownership and lifecycle constraints before resources reach the VM controllers.

Documentation: cocoonstack.github.io/cocoon-webhook (source in docs/).

Highlights

  • Pods entering the cocoon gate through the virtual-kubelet.io/provider toleration or the vm.cocoonstack.io/name annotation require a CocoonSet owner and an allowlisted requester. This applies on CREATE and on UPDATE from outside the gate; updates to already gated Pods remain allowed.
  • Scale-down is blocked on cocoon-tolerated Deployments and StatefulSets.
  • CocoonSet validation checks cross-field rules and reserves room for derived snapshot names before a VM is created.
  • CocoonHibernation validation allows at most one live object per Pod.

Related projects

Project Role
cocoon-common CRD types, annotation contract, shared helpers
cocoon-operator CocoonSet and CocoonHibernation reconcilers
vk-cocoon Virtual kubelet provider managing VM lifecycle

Development

make build          # build cocoon-webhook binary
make test           # vet + race-detected tests
make lint           # golangci-lint on linux + darwin
make fmt            # gofumpt + goimports

License

MIT

About

Kubernetes admission webhook for cocoon workloads: admits VM-backed pods only from the CocoonSet controller, validates CocoonSet and CocoonHibernation specs, and rejects scale-down that would destroy VM state.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages