Comments (8)
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.
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.
Code linting is inserted to have some kind of code style #46
from dotnet-operator-sdk.
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.
Mhmm. Yea I know what you mean. I've got an idea about this.
from dotnet-operator-sdk.
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.
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.
🎉 This issue has been resolved in version 2.0.0 🎉
The release is available on:
- GitHub release
v2.0.0
Your semantic-release bot 📦🚀
from dotnet-operator-sdk.
Related Issues (20)
- [bug]: System.Int32 is not a valid Kubernetes entity (inconsistently) HOT 1
- [bug]: Source generator fires for unit tests as well as operator HOT 3
- [feature]: Provide an option to skip the kubeops CLI during build HOT 2
- [bug]: v8.0.0 requeuing - polling stops completely after some time if status updated HOT 3
- [bug]: Cannot create mutation webhook with built-in resources HOT 1
- [bug]: Too old resource version HOT 3
- [bug]: No retry is performed when the ResourceWatcher fail to watch a resource HOT 12
- [bug]: KubeOps.CLI Tool does not contain the relevant documented functionality HOT 2
- [bug]: Length attribute with maxLength not filled generates incorrect OpenApiSpec
- [docs]: How does remote development work now? HOT 5
- [bug]: For adding Xunit for operators, on adding reference of the operator project shows amibiguous between methods or properties HOT 3
- [feature]: JsonSchema.Net.Generation for openapi schema generation? HOT 5
- [bug]: Nullable causes model binding error in webhooks HOT 5
- The automated release is failing 🚨 HOT 1
- [bug]: Watcher stops watching custom resource after some time HOT 1
- [bug]: SAN in Certificate for Service is incorrect HOT 2
- [bug]: Leadership election faulty when network timeout issues present HOT 7
- [bug]: Error refused errors generate too many error logs
- [feature]: Exponential backoff for entity controllers
- [bug]: k8s.KubernetesException: too old resource version: xxxx (xxxx) on re-connect HOT 3
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-operator-sdk.