Skip to content

Commit 62744e8

Browse files
committed
tailer-webhook: add simple cert-manager example
Signed-off-by: Szilard Parrag <szilard.parrag@axoflow.com>
1 parent 6c2afd5 commit 62744e8

File tree

1 file changed

+48
-1
lines changed

1 file changed

+48
-1
lines changed

content/docs/configuration/extensions/tailer-webhook.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,54 @@ Cons:
2323

2424
## Enable webhooks in Logging operator {#enable-webhooks}
2525

26-
> We recommend using `cert-manager` to manage your certificates. Since using `cert-manager` is not part of this article, we assume you already have valid certs.
26+
> We recommend using `cert-manager` to manage your certificates. Below is a really simple command that bootstraps generates the required resources for the `tailer-webhook`.
27+
### Issuing certificates using `cert-manager` {#issue-certificate-cert-manager}
28+
29+
Follow the [official installation guide](https://cert-manager.io/docs/installation/).
30+
31+
Once installed the following commands should allow you to create the required certificate for the webhook.
32+
33+
```bash
34+
kubectl apply -f - <<EOF
35+
apiVersion: cert-manager.io/v1
36+
kind: ClusterIssuer
37+
metadata:
38+
name: selfsigned-issuer
39+
spec:
40+
selfSigned: {}
41+
---
42+
apiVersion: cert-manager.io/v1
43+
kind: Certificate
44+
metadata:
45+
name: webhook-tls
46+
namespace: logging
47+
spec:
48+
isCA: true
49+
commonName: my-selfsigned-ca
50+
secretName: webhook-tls
51+
privateKey:
52+
algorithm: ECDSA
53+
size: 256
54+
dnsNames:
55+
- sample-webhook.banzaicloud.com
56+
- logging-webhooks.logging.svc
57+
usages:
58+
- server auth
59+
issuerRef:
60+
name: selfsigned-issuer
61+
kind: ClusterIssuer
62+
group: cert-manager.io
63+
---
64+
apiVersion: cert-manager.io/v1
65+
kind: ClusterIssuer
66+
metadata:
67+
name: my-ca-issuer
68+
spec:
69+
ca:
70+
secretName: webhook-tls
71+
EOF
72+
```
73+
2774

2875
You will require the following things:
2976

0 commit comments

Comments
 (0)