Giter Site home page Giter Site logo

Comments (8)

buehler avatar buehler commented on July 26, 2024 1

Nice :-)
Yes I thought of that (the testing issue) when I first created the project, but back then I was more like "meh...". Now It makes absolute sense. I accidently closed your pull request when I merged my refactoring branch. I'm gonna tackle the issue right away. The goal could be to have a release today or tomorrow :-)

from dotnet-operator-sdk.

buehler avatar buehler commented on July 26, 2024 1

Since the two of us have quite a difference in time between Australia and Switzerland, I took the liberty of updating the readme and splitting out the testing package myself

from dotnet-operator-sdk.

buehler avatar buehler commented on July 26, 2024

Code linting is inserted to have some kind of code style #46

from dotnet-operator-sdk.

ocdi avatar ocdi commented on July 26, 2024

I started laying out IOperatorBuilder and did the obvious one AddController.

To handle finalizers I was thinking of making the AddController method look something like this, that way you can chain the finalizers and keep the context of the controller.

public OperatorBuilder AddController<T>(Action<ControllerBuilder<T>>? builder = null)
    where T : class, IResourceController
{
    _services.AddResourceController<T>();
    if (builder != null)
    {
        var cb = new ControllerBuilder<T>();
        builder(cb);
    }

    return this;
}

public class ControllerBuilder<T>
{
    public ControllerBuilder<T> Finalizer<TFin>()
    {
        return this;
    }
}

I'm not sure what to do in the Finalizer method yet though. It would be nice if we could register this as a dependency specifically to be inserted to T for the IResourceController but I don't know how to do that generically.

If we do go down this road, the ControllerBuilder should probably have a reference to the OperatorBuilder and we should expose a Services property so we can do additional DI registrations.

from dotnet-operator-sdk.

buehler avatar buehler commented on July 26, 2024

Mhmm. Yea I know what you mean. I've got an idea about this.

from dotnet-operator-sdk.

buehler avatar buehler commented on July 26, 2024

One big question remains on how we can add the "commands" that I added for convenience to install / uninstall crds and generate stuff?

from dotnet-operator-sdk.

ocdi avatar ocdi commented on July 26, 2024

I think most of the checklist is now done! The only possible thing I would suggest is the removal of the test code from KubeOps. I guess it probably comes down to is the test code making it easier for your unit tests in the project or for consumers of the library to make unit tests. My suggested approach would be creating a KubeOps.Testing package that can contain the test code.

What are your thoughts on that?

from dotnet-operator-sdk.

github-actions avatar github-actions commented on July 26, 2024

🎉 This issue has been resolved in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from dotnet-operator-sdk.

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.