Skip to content

Commit 883917c

Browse files
committed
docs: Update README and add other docs
Signed-off-by: Teddy Andrieux <teddy.andrieux@scality.com>
1 parent 9c0ef10 commit 883917c

4 files changed

Lines changed: 135 additions & 56 deletions

File tree

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contributing to the Project
2+
3+
This document contains and defines the rules that have to be followed by any
4+
contributor to the project, in order for any change to be merged into the
5+
stable branches.
6+
7+
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
8+
9+
## Workflow Guidelines
10+
11+
### Committing Guidelines
12+
13+
No restrictions are placed at this time on individual commits passing in the
14+
CI and/or maintaining full functionality of the repository.
15+
16+
Commit messages should:
17+
18+
* have a short (< 50 characters) summary as title
19+
* contain more explanations, if necessary, in the body
20+
* contain a reference to the issue being tackled in the body
21+
22+
A commit message should *not* contain a reference to the issue in the title.
23+
24+
### Pull Request Guidelines
25+
26+
Pull requests should contain in their body a reference to the GitHub issue
27+
being targeted by the changeset introduced.
28+
29+
### Signing your work
30+
31+
In order to contribute to the project, you must sign your work. By signing your
32+
work, you certify to the statements set out in the Developer Certificate of
33+
Origin ([developercertificate.org](https://developercertificate.org/))
34+
35+
Signing your work is easy. Just add the following line at the end of each of
36+
your commit messages. You must use your real name in your sign-off.
37+
38+
```
39+
Signed-off-by: Jane Doe <jane.doe@email.com>
40+
```
41+
42+
If your `user.name` and `user.email` are set in your git configs, you can sign
43+
each commit automatically by using the `git commit -s` command.
44+
45+
## Reporting an issue
46+
47+
This project uses Github issues to manage the issues.
48+
49+
Before creating an issue:
50+
51+
1. upgrade the operator to the latest supported release version, and check whether your bug is still present,
52+
2. ensure the operator version is supported by the PowerDNS version you are using,
53+
3. have a look in the opened issues if your problem is already known/tracked, and possibly contribute to the thread with your own information.
54+
55+
If none of the above was met, open an issue directly in Github, select the appropriate issue template and fill-in each section when applicable.
56+
57+
## Development Setup
58+
59+
### Prerequisites
60+
61+
- go version v1.25.0+
62+
- docker
63+
- kubectl
64+
- make
65+
- operator-sdk
66+
- Docker (for building)
67+
- Kind (for running e2e tests)
68+
69+
We recommend using the [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers)
70+
provided here that come with all necessary tools pre-installed.
71+
72+
## Testing & Linting
73+
74+
Run linting:
75+
```sh
76+
make lint
77+
```
78+
79+
Run tests:
80+
```sh
81+
make test
82+
```
83+
84+
Run e2e tests:
85+
```sh
86+
make test-e2e
87+
```
88+
89+
**NOTE:** Run `make help` for more information on all potential `make` targets

DESIGN.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Design
2+
3+
## Goal
4+
5+
The goal of the CRL Operator is to provide automated management of
6+
Certificate Revocation Lists (CRLs) within Kubernetes environments. It aims to simplify the
7+
deployment, updating, and maintenance of CRLs as custom resources as well as
8+
patching ClusterIssuer/Issuer resources from cert-manager to include CRL distribution points.
9+
10+
## Technical Details
11+
12+
The CRL Operator is built using the Operator SDK and follows the
13+
Kubernetes Operator pattern. It defines a Custom Resource Definition (CRD) for
14+
ManagedCRL resources, which represent individual CRLs to be managed by the operator. The operator
15+
watches for changes to ManagedCRL resources and performs the necessary actions to
16+
ensure that the CRLs are correctly deployed and updated within the cluster.

README.md

Lines changed: 23 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1+
[![Post Merge](https://github.com/scality/crl-operator/actions/workflows/post-merge.yaml/badge.svg)](https://github.com/scality/crl-operator/actions/workflows/post-merge.yaml)
2+
13
# crl-operator
2-
// TODO(user): Add simple overview of use/purpose
4+
5+
A Kubernetes operator for managing Certificate Revocation Lists (CRLs) in your cluster
6+
based on ClusterIssuer/Issuer resources from cert-manager.
37

48
## Description
5-
// TODO(user): An in-depth paragraph about your project and overview of use
9+
10+
The CRL Operator provides automated management of Certificate Revocation Lists within
11+
Kubernetes environments. It enables cluster administrators to deploy, update, and maintain
12+
CRLs as custom resources.
13+
14+
The CRL can also be exposed in a Pod via an NGINX server, allowing clients to retrieve
15+
the CRL using HTTP requests internally using a Kubernetes Service or externally via
16+
an Ingress resource (that can be managed by the operator as well).
17+
18+
The operator handles CRL lifecycle management, periodic updates, and patch of ClusterIssuer/Issuer
19+
resources from cert-manager to include CRL distribution points.
620

721
## Getting Started
822

923
### Prerequisites
1024
- go version v1.25.0+
11-
- docker version 17.03+.
12-
- kubectl version v1.11.3+.
13-
- Access to a Kubernetes v1.11.3+ cluster.
25+
- docker
26+
- kubectl
27+
- Access to a Kubernetes v1.32+ cluster
1428

1529
### To Deploy on the cluster
1630
**Build and push your image to the location specified by `IMG`:**
@@ -21,7 +35,7 @@ make docker-build docker-push IMG=<some-registry>/crl-operator:tag
2135

2236
**NOTE:** This image ought to be published in the personal registry you specified.
2337
And it is required to have access to pull the image from the working environment.
24-
Make sure you have the proper permission to the registry if the above commands dont work.
38+
Make sure you have the proper permission to the registry if the above commands don't work.
2539

2640
**Install the CRDs into the cluster:**
2741

@@ -45,9 +59,10 @@ You can apply the samples (examples) from the config/sample:
4559
kubectl apply -k config/samples/
4660
```
4761

48-
>**NOTE**: Ensure that the samples has default values to test it out.
62+
>**NOTE**: Ensure to update the sample CRs to fit your needs before applying them to the cluster.
4963
5064
### To Uninstall
65+
5166
**Delete the instances (CRs) from the cluster:**
5267

5368
```sh
@@ -66,56 +81,9 @@ make uninstall
6681
make undeploy
6782
```
6883

69-
## Project Distribution
70-
71-
Following the options to release and provide this solution to the users.
72-
73-
### By providing a bundle with all YAML files
74-
75-
1. Build the installer for the image built and published in the registry:
76-
77-
```sh
78-
make build-installer IMG=<some-registry>/crl-operator:tag
79-
```
80-
81-
**NOTE:** The makefile target mentioned above generates an 'install.yaml'
82-
file in the dist directory. This file contains all the resources built
83-
with Kustomize, which are necessary to install this project without its
84-
dependencies.
85-
86-
2. Using the installer
87-
88-
Users can just run 'kubectl apply -f <URL for YAML BUNDLE>' to install
89-
the project, i.e.:
90-
91-
```sh
92-
kubectl apply -f https://raw.githubusercontent.com/<org>/crl-operator/<tag or branch>/dist/install.yaml
93-
```
94-
95-
### By providing a Helm Chart
96-
97-
1. Build the chart using the optional helm plugin
98-
99-
```sh
100-
operator-sdk edit --plugins=helm/v1-alpha
101-
```
102-
103-
2. See that a chart was generated under 'dist/chart', and users
104-
can obtain this solution from there.
105-
106-
**NOTE:** If you change the project, you need to update the Helm Chart
107-
using the same command above to sync the latest changes. Furthermore,
108-
if you create webhooks, you need to use the above command with
109-
the '--force' flag and manually ensure that any custom configuration
110-
previously added to 'dist/chart/values.yaml' or 'dist/chart/manager/manager.yaml'
111-
is manually re-applied afterwards.
112-
11384
## Contributing
114-
// TODO(user): Add detailed information on how you would like others to contribute to this project
115-
116-
**NOTE:** Run `make help` for more information on all potential `make` targets
11785

118-
More information can be found via the [Kubebuilder Documentation](https://book.kubebuilder.io/introduction.html)
86+
See [contributing](CONTRIBUTING.md) for details.
11987

12088
## License
12189

config/samples/crl-operator_v1alpha1_managedcrl.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ metadata:
66
app.kubernetes.io/managed-by: kustomize
77
name: managedcrl-sample
88
spec:
9-
# TODO(user): Add fields here
9+
issuerRef:
10+
name: my-ca-issuer
11+
kind: ClusterIssuer
12+
expose:
13+
enabled: true
14+
ingress:
15+
host: crl.example.com

0 commit comments

Comments
 (0)