GithubHelp home page GithubHelp logo

Comments (6)

linjmeyer avatar linjmeyer commented on August 10, 2024

Possibly related #114

from dotnet-kube-client.

tintoy avatar tintoy commented on August 10, 2024

Hi :)

It's been a while since I looked through the dynamic resource client, but from what I remember it doesn't dynamically query the cluster's list of available resource types unless you explicitly ask it to (as this can add an unexpected degree of startup cost depending on how much configuration data is returned by the API and so default behaviour is to pre-populate it from type annotations on well-known resource models).

DynamicResourceClient has an ApiMetadata property which contains information about all known resource APIs, and you can tell it to load all resource type definitions from from the cluster using something like:

await _kubeApiClient.Dynamic().ApiMetadata.Load(_kubeApiClient, clearExisting: true);

(there should probably be an extension method on IDynamicResourceClient to do this)

from dotnet-kube-client.

tintoy avatar tintoy commented on August 10, 2024

You can also define API models with annotations if you prefer and use them to populate the API metadata, using:

Assembly modelAssembly = typeof(MyModel).Assembly;

_kubeApiClient.Dynamic().ApiMetadata.LoadFromMetadata(modelAssembly, clearExisting: false);

from dotnet-kube-client.

tintoy avatar tintoy commented on August 10, 2024

Ah, sorry, just had a closer look and the issue may be that the API version (v1beta1) is being used in preference to the API group-version (networking.isio.io/v1beta1). I'll see what I can do about that.

from dotnet-kube-client.

tintoy avatar tintoy commented on August 10, 2024

Ok, I have a pull request open that will hopefully fix your problem, but I need to run it by a couple of our existing consumers / contributors to get their take on this 🙂

from dotnet-kube-client.

linjmeyer avatar linjmeyer commented on August 10, 2024

Awesome thanks! Appreciate the quick turn around time on that, and the tip for the custom models is great too. Right now I just need the labels from the CRD resources but I'll likely need to extend that in the future.

from dotnet-kube-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.