Skip to content

Commit 7e06f40

Browse files
authored
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.
1 parent 4492249 commit 7e06f40

File tree

26 files changed

+3055
-96
lines changed

26 files changed

+3055
-96
lines changed

CODE_OF_CONDUCT.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[INSERT PROJECT EMAIL ADDRESS].
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within the
113+
community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.1, available at
119+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder].
123+
124+
For answers to common questions about this code of conduct, see the FAQ at
125+
[https://www.contributor-covenant.org/faq][faq]. Translations are available
126+
at [https://www.contributor-covenant.org/translations][translations].
127+
128+
[homepage]: https://www.contributor-covenant.org
129+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130+
[Mozilla's code of conduct enforcement ladder]: https://github.com/mozilla/diversity
131+
[faq]: https://www.contributor-covenant.org/faq
132+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
First of all, thank you for considering contributing to KubeOps.
44
This is an open souce project and shall be driven by the community.
55

6+
This project and everyone participating in it is governed by the
7+
[KubeOps Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are
8+
expected to uphold this code. Please report unacceptable behavior by
9+
[opening a new issue](https://github.com/buehler/dotnet-operator-sdk/issues/new) with the title prefixed with '[CODE OF CONDUCT]'.
10+
611
This document describes how contributions may be done and what is required
712
to develop on KubeOps.
813

README.md

Lines changed: 75 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,82 @@
1-
# KubeOps
1+
# KubeOps
2+
3+
**Build Kubernetes Operators in .NET with Ease**
24

35
[![.NET Pre-Release](https://github.com/buehler/dotnet-operator-sdk/actions/workflows/dotnet-release.yml/badge.svg?branch=main)](https://github.com/buehler/dotnet-operator-sdk/actions/workflows/dotnet-release.yml)
46
[![.NET Release](https://github.com/buehler/dotnet-operator-sdk/actions/workflows/dotnet-release.yml/badge.svg?branch=release)](https://github.com/buehler/dotnet-operator-sdk/actions/workflows/dotnet-release.yml)
57
[![Scheduled Code Security Testing](https://github.com/buehler/dotnet-operator-sdk/actions/workflows/security-analysis.yml/badge.svg?event=schedule)](https://github.com/buehler/dotnet-operator-sdk/actions/workflows/security-analysis.yml)
68

7-
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.
843

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/).
1245

1346
## Packages
1447

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
18-
framework versions.
19-
The following packages exist:
20-
21-
| Package | Description | Latest Version |
22-
|----------------------------------------------------------------------|--------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
23-
| [KubeOps.Abstractions](./src/KubeOps.Abstractions/README.md) | Contains abstractions, attributes, etc. for the SDK | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Abstractions?label=nuget%20prerelease)](https://www.nuget.org/packages/KubeOps.Abstractions/absoluteLatest) |
24-
| [KubeOps.Cli](./src/KubeOps.Cli/README.md) | CLI Dotnet Tool to generate stuff | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Cli?label=nuget%20prerelease)](https://www.nuget.org/packages/KubeOps.Cli/absoluteLatest) |
25-
| [KubeOps.Generator](./src/KubeOps.Generator/README.md) | Source Generator for the SDK | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Generator?label=nuget%20prerelease)](https://www.nuget.org/packages/KubeOps.Generator/absoluteLatest) |
26-
| [KubeOps.KubernetesClient](./src/KubeOps.KubernetesClient/README.md) | Extended client to communicate with the Kubernetes API | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.KubernetesClient?label=nuget%20prerelease)](https://www.nuget.org/packages/KubeOps.KubernetesClient/absoluteLatest) |
27-
| [KubeOps.Operator](./src/KubeOps.Operator/README.md) | Main SDK entrypoint to create an operator | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Operator?label=nuget%20prerelease)](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) | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Operator.Web?label=nuget%20prerelease)](https://www.nuget.org/packages/KubeOps.Operator.Web/absoluteLatest) |
29-
| [KubeOps.Transpiler](./src/KubeOps.Transpiler/README.md) | Transpilation helpers for CRDs and RBAC elements | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Transpiler?label=nuget%20prerelease)](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:
51+
52+
| Package | Description | Latest Version |
53+
|----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
54+
| [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. | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Abstractions?label=nuget%20prerelease)](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. | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Cli?label=nuget%20prerelease)](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. | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Generator?label=nuget%20prerelease)](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. | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.KubernetesClient?label=nuget%20prerelease)](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. | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Operator?label=nuget%20prerelease)](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/). | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Operator.Web?label=nuget%20prerelease)](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. | [![Nuget](https://img.shields.io/nuget/vpre/KubeOps.Transpiler?label=nuget%20prerelease)](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.
3071

3172
## Contribution
3273

3374
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).
3680

3781
In short:
3882

@@ -45,6 +89,12 @@ In short:
4589

4690
## Motivation
4791

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

Comments
 (0)