traefik-helmchartconfig.yaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. apiVersion: helm.cattle.io/v1
  2. kind: HelmChartConfig
  3. metadata:
  4. name: traefik
  5. namespace: kube-system
  6. spec:
  7. valuesContent: |-
  8. ports:
  9. web:
  10. exposedPort: 8080
  11. websecure:
  12. exposedPort: 8443
  13. additionalArguments:
  14. # Auto cert renewal via cloudflare
  15. - "--certificatesresolvers.letsencrypt.acme.email=joshbicking@comcast.net"
  16. - "--certificatesresolvers.letsencrypt.acme.storage=/data/acme.json"
  17. - "--certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare"
  18. - "--certificatesresolvers.letsencrypt.acme.dnschallenge.resolvers=1.1.1.1:53,8.8.8.8:53"
  19. - "--entrypoints.websecure.http.tls.certResolver=letsencrypt"
  20. - "--entrypoints.websecure.http.tls.domains[0].main=s3.bnuuy.org"
  21. # debug, uncomment for testing
  22. # - "--log.level=DEBUG"
  23. # - "--certificatesresolvers.letsencrypt.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory"
  24. env:
  25. - name: CLOUDFLARE_EMAIL
  26. valueFrom:
  27. secretKeyRef:
  28. name: cloudflare-secrets
  29. key: email
  30. optional: false
  31. - name: CLOUDFLARE_API_KEY
  32. valueFrom:
  33. secretKeyRef:
  34. name: cloudflare-secrets
  35. key: api-key
  36. optional: false
  37. persistence:
  38. enabled: true
  39. storageClass: local-path
  40. # Fix for acme.json file being changed to 660 from 600
  41. # This can manifest as the incredibly unhelpful "the router <router name> uses a non-existent resolver: <resolver name>"
  42. # https://github.com/traefik/traefik/issues/10241
  43. podSecurityContext:
  44. fsGroup: 65532
  45. deployment:
  46. initContainers:
  47. # The "volume-permissions" init container is required if you run into permission issues.
  48. # Related issue: https://github.com/traefik/traefik-helm-chart/issues/396
  49. - name: volume-permissions
  50. image: busybox:latest
  51. command: ["sh", "-c", "touch /data/acme.json; chmod -v 600 /data/acme.json"]
  52. securityContext:
  53. runAsNonRoot: true
  54. runAsGroup: 65532
  55. runAsUser: 65532
  56. volumeMounts:
  57. - name: data
  58. mountPath: /data
  59. service:
  60. spec:
  61. externalTrafficPolicy: Local