Skip to content

Commit 08a3024

Browse files
committed
describe workflow
1 parent f56c62f commit 08a3024

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,30 @@ spec:
5050
caDir: "https://pebble:14000/dir"
5151
RegistrationMail: "[email protected]"
5252
```
53+
54+
# Workflow
55+
56+
## EncryptedDomain controller
57+
58+
Location: [controllers/encrypteddomain_controller.go](https://github.com/OperatingOpenShift/le-operator/blob/main/controllers/encrypteddomain_controller.go)
59+
60+
This controller figures out which domains match the regex in the CR definition and generates a new certificate if none of the existing certificates match the hostname, or if they are close to expiry.
61+
62+
The private key used by the operator for each EncryptedDomain as well as all requested certificates are stored in the [CR status](https://github.com/OperatingOpenShift/le-operator/blob/f56c62f503a433ec1a15944b87bebb90601f2aec/api/v1beta1/encrypteddomain_types.go#L45).
63+
64+
For each route it tries to manage, the controller will first iterate over all existing EncryptedDomain CRs to figure if any of those already manages the route hostname to avoid conflicts and race conditions.
65+
66+
If a matching certificate is found for the route, the operator will use it and upate the route CR.
67+
68+
For certificate renewal, the [HTTP-01 challenge](https://letsencrypt.org/docs/challenge-types/#http-01-challenge) is used.
69+
70+
Lego will start a web server for the challenge, the operator creates a service, route, and proxy pod in the route namespace to forward challenge traffic to the web service.
71+
72+
When a new certificate is received, the operator will store it in the status and update the route CR.
73+
74+
75+
## Route controller
76+
77+
Location: [controllers/encrypteddomain_controller.go](https://github.com/OperatingOpenShift/le-operator/blob/main/controllers/route.go)
78+
79+
This controller will check routes in the OpenShift cluster for matching EncryptedDomains and update the route with existing certificates or request new certificates, as described above.

0 commit comments

Comments
 (0)