Skip to content

Commit

Permalink
docs: πŸ“šοΈ improve EXAMPLES on acme resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur committed Apr 8, 2024
1 parent d57d4a9 commit 2252aba
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
33 changes: 31 additions & 2 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,21 @@ By default, Kubernetes recursively changes ownership and permissions for the con
=> An initContainer can be used to avoid an issue on this sensitive file.
See [#396](https://github.com/traefik/traefik-helm-chart/issues/396) for more details.

**Step 1**: Create `Secret` with CloudFlare token:

```yaml
---
apiVersion: v1
kind: Secret
metadata:
name: cloudflare
type: Opaque
stringData:
token: TTT
```

**Step 2**:

```yaml
persistence:
enabled: true
Expand All @@ -361,8 +376,8 @@ env:
- name: CF_DNS_API_TOKEN
valueFrom:
secretKeyRef:
name: yyy
key: zzz
name: cloudflare
key: token
deployment:
initContainers:
- name: volume-permissions
Expand All @@ -373,6 +388,20 @@ deployment:
name: data
```

and after, in an `IngressRoute`:

```yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: [...]
spec:
entryPoints: [...]
routes: [...]
tls:
certResolver: letsencrypt
```

This example needs a CloudFlare token in a Kubernetes `Secret` and a working `StorageClass`.

See [the list of supported providers](https://doc.traefik.io/traefik/https/acme/#providers) for others.
Expand Down
4 changes: 2 additions & 2 deletions traefik/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Traefik Proxy {{ .Values.image.tag | default .Chart.AppVersion }} has been deplo

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

{{- end }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions traefik/tests/notes_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ tests:
🚨 When enabling persistence for certificates, permissions on acme.json can be
lost when Traefik restarts. You can ensure correct permissions with an
initContainer. See https://github.com/traefik/traefik-helm-chart/issues/396 for
more info. 🚨
initContainer. See https://github.com/traefik/traefik-helm-chart/blob/master/EXAMPLES.md#use-traefik-native-lets-encrypt-integration-without-cert-manager
for more info. 🚨
- it: should display warning when enabling labelSelector without applying it
set:
commonLabels:
Expand Down

0 comments on commit 2252aba

Please sign in to comment.