This repository contains sample code related to Kubernetes controllers. They are shared as-is under the Apache License v2.0.
Package | Description |
---|---|
podlister |
List all the pods in a target namespace at every 'tick' interval. A Prometheus instance is set up to scrape the total request count |
crd/dynamic |
Sample code on how to use the dynamic client and unstructured.Unstructured package to create and list custom resources |
crd/typed |
Sample code on how to use the code-generator to auto-generate the CRD clients, informers and helpers. To update these auto-generated code, run make generate |
upgrade/kubelet |
(WIP) Automate the upgrades of kubelets in a cluster |
snapdiff |
An aggregated API server that explores the implementation of an in-memory storage to store the custom resources, and the Kubernetes LIST pagination mechanism |
cbt-aggapi |
An aggregated API server that explores the implementation of the rest.Connecter interface, used to serve long list of entries without putting the Kubernetes API server and etcd in the data retrieval path |
The code in the crd
package uses the
envtest
package to set up a test environment containing an API server and etcd. To
extract the binaries, run make testenv-bin