Skip to content

Commit 2252aba

Browse files
authoredApr 8, 2024··
docs: 📚️ improve EXAMPLES on acme resolver
1 parent d57d4a9 commit 2252aba

File tree

3 files changed

+35
-6
lines changed

3 files changed

+35
-6
lines changed
 

‎EXAMPLES.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,21 @@ By default, Kubernetes recursively changes ownership and permissions for the con
348348
=> An initContainer can be used to avoid an issue on this sensitive file.
349349
See [#396](https://github.com/traefik/traefik-helm-chart/issues/396) for more details.
350350

351+
**Step 1**: Create `Secret` with CloudFlare token:
352+
353+
```yaml
354+
---
355+
apiVersion: v1
356+
kind: Secret
357+
metadata:
358+
name: cloudflare
359+
type: Opaque
360+
stringData:
361+
token: TTT
362+
```
363+
364+
**Step 2**:
365+
351366
```yaml
352367
persistence:
353368
enabled: true
@@ -361,8 +376,8 @@ env:
361376
- name: CF_DNS_API_TOKEN
362377
valueFrom:
363378
secretKeyRef:
364-
name: yyy
365-
key: zzz
379+
name: cloudflare
380+
key: token
366381
deployment:
367382
initContainers:
368383
- name: volume-permissions
@@ -373,6 +388,20 @@ deployment:
373388
name: data
374389
```
375390

391+
and after, in an `IngressRoute`:
392+
393+
```yaml
394+
apiVersion: traefik.containo.us/v1alpha1
395+
kind: IngressRoute
396+
metadata:
397+
name: [...]
398+
spec:
399+
entryPoints: [...]
400+
routes: [...]
401+
tls:
402+
certResolver: letsencrypt
403+
```
404+
376405
This example needs a CloudFlare token in a Kubernetes `Secret` and a working `StorageClass`.
377406

378407
See [the list of supported providers](https://doc.traefik.io/traefik/https/acme/#providers) for others.

‎traefik/templates/NOTES.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Traefik Proxy {{ .Values.image.tag | default .Chart.AppVersion }} has been deplo
77

88
🚨 When enabling persistence for certificates, permissions on acme.json can be
99
lost when Traefik restarts. You can ensure correct permissions with an
10-
initContainer. See https://github.com/traefik/traefik-helm-chart/issues/396 for
11-
more info. 🚨
10+
initContainer. See https://github.com/traefik/traefik-helm-chart/blob/master/EXAMPLES.md#use-traefik-native-lets-encrypt-integration-without-cert-manager
11+
for more info. 🚨
1212

1313
{{- end }}
1414
{{- end }}

‎traefik/tests/notes_test.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ tests:
6767
6868
🚨 When enabling persistence for certificates, permissions on acme.json can be
6969
lost when Traefik restarts. You can ensure correct permissions with an
70-
initContainer. See https://github.com/traefik/traefik-helm-chart/issues/396 for
71-
more info. 🚨
70+
initContainer. See https://github.com/traefik/traefik-helm-chart/blob/master/EXAMPLES.md#use-traefik-native-lets-encrypt-integration-without-cert-manager
71+
for more info. 🚨
7272
- it: should display warning when enabling labelSelector without applying it
7373
set:
7474
commonLabels:

0 commit comments

Comments
 (0)
Please sign in to comment.