You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: improve documentation fpr the project and add necessary and missed items
This pull request introduces several significant updates to the KubeOps
project, focusing on improving documentation, establishing community
standards, and enhancing usability. The most notable changes include the
addition of a Code of Conduct, a Security Policy, and extensive updates
to the `README.md` to provide clearer guidance and promote the project's
features. Additionally, new documentation for the KubeOps CLI has been
added.
### Community Standards and Policies:
* Added a `CODE_OF_CONDUCT.md` file, adopting the Contributor Covenant
Code of Conduct to ensure a welcoming and inclusive community
environment.
* Introduced a `SECURITY.md` file outlining the security policy,
supported versions, and the process for reporting vulnerabilities.
* Updated `CONTRIBUTING.md` to reference the new Code of Conduct and
provide guidance on reporting unacceptable behavior.
### Documentation Enhancements:
* Overhauled the `README.md` to include a detailed project overview, key
features, getting started instructions, and governance information. This
update aims to make the project more accessible to new contributors and
users.
[[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L1-R77)
[[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L48-R100)
* Added a new `docs/cli.md` file documenting the KubeOps CLI, including
installation instructions, available commands, and usage examples.
This is the repository of "KubeOps" - The dotnet Kubernetes Operator SDK.
9
+
**KubeOps** is a [Kubernetes Operator](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/) SDK designed for [.NET](https://dotnet.microsoft.com/) developers. It allows you to leverage your C# skills and the rich .NET ecosystem to build powerful Kubernetes controllers that automate the management of complex applications. KubeOps simplifies operator development by providing high-level abstractions, code generators, and helper utilities.
10
+
11
+
**For comprehensive documentation, tutorials, and API references, please visit the official [KubeOps Documentation Site](https://buehler.github.io/dotnet-operator-sdk/).**
12
+
13
+
The documentation is also provided within the code itself (description of methods and classes), and each package contains a README with further information.
14
+
15
+
## Key Features
16
+
17
+
***Define CRDs in C#:** Model your [Custom Resource Definitions (CRDs)](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) using plain C# classes and attributes.
18
+
***Controller Logic:** Implement reconciliation logic using the `IResourceController<TEntity>` interface.
19
+
***Finalizers:** Easily add cleanup logic before resource deletion with `IResourceFinalizer<TEntity>`.
20
+
***Webhooks:** Create [Admission](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/) (validating/mutating) and [Conversion](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#webhook-conversion) webhooks integrated with ASP.NET Core.
21
+
***Code Generation:** Includes Roslyn source generators and a CLI tool (`dotnet kubeops`) to automate boilerplate code for CRDs, controllers, and RBAC rules.
22
+
***Enhanced Kubernetes Client:** Provides convenience methods built on top of the official client library.
23
+
***Leader Election:** Automatic handling for high-availability operator deployments.
24
+
***Testing Support:** Provides utilities and patterns to help with unit and integration testing.
25
+
26
+
## Getting Started
27
+
28
+
The quickest way to start building an operator with KubeOps is by using the CLI tool:
29
+
30
+
1.**Install the CLI:**
31
+
```bash
32
+
dotnet tool install --global KubeOps.Cli
33
+
```
34
+
*(Or `dotnet tool update --global KubeOps.Cli` to get the latest version)*
35
+
36
+
2. **Create a new operator project:**
37
+
```bash
38
+
dotnet kubeops new operator MyOperator
39
+
cd MyOperator
40
+
```
41
+
42
+
3. **Explore the code:** The template generates a basic operator structure with a sample custom resource, controller, and finalizer.
8
43
9
-
The documentation is provided in the code itself (description of the methods and classes)
10
-
and each package contains a README with further information/documentation. For a more
11
-
detailed documentation, head to the [GitHub Pages](https://buehler.github.io/dotnet-operator-sdk/).
44
+
4. **Dive deeper:** Follow the tutorials and guides on the [KubeOps Documentation Site](https://buehler.github.io/dotnet-operator-sdk/).
12
45
13
46
## Packages
14
47
15
-
All packages support .NET8.0 and higher. The reason is that modern C# features are
16
-
used and client libraries are optimized for .NET 8.0 and up.
17
-
Also, the KubernetesClient package follows the same strategy regarding the
|[KubeOps.Abstractions](./src/KubeOps.Abstractions/README.md)| Contains abstractions, attributes, etc. for the SDK |[](https://www.nuget.org/packages/KubeOps.Abstractions/absoluteLatest)|
24
-
|[KubeOps.Cli](./src/KubeOps.Cli/README.md)| CLI Dotnet Tool to generate stuff |[](https://www.nuget.org/packages/KubeOps.Cli/absoluteLatest)|
25
-
|[KubeOps.Generator](./src/KubeOps.Generator/README.md)| Source Generator for the SDK |[](https://www.nuget.org/packages/KubeOps.Generator/absoluteLatest)|
26
-
|[KubeOps.KubernetesClient](./src/KubeOps.KubernetesClient/README.md)| Extended client to communicate with the Kubernetes API |[](https://www.nuget.org/packages/KubeOps.KubernetesClient/absoluteLatest)|
27
-
|[KubeOps.Operator](./src/KubeOps.Operator/README.md)| Main SDK entrypoint to create an operator |[](https://www.nuget.org/packages/KubeOps.Operator/absoluteLatest)|
28
-
|[KubeOps.Operator.Web](./src/KubeOps.Operator.Web/README.md)| Web part of the operator (for webhooks) |[](https://www.nuget.org/packages/KubeOps.Operator.Web/absoluteLatest)|
29
-
|[KubeOps.Transpiler](./src/KubeOps.Transpiler/README.md)| Transpilation helpers for CRDs and RBAC elements |[](https://www.nuget.org/packages/KubeOps.Transpiler/absoluteLatest)|
48
+
All packages target [.NET 8.0](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8/overview) and [.NET 9.0](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview), leveraging modern C# features. The underlying Kubernetes client library (`KubernetesClient.Official`) also follows this versioning strategy.
49
+
50
+
The SDK is designed to be modular. You can include only the packages you need:
| [KubeOps.Abstractions](./src/KubeOps.Abstractions/README.md) | Defines core interfaces, attributes (like `[KubernetesEntity]`), and base classes used across the SDK. Essential for defining your custom resources and controllers. | [](https://www.nuget.org/packages/KubeOps.Abstractions/absoluteLatest) |
55
+
| [KubeOps.Cli](./src/KubeOps.Cli/README.md) | A [.NET Tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools) providing commands for scaffolding projects, generating [Custom Resource Definitions (CRDs)](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/), and more. | [](https://www.nuget.org/packages/KubeOps.Cli/absoluteLatest) |
56
+
| [KubeOps.Generator](./src/KubeOps.Generator/README.md) | Contains [Roslyn Source Generators](https://docs.microsoft.com/en-us/dotnet/csharp/roslyn-sdk/source-generators-overview) to automate boilerplate code generation for CRDs and controllers based on your definitions. | [](https://www.nuget.org/packages/KubeOps.Generator/absoluteLatest) |
57
+
| [KubeOps.KubernetesClient](./src/KubeOps.KubernetesClient/README.md) | Provides an enhanced client for interacting with the [Kubernetes API](https://kubernetes.io/docs/reference/kubernetes-api/), built on top of the official `KubernetesClient` library. Offers convenience methods for common operator tasks. | [](https://www.nuget.org/packages/KubeOps.KubernetesClient/absoluteLatest) |
58
+
| [KubeOps.Operator](./src/KubeOps.Operator/README.md) | The main engine of the SDK. Handles reconciling resources, watching for changes, and managing the operator lifecycle. This is the primary package needed to run an operator. | [](https://www.nuget.org/packages/KubeOps.Operator/absoluteLatest) |
59
+
| [KubeOps.Operator.Web](./src/KubeOps.Operator.Web/README.md) | Integrates the operator with ASP.NET Core to expose endpoints for features like [Admission Webhooks](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/). | [](https://www.nuget.org/packages/KubeOps.Operator.Web/absoluteLatest) |
60
+
| [KubeOps.Transpiler](./src/KubeOps.Transpiler/README.md) | Utilities for converting .NET type definitions into Kubernetes YAML manifests, specifically for [CRDs](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/) and [RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) rules. | [](https://www.nuget.org/packages/KubeOps.Transpiler/absoluteLatest) |
61
+
62
+
*Note: NuGet badges show the latest pre-release version.*
63
+
64
+
## Examples
65
+
66
+
You can find various example operators demonstrating different features in the [`examples/`](https://github.com/ewassef/dotnet-operator-sdk/tree/main/examples/) directory of this repository.
67
+
68
+
## Governance
69
+
70
+
KubeOps is currently maintained by [the original author/maintainer team - consider listing names or linking to GitHub profiles/team page]. We welcome community contributions and aim to foster an open and collaborative development process. As the project grows, we may establish a more formal governance structure. Decision-making primarily occurs through GitHub issues and pull requests.
30
71
31
72
## Contribution
32
73
33
74
If you want to contribute, feel free to open a pull request or write issues :-)
34
-
Read more about contribution (especially for setting up your local environment)
35
-
in the [CONTRIBUTING file](./CONTRIBUTING.md).
75
+
Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
76
+
By participating in this project you agree to abide by its terms.
77
+
+
78
+
Read more about contribution (especially for setting up your local environment)
79
+
in the [CONTRIBUTING file](./CONTRIBUTING.md).
36
80
37
81
In short:
38
82
@@ -45,6 +89,12 @@ In short:
45
89
46
90
## Motivation
47
91
48
-
The motivation was to learn more about the quirks of kubernetes itself and
49
-
provide an alternative to kubebuilder and operator sdk which are both
50
-
written in GoLang.
92
+
KubeOps aims to provide a first-class experience for developing Kubernetes operators within the .NET ecosystem, offering an alternative to Go-based SDKs like Kubebuilder and Operator SDK, while embracing familiar C# patterns and tooling.
93
+
94
+
**Why choose KubeOps?**
95
+
96
+
***Leverage your .NET Skills:** Build operators using C#, a language you already know, with access to the extensive .NET Base Class Library and NuGet ecosystem.
97
+
***Strong Typing & IDE Support:** Benefit from compile-time checks and rich IDE features like IntelliSense and debugging.
98
+
***Simplified Abstractions:** Focus on your reconciliation logic, not Kubernetes API boilerplate.
99
+
***Code Generation:** Reduce manual effort with generators for CRDs, RBAC, and controller/webhook registrations.
100
+
***Integrated Testing:** Develop unit and integration tests using familiar .NET testing frameworks.
0 commit comments