kubernetes / sample-controller

Repository for sample controller. Complements sample-apiserver
Apache License 2.0
3.12k stars 1.08k forks source link

errors after copying over source code and attempting build #101

Open lknite opened 1 month ago

lknite commented 1 month ago

switching from dotnet to go over the last couple months, working to implement my first go-based controller

plan was to start from this sample and go from there

copied the code from controller.go and after a 'go mod tidy' am getting the following errors when i compile:

./conNamespace.go:83:22: undefined: workqueue.TypedRateLimitingInterface
./conNamespace.go:108:27: undefined: workqueue.NewTypedMaxOfRateLimiter
./conNamespace.go:109:13: undefined: workqueue.NewTypedItemExponentialFailureRateLimiter
./conNamespace.go:110:14: undefined: workqueue.TypedBucketRateLimiter
./conNamespace.go:120:32: undefined: workqueue.NewTypedRateLimitingQueue

does this code still work? recommend another resource to create my first k8s controller instead of this sample? am i suppose to run an update-codegen.sh script?

lknite commented 1 month ago

looking into client-go