template.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. ---
  2. kind: compose
  3. metadata:
  4. name: Traefik
  5. description: >
  6. Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy.
  7. This template sets up Traefik with automatic HTTPS using Let's Encrypt and can be integrated with Authentik for SSO.
  8. Project: https://traefik.io/
  9. Documentation: https://doc.traefik.io/traefik/
  10. version: v3.2
  11. author: "Christian Lempa"
  12. date: "2025-10-02"
  13. tags:
  14. - reverse-proxy
  15. - load-balancer
  16. spec:
  17. general:
  18. title: "General"
  19. required: true
  20. vars:
  21. service_name:
  22. default: "traefik"
  23. container_name:
  24. default: "traefik"
  25. accesslog_enabled:
  26. type: "bool"
  27. description: "Enable Traefik access log"
  28. default: false
  29. traefik:
  30. title: "Traefik Settings"
  31. description: "Configure Traefik as a reverse proxy"
  32. required: true
  33. traefik_tls:
  34. title: "Traefik TLS Settings"
  35. description: "Configure TLS/SSL with Let's Encrypt ACME"
  36. needs: "traefik"
  37. vars:
  38. traefik_tls_enabled:
  39. type: "bool"
  40. description: "Enable HTTPS/TLS with ACME"
  41. default: false
  42. traefik_tls_acme_provider:
  43. type: "enum"
  44. description: "ACME DNS challenge provider"
  45. default: "cloudflare"
  46. options:
  47. - "cloudflare"
  48. extra: "DNS provider for domain validation"
  49. traefik_tls_acme_token:
  50. type: "str"
  51. description: "DNS provider API token"
  52. default: "your-api-token-here"
  53. sensitive: true
  54. extra: "For Cloudflare, create an API token with Zone:DNS:Edit permissions"
  55. traefik_tls_acme_secret_name:
  56. type: "str"
  57. description: "Docker Swarm secret name for API token (swarm mode only)"
  58. default: "cloudflare_api_token"
  59. extra: "The secret name to use in Docker Swarm for storing the API token"
  60. traefik_tls_acme_email:
  61. type: "str"
  62. description: "Email address for ACME (Let's Encrypt) registration"
  63. default: "admin@example.com"
  64. extra: "Required for Let's Encrypt certificate requests"
  65. traefik_tls_redirect:
  66. type: "bool"
  67. description: "Redirect all HTTP traffic to HTTPS"
  68. default: true
  69. ports:
  70. toggle: "ports_enabled"
  71. vars:
  72. traefik_dashboard_enabled:
  73. type: "bool"
  74. description: "Enable Traefik dashboard (don't use in production)"
  75. default: false
  76. extra: "Exposes dashboard on port 8080 in insecure mode"
  77. network:
  78. vars:
  79. network_enabled:
  80. default: true
  81. network_name:
  82. default: "proxy"
  83. swarm:
  84. vars:
  85. swarm_placement_mode:
  86. default: "global"
  87. swarm_placement_host:
  88. type: str
  89. description: "Placement constraint for node selection (optional)"
  90. default: ""
  91. authentik:
  92. title: Authentik Middleware
  93. description: Enable Authentik SSO integration for Traefik
  94. vars:
  95. authentik_outpost_url:
  96. type: "url"
  97. description: "Authentik outpost URL (e.g., http://authentik-outpost:9000)"
  98. default: "http://authentik-outpost:9000"
  99. traefik_authentik_middleware_name:
  100. type: "str"
  101. description: "Name of the Authentik middleware"
  102. default: "authentik"
  103. extra: "Reference this in router labels as '{name}@file'"