A collection of mini-programs covering various client-go use cases inspired by client-go/examples. The intention (at least so far) is to test (more or less) fresh version of Go and packages against a few latest Kubernetes versions.
What tested at the moment:
go 1.17
k8s.io/client-go v0.23.1
Kubernetes v1.22.3
All examples expect minikube
with at least two Kubernetes clusters - shared1
and shared2
.
curl -sLS https://get.arkade.dev | sudo sh
arkade get minikube kubectl
minikube start --profile shared1
minikube start --profile shared2
Oversimplified (for now):
cd <program>
go run main.go
- Add more assertions to mini-programs
- Test different Kubernetes versions
- Setup GitHub action(s)
- Examples to be covered
- setting API request timeout
- configuring API request throttling
delete
delete collection
list
filtrationwatch
filtrationinformer
filtrationpatch
with different strategiesServer Side Apply
(SSA)- working with subresources
ownerReference
(one and many)- optimistic locking and
retry.RetryOnConflict
workqueue
- controllers' fundamentals- https://stackoverflow.com/questions/56115197/how-to-idiomatically-fill-empty-fields-with-default-values-for-kubernetes-api-ob