Comments (8)
I am interested in helping with this issue. I was wondering if you had thoughts on how to handle this already or if a design doc or something similar has been created?
from controller-runtime.
@shawn-hurley Not yet, though I think the interface shouldn't change, it should just accept unstructured objects. Would you be willing to put together a 1-2 page doc on the topic before getting started?
From a high level:
- The client commands and controller.Watch / source. Kind should accept unstructured objects (they already do)
- Unstructured objects must have the GVK specified in the object
- client / source should work with the unstructured object the way they would with other runtime.Objects
One question is whether the cache should be shared between unstructured and hard-coded objects for the same GVK. As long as it is consistent and predictable I think either way is good.
from controller-runtime.
@shawn-hurley FWIW, this might already work. I think the first task is to try it and see if it works or not, then dig in deeper.
from controller-runtime.
@pwittrock I think that it would work with a single unstructured type, but if you used two then the client-cache: https://github.com/kubernetes-sigs/controller-runtime/blob/master/pkg/client/client_cache.go#L79-L84 will overwrite the GVK for one fo the types.
Am I correct in that reading of the code?
I will work on getting an example to test this theory as well.
Thanks!
from controller-runtime.
aah, yeah, we probably would need a key that's like TypeOf(obj) unless IsUnstructured(obj) else SpecialUnstructuredKeyWithKind
.
from controller-runtime.
or have a separate map for unstructured objects.
from controller-runtime.
@pwittrock @DirectXMan12 I am working on getting an example of using two different unstructured types to test this theory out and to have something to test with.
Which would you prefer the second map if the type is Unstructured or some other mechanism? I would think that two maps might make it more clear?
from controller-runtime.
Two maps is probably clearer.
from controller-runtime.
Related Issues (20)
- CreateOrUpdate ergonomics in presence of defaults HOT 2
- adding opts for WatchFunc in informers HOT 1
- 🐛 Webhook builder allows passing in more than one `For` type which gets overridden by the last type.
- Go Version Format is incorrect HOT 3
- github.com/prometheus/common v0.48.0 is incompatible with Kubernetes HOT 4
- Allow modifying context per `Reconcile(ctx context.Context, req ctrl.Request)` HOT 3
- Incompatibility Issue with controller-runtime Version Pinning and envtest Setup - It is requiring go 1.22 when the latest release still using go 1.21 as old project versions HOT 3
- Unstructured converter panics if the destination struct contains private fields HOT 3
- Multi Cluster Example / Pattern HOT 9
- Panic in `runnableGroup`'s `Add` and `StopAndWait` due to a data race HOT 1
- Cannot run / install specific versions of setup-envtest due to missing submodule tag HOT 2
- Data race during manager shutdown HOT 2
- Add a validation script to verify go.mod is in sync with k/k HOT 3
- Enhancement of Authentication and Authorization Filters to Allow Custom Configurations and Stability Improvements HOT 4
- Data race with various client APIs HOT 3
- Allow to ignore globalPredicates for specific resources HOT 1
- Undefined SwitchMetric Error with client-go 0.30.0 in Go Vet HOT 8
- Use setup-envtest from (test) code HOT 18
- Semantic version is incorrect for setup-envtest HOT 3
- Default Liveness and Readiness endpoints return 404
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from controller-runtime.