Comments (26)
Not at all - I think this is the best way to grow a client; when actual requirements arise, otherwise it's just guessing :)
Let me have a think about it for a day or so? I'll see what I can come up with.
from dotnet-kube-client.
Mmm, yeah if I drill into the events on my cluster I am not seeing the Labels. There is a label array within Metadata but it seems to always be empty.
from dotnet-kube-client.
Not much, I can do it this afternoon (it's 10am here in AU) if that suits. Just need to merge to master
(and tag it once the build / publish succeeds) :)
from dotnet-kube-client.
Got it and all builds fine. Thanks so much for being so responsive to ideas and changes! You set the standard for github repo management!
from dotnet-kube-client.
A good starting point might be https://github.com/tintoy/dotnet-kube-client#working-out-what-apis-to-call - can you try this out and see what APIs it's calling to do that?
from dotnet-kube-client.
Yeah I did in fact do that (from your previous advice!), and it's calling:
/api/v1/namespaces/default/events?fieldSelector=involvedObject.name%3Dmypodname-69bb65fc5c-slt69&limit=500
But I'm stuck on how to map that to an object in the api.
from dotnet-kube-client.
I'm guessing it's probably this. There's no KubeResourceClient
currently implemented for this API but I don't imagine it would be particularly difficult to do. The only tricky part may be discriminator-based deserialisation of the event data (different events would have different KubeObjectV1
-derived models as their body.
from dotnet-kube-client.
I did experiment with a custom JsonConverter before but I can't remember where it got up to. Let me have a look.
from dotnet-kube-client.
Yeah, looks like you've found the right api. And looks like I couldn't find the object because it isn't there! Back to the drawing board. ;-)
from dotnet-kube-client.
Hmm, can't find the JsonConverter (might be hidden on a branch somewhere). I might need to think about what the API for this would look like because it needs a set of k8s model types to be able to deserialise based on kind
/apiVersion
. It's totally doable, but so far we haven't needed to maintain a registry of model types. I take it you don't know ahead of time which models you'll need for deserialisation?
from dotnet-kube-client.
FWIW, we already have a model for this, just not a JsonConverter
that can handle it.
from dotnet-kube-client.
Indeed I don't know. As you may have guessed based on my questions over the last few months, I am slowly picking away at some of the core parts of the k8s dashboard that I want to show in our own UI which is tailored to just the parts of k8s that we use. So I may be stretching things for you a bit, my apologies!
from dotnet-kube-client.
I think I may have added some metadata caching (that could be reused / extended) as part of the dynamic API support used by PSKubectl, but I'll have to check.
from dotnet-kube-client.
Ah, so at least the initial part of this can be reused:
from dotnet-kube-client.
Ok - about to add IEventClientV1.
It looks like K8s events are a little complex, mind you, but this might be helpful:
https://lairdnelson.wordpress.com/2017/04/27/kubernetes-events-can-be-complicated/amp/
from dotnet-kube-client.
Ok - I think these changes will do what you need. Could you take a look at #85 and let me know what you think?
from dotnet-kube-client.
These changes look to be the right direction from my end. But I'd be better able to tell if I could try them out. Could you pull a build together that would let me try them?
from dotnet-kube-client.
There is a MyGet feed where packages from CI builds are published. Could you try using that?
from dotnet-kube-client.
You’re after version 2.3.0-dynamic-resource0053
of each package.
from dotnet-kube-client.
Yeah this will work nicely! Sweet. :-)
I'm not able to get labelSelectors to work, but I wonder if Events really support that? I'm getting nothing back from EventsV1().List("label=selector");
from dotnet-kube-client.
Hmm - according to the API docs, it should support that. But I suspect the issue may be that while ALL resources support label selectors, events are not labelled?
from dotnet-kube-client.
So I am good with these changes, thanks a TON!
What does it take in your process to get a mainstream release of this code?
from dotnet-kube-client.
Sorry, took longer to start this than I’d have liked - about to do it now :)
from dotnet-kube-client.
I'm still not seeing the expected 2.2.14 build, am I missing something?
from dotnet-kube-client.
Ugh, bloody GitVersion. Sometimes it doesn't increment the version as it should so the build failed when publishing to NuGet.
I've explicitly tagged the version and restarted the build.
from dotnet-kube-client.
Thanks!
from dotnet-kube-client.
Related Issues (20)
- Project direction / contributions HOT 7
- How is the ApiEndPoint configured for this parameter HOT 5
- Can I debug and load configMap locally? HOT 26
- IEventClientV1 fails to convert time value HOT 15
- Error while trying to create HorizontalPodAutoscaler with DynamicResourceClient HOT 7
- Aysnc methods on resource clients do not use standard Async naming conventions HOT 3
- Access full details of STATUS column from "kubectl get pod" HOT 1
- No authentication needed for url HOT 2
- KubeClient.Models.ObjectMetaV1.Annotations Should not be read-only
- Metadata doesn't get built for write-only models HOT 3
- WatchAll is missing for some resources HOT 4
- Field selectors for pods not implemented HOT 6
- Credential Plugins (AKS / AAD) Support HOT 1
- Detect current Pod namespace HOT 4
- Cannot find resource API for kind for Istio CRD HOT 6
- Upgrade to a newer version of YamlDotNet HOT 1
- CVE-2018-8292 | System.Net.Http HOT 2
- ExecAndConnect example yields 403 Forbidden HOT 1
- Cannot get output when using ExecAndConnect HOT 3
- Periods in ConfigMap keys get replaced by colons without any possibility of escape. HOT 7
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 dotnet-kube-client.