Kubernetes Configuration Reference

Dynamic configuration with Kubernetes Custom Resource

Definitions

apiextensions.k8s.io/v1 (Kubernetes v1.16+)

  1. ---
  2. apiVersion: apiextensions.k8s.io/v1
  3. kind: CustomResourceDefinition
  4. metadata:
  5. annotations:
  6. controller-gen.kubebuilder.io/version: v0.16.1
  7. name: ingressroutes.traefik.io
  8. spec:
  9. group: traefik.io
  10. names:
  11. kind: IngressRoute
  12. listKind: IngressRouteList
  13. plural: ingressroutes
  14. singular: ingressroute
  15. scope: Namespaced
  16. versions:
  17. - name: v1alpha1
  18. schema:
  19. openAPIV3Schema:
  20. description: IngressRoute is the CRD implementation of a Traefik HTTP Router.
  21. properties:
  22. apiVersion:
  23. description: |-
  24. APIVersion defines the versioned schema of this representation of an object.
  25. Servers should convert recognized schemas to the latest internal value, and
  26. may reject unrecognized values.
  27. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  28. type: string
  29. kind:
  30. description: |-
  31. Kind is a string value representing the REST resource this object represents.
  32. Servers may infer this from the endpoint the client submits requests to.
  33. Cannot be updated.
  34. In CamelCase.
  35. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  36. type: string
  37. metadata:
  38. type: object
  39. spec:
  40. description: IngressRouteSpec defines the desired state of IngressRoute.
  41. properties:
  42. entryPoints:
  43. description: |-
  44. EntryPoints defines the list of entry point names to bind to.
  45. Entry points have to be configured in the static configuration.
  46. More info: https://doc.traefik.io/traefik/v3.2/routing/entrypoints/
  47. Default: all.
  48. items:
  49. type: string
  50. type: array
  51. routes:
  52. description: Routes defines the list of routes.
  53. items:
  54. description: Route holds the HTTP route configuration.
  55. properties:
  56. kind:
  57. description: |-
  58. Kind defines the kind of the route.
  59. Rule is the only supported kind.
  60. enum:
  61. - Rule
  62. type: string
  63. match:
  64. description: |-
  65. Match defines the router's rule.
  66. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#rule
  67. type: string
  68. middlewares:
  69. description: |-
  70. Middlewares defines the list of references to Middleware resources.
  71. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#kind-middleware
  72. items:
  73. description: MiddlewareRef is a reference to a Middleware
  74. resource.
  75. properties:
  76. name:
  77. description: Name defines the name of the referenced Middleware
  78. resource.
  79. type: string
  80. namespace:
  81. description: Namespace defines the namespace of the referenced
  82. Middleware resource.
  83. type: string
  84. required:
  85. - name
  86. type: object
  87. type: array
  88. priority:
  89. description: |-
  90. Priority defines the router's priority.
  91. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#priority
  92. type: integer
  93. services:
  94. description: |-
  95. Services defines the list of Service.
  96. It can contain any combination of TraefikService and/or reference to a Kubernetes Service.
  97. items:
  98. description: Service defines an upstream HTTP service to proxy
  99. traffic to.
  100. properties:
  101. healthCheck:
  102. description: Healthcheck defines health checks for ExternalName
  103. services.
  104. properties:
  105. followRedirects:
  106. description: |-
  107. FollowRedirects defines whether redirects should be followed during the health check calls.
  108. Default: true
  109. type: boolean
  110. headers:
  111. additionalProperties:
  112. type: string
  113. description: Headers defines custom headers to be
  114. sent to the health check endpoint.
  115. type: object
  116. hostname:
  117. description: Hostname defines the value of hostname
  118. in the Host header of the health check request.
  119. type: string
  120. interval:
  121. anyOf:
  122. - type: integer
  123. - type: string
  124. description: |-
  125. Interval defines the frequency of the health check calls.
  126. Default: 30s
  127. x-kubernetes-int-or-string: true
  128. method:
  129. description: Method defines the healthcheck method.
  130. type: string
  131. mode:
  132. description: |-
  133. Mode defines the health check mode.
  134. If defined to grpc, will use the gRPC health check protocol to probe the server.
  135. Default: http
  136. type: string
  137. path:
  138. description: Path defines the server URL path for
  139. the health check endpoint.
  140. type: string
  141. port:
  142. description: Port defines the server URL port for
  143. the health check endpoint.
  144. type: integer
  145. scheme:
  146. description: Scheme replaces the server URL scheme
  147. for the health check endpoint.
  148. type: string
  149. status:
  150. description: Status defines the expected HTTP status
  151. code of the response to the health check request.
  152. type: integer
  153. timeout:
  154. anyOf:
  155. - type: integer
  156. - type: string
  157. description: |-
  158. Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
  159. Default: 5s
  160. x-kubernetes-int-or-string: true
  161. type: object
  162. kind:
  163. description: Kind defines the kind of the Service.
  164. enum:
  165. - Service
  166. - TraefikService
  167. type: string
  168. name:
  169. description: |-
  170. Name defines the name of the referenced Kubernetes Service or TraefikService.
  171. The differentiation between the two is specified in the Kind field.
  172. type: string
  173. namespace:
  174. description: Namespace defines the namespace of the referenced
  175. Kubernetes Service or TraefikService.
  176. type: string
  177. nativeLB:
  178. description: |-
  179. NativeLB controls, when creating the load-balancer,
  180. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  181. The Kubernetes Service itself does load-balance to the pods.
  182. By default, NativeLB is false.
  183. type: boolean
  184. nodePortLB:
  185. description: |-
  186. NodePortLB controls, when creating the load-balancer,
  187. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  188. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  189. By default, NodePortLB is false.
  190. type: boolean
  191. passHostHeader:
  192. description: |-
  193. PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
  194. By default, passHostHeader is true.
  195. type: boolean
  196. port:
  197. anyOf:
  198. - type: integer
  199. - type: string
  200. description: |-
  201. Port defines the port of a Kubernetes Service.
  202. This can be a reference to a named port.
  203. x-kubernetes-int-or-string: true
  204. responseForwarding:
  205. description: ResponseForwarding defines how Traefik forwards
  206. the response from the upstream Kubernetes Service to
  207. the client.
  208. properties:
  209. flushInterval:
  210. description: |-
  211. FlushInterval defines the interval, in milliseconds, in between flushes to the client while copying the response body.
  212. A negative value means to flush immediately after each write to the client.
  213. This configuration is ignored when ReverseProxy recognizes a response as a streaming response;
  214. for such responses, writes are flushed to the client immediately.
  215. Default: 100ms
  216. type: string
  217. type: object
  218. scheme:
  219. description: |-
  220. Scheme defines the scheme to use for the request to the upstream Kubernetes Service.
  221. It defaults to https when Kubernetes Service port is 443, http otherwise.
  222. type: string
  223. serversTransport:
  224. description: |-
  225. ServersTransport defines the name of ServersTransport resource to use.
  226. It allows to configure the transport between Traefik and your servers.
  227. Can only be used on a Kubernetes Service.
  228. type: string
  229. sticky:
  230. description: |-
  231. Sticky defines the sticky sessions configuration.
  232. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#sticky-sessions
  233. properties:
  234. cookie:
  235. description: Cookie defines the sticky cookie configuration.
  236. properties:
  237. httpOnly:
  238. description: HTTPOnly defines whether the cookie
  239. can be accessed by client-side APIs, such as
  240. JavaScript.
  241. type: boolean
  242. maxAge:
  243. description: |-
  244. MaxAge indicates the number of seconds until the cookie expires.
  245. When set to a negative number, the cookie expires immediately.
  246. When set to zero, the cookie never expires.
  247. type: integer
  248. name:
  249. description: Name defines the Cookie name.
  250. type: string
  251. sameSite:
  252. description: |-
  253. SameSite defines the same site policy.
  254. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
  255. type: string
  256. secure:
  257. description: Secure defines whether the cookie
  258. can only be transmitted over an encrypted connection
  259. (i.e. HTTPS).
  260. type: boolean
  261. type: object
  262. type: object
  263. strategy:
  264. description: |-
  265. Strategy defines the load balancing strategy between the servers.
  266. RoundRobin is the only supported value at the moment.
  267. type: string
  268. weight:
  269. description: |-
  270. Weight defines the weight and should only be specified when Name references a TraefikService object
  271. (and to be precise, one that embeds a Weighted Round Robin).
  272. type: integer
  273. required:
  274. - name
  275. type: object
  276. type: array
  277. syntax:
  278. description: |-
  279. Syntax defines the router's rule syntax.
  280. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#rulesyntax
  281. type: string
  282. required:
  283. - kind
  284. - match
  285. type: object
  286. type: array
  287. tls:
  288. description: |-
  289. TLS defines the TLS configuration.
  290. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#tls
  291. properties:
  292. certResolver:
  293. description: |-
  294. CertResolver defines the name of the certificate resolver to use.
  295. Cert resolvers have to be configured in the static configuration.
  296. More info: https://doc.traefik.io/traefik/v3.2/https/acme/#certificate-resolvers
  297. type: string
  298. domains:
  299. description: |-
  300. Domains defines the list of domains that will be used to issue certificates.
  301. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#domains
  302. items:
  303. description: Domain holds a domain name with SANs.
  304. properties:
  305. main:
  306. description: Main defines the main domain name.
  307. type: string
  308. sans:
  309. description: SANs defines the subject alternative domain
  310. names.
  311. items:
  312. type: string
  313. type: array
  314. type: object
  315. type: array
  316. options:
  317. description: |-
  318. Options defines the reference to a TLSOption, that specifies the parameters of the TLS connection.
  319. If not defined, the `default` TLSOption is used.
  320. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#tls-options
  321. properties:
  322. name:
  323. description: |-
  324. Name defines the name of the referenced TLSOption.
  325. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#kind-tlsoption
  326. type: string
  327. namespace:
  328. description: |-
  329. Namespace defines the namespace of the referenced TLSOption.
  330. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#kind-tlsoption
  331. type: string
  332. required:
  333. - name
  334. type: object
  335. secretName:
  336. description: SecretName is the name of the referenced Kubernetes
  337. Secret to specify the certificate details.
  338. type: string
  339. store:
  340. description: |-
  341. Store defines the reference to the TLSStore, that will be used to store certificates.
  342. Please note that only `default` TLSStore can be used.
  343. properties:
  344. name:
  345. description: |-
  346. Name defines the name of the referenced TLSStore.
  347. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#kind-tlsstore
  348. type: string
  349. namespace:
  350. description: |-
  351. Namespace defines the namespace of the referenced TLSStore.
  352. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#kind-tlsstore
  353. type: string
  354. required:
  355. - name
  356. type: object
  357. type: object
  358. required:
  359. - routes
  360. type: object
  361. required:
  362. - metadata
  363. - spec
  364. type: object
  365. served: true
  366. storage: true
  367. ---
  368. apiVersion: apiextensions.k8s.io/v1
  369. kind: CustomResourceDefinition
  370. metadata:
  371. annotations:
  372. controller-gen.kubebuilder.io/version: v0.16.1
  373. name: ingressroutetcps.traefik.io
  374. spec:
  375. group: traefik.io
  376. names:
  377. kind: IngressRouteTCP
  378. listKind: IngressRouteTCPList
  379. plural: ingressroutetcps
  380. singular: ingressroutetcp
  381. scope: Namespaced
  382. versions:
  383. - name: v1alpha1
  384. schema:
  385. openAPIV3Schema:
  386. description: IngressRouteTCP is the CRD implementation of a Traefik TCP Router.
  387. properties:
  388. apiVersion:
  389. description: |-
  390. APIVersion defines the versioned schema of this representation of an object.
  391. Servers should convert recognized schemas to the latest internal value, and
  392. may reject unrecognized values.
  393. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  394. type: string
  395. kind:
  396. description: |-
  397. Kind is a string value representing the REST resource this object represents.
  398. Servers may infer this from the endpoint the client submits requests to.
  399. Cannot be updated.
  400. In CamelCase.
  401. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  402. type: string
  403. metadata:
  404. type: object
  405. spec:
  406. description: IngressRouteTCPSpec defines the desired state of IngressRouteTCP.
  407. properties:
  408. entryPoints:
  409. description: |-
  410. EntryPoints defines the list of entry point names to bind to.
  411. Entry points have to be configured in the static configuration.
  412. More info: https://doc.traefik.io/traefik/v3.2/routing/entrypoints/
  413. Default: all.
  414. items:
  415. type: string
  416. type: array
  417. routes:
  418. description: Routes defines the list of routes.
  419. items:
  420. description: RouteTCP holds the TCP route configuration.
  421. properties:
  422. match:
  423. description: |-
  424. Match defines the router's rule.
  425. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#rule_1
  426. type: string
  427. middlewares:
  428. description: Middlewares defines the list of references to MiddlewareTCP
  429. resources.
  430. items:
  431. description: ObjectReference is a generic reference to a Traefik
  432. resource.
  433. properties:
  434. name:
  435. description: Name defines the name of the referenced Traefik
  436. resource.
  437. type: string
  438. namespace:
  439. description: Namespace defines the namespace of the referenced
  440. Traefik resource.
  441. type: string
  442. required:
  443. - name
  444. type: object
  445. type: array
  446. priority:
  447. description: |-
  448. Priority defines the router's priority.
  449. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#priority_1
  450. type: integer
  451. services:
  452. description: Services defines the list of TCP services.
  453. items:
  454. description: ServiceTCP defines an upstream TCP service to
  455. proxy traffic to.
  456. properties:
  457. name:
  458. description: Name defines the name of the referenced Kubernetes
  459. Service.
  460. type: string
  461. namespace:
  462. description: Namespace defines the namespace of the referenced
  463. Kubernetes Service.
  464. type: string
  465. nativeLB:
  466. description: |-
  467. NativeLB controls, when creating the load-balancer,
  468. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  469. The Kubernetes Service itself does load-balance to the pods.
  470. By default, NativeLB is false.
  471. type: boolean
  472. nodePortLB:
  473. description: |-
  474. NodePortLB controls, when creating the load-balancer,
  475. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  476. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  477. By default, NodePortLB is false.
  478. type: boolean
  479. port:
  480. anyOf:
  481. - type: integer
  482. - type: string
  483. description: |-
  484. Port defines the port of a Kubernetes Service.
  485. This can be a reference to a named port.
  486. x-kubernetes-int-or-string: true
  487. proxyProtocol:
  488. description: |-
  489. ProxyProtocol defines the PROXY protocol configuration.
  490. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#proxy-protocol
  491. properties:
  492. version:
  493. description: Version defines the PROXY Protocol version
  494. to use.
  495. type: integer
  496. type: object
  497. serversTransport:
  498. description: |-
  499. ServersTransport defines the name of ServersTransportTCP resource to use.
  500. It allows to configure the transport between Traefik and your servers.
  501. Can only be used on a Kubernetes Service.
  502. type: string
  503. terminationDelay:
  504. description: |-
  505. TerminationDelay defines the deadline that the proxy sets, after one of its connected peers indicates
  506. it has closed the writing capability of its connection, to close the reading capability as well,
  507. hence fully terminating the connection.
  508. It is a duration in milliseconds, defaulting to 100.
  509. A negative value means an infinite deadline (i.e. the reading capability is never closed).
  510. Deprecated: TerminationDelay will not be supported in future APIVersions, please use ServersTransport to configure the TerminationDelay instead.
  511. type: integer
  512. tls:
  513. description: TLS determines whether to use TLS when dialing
  514. with the backend.
  515. type: boolean
  516. weight:
  517. description: Weight defines the weight used when balancing
  518. requests between multiple Kubernetes Service.
  519. type: integer
  520. required:
  521. - name
  522. - port
  523. type: object
  524. type: array
  525. syntax:
  526. description: |-
  527. Syntax defines the router's rule syntax.
  528. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#rulesyntax_1
  529. type: string
  530. required:
  531. - match
  532. type: object
  533. type: array
  534. tls:
  535. description: |-
  536. TLS defines the TLS configuration on a layer 4 / TCP Route.
  537. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#tls_1
  538. properties:
  539. certResolver:
  540. description: |-
  541. CertResolver defines the name of the certificate resolver to use.
  542. Cert resolvers have to be configured in the static configuration.
  543. More info: https://doc.traefik.io/traefik/v3.2/https/acme/#certificate-resolvers
  544. type: string
  545. domains:
  546. description: |-
  547. Domains defines the list of domains that will be used to issue certificates.
  548. More info: https://doc.traefik.io/traefik/v3.2/routing/routers/#domains
  549. items:
  550. description: Domain holds a domain name with SANs.
  551. properties:
  552. main:
  553. description: Main defines the main domain name.
  554. type: string
  555. sans:
  556. description: SANs defines the subject alternative domain
  557. names.
  558. items:
  559. type: string
  560. type: array
  561. type: object
  562. type: array
  563. options:
  564. description: |-
  565. Options defines the reference to a TLSOption, that specifies the parameters of the TLS connection.
  566. If not defined, the `default` TLSOption is used.
  567. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#tls-options
  568. properties:
  569. name:
  570. description: Name defines the name of the referenced Traefik
  571. resource.
  572. type: string
  573. namespace:
  574. description: Namespace defines the namespace of the referenced
  575. Traefik resource.
  576. type: string
  577. required:
  578. - name
  579. type: object
  580. passthrough:
  581. description: Passthrough defines whether a TLS router will terminate
  582. the TLS connection.
  583. type: boolean
  584. secretName:
  585. description: SecretName is the name of the referenced Kubernetes
  586. Secret to specify the certificate details.
  587. type: string
  588. store:
  589. description: |-
  590. Store defines the reference to the TLSStore, that will be used to store certificates.
  591. Please note that only `default` TLSStore can be used.
  592. properties:
  593. name:
  594. description: Name defines the name of the referenced Traefik
  595. resource.
  596. type: string
  597. namespace:
  598. description: Namespace defines the namespace of the referenced
  599. Traefik resource.
  600. type: string
  601. required:
  602. - name
  603. type: object
  604. type: object
  605. required:
  606. - routes
  607. type: object
  608. required:
  609. - metadata
  610. - spec
  611. type: object
  612. served: true
  613. storage: true
  614. ---
  615. apiVersion: apiextensions.k8s.io/v1
  616. kind: CustomResourceDefinition
  617. metadata:
  618. annotations:
  619. controller-gen.kubebuilder.io/version: v0.16.1
  620. name: ingressrouteudps.traefik.io
  621. spec:
  622. group: traefik.io
  623. names:
  624. kind: IngressRouteUDP
  625. listKind: IngressRouteUDPList
  626. plural: ingressrouteudps
  627. singular: ingressrouteudp
  628. scope: Namespaced
  629. versions:
  630. - name: v1alpha1
  631. schema:
  632. openAPIV3Schema:
  633. description: IngressRouteUDP is a CRD implementation of a Traefik UDP Router.
  634. properties:
  635. apiVersion:
  636. description: |-
  637. APIVersion defines the versioned schema of this representation of an object.
  638. Servers should convert recognized schemas to the latest internal value, and
  639. may reject unrecognized values.
  640. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  641. type: string
  642. kind:
  643. description: |-
  644. Kind is a string value representing the REST resource this object represents.
  645. Servers may infer this from the endpoint the client submits requests to.
  646. Cannot be updated.
  647. In CamelCase.
  648. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  649. type: string
  650. metadata:
  651. type: object
  652. spec:
  653. description: IngressRouteUDPSpec defines the desired state of a IngressRouteUDP.
  654. properties:
  655. entryPoints:
  656. description: |-
  657. EntryPoints defines the list of entry point names to bind to.
  658. Entry points have to be configured in the static configuration.
  659. More info: https://doc.traefik.io/traefik/v3.2/routing/entrypoints/
  660. Default: all.
  661. items:
  662. type: string
  663. type: array
  664. routes:
  665. description: Routes defines the list of routes.
  666. items:
  667. description: RouteUDP holds the UDP route configuration.
  668. properties:
  669. services:
  670. description: Services defines the list of UDP services.
  671. items:
  672. description: ServiceUDP defines an upstream UDP service to
  673. proxy traffic to.
  674. properties:
  675. name:
  676. description: Name defines the name of the referenced Kubernetes
  677. Service.
  678. type: string
  679. namespace:
  680. description: Namespace defines the namespace of the referenced
  681. Kubernetes Service.
  682. type: string
  683. nativeLB:
  684. description: |-
  685. NativeLB controls, when creating the load-balancer,
  686. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  687. The Kubernetes Service itself does load-balance to the pods.
  688. By default, NativeLB is false.
  689. type: boolean
  690. nodePortLB:
  691. description: |-
  692. NodePortLB controls, when creating the load-balancer,
  693. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  694. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  695. By default, NodePortLB is false.
  696. type: boolean
  697. port:
  698. anyOf:
  699. - type: integer
  700. - type: string
  701. description: |-
  702. Port defines the port of a Kubernetes Service.
  703. This can be a reference to a named port.
  704. x-kubernetes-int-or-string: true
  705. weight:
  706. description: Weight defines the weight used when balancing
  707. requests between multiple Kubernetes Service.
  708. type: integer
  709. required:
  710. - name
  711. - port
  712. type: object
  713. type: array
  714. type: object
  715. type: array
  716. required:
  717. - routes
  718. type: object
  719. required:
  720. - metadata
  721. - spec
  722. type: object
  723. served: true
  724. storage: true
  725. ---
  726. apiVersion: apiextensions.k8s.io/v1
  727. kind: CustomResourceDefinition
  728. metadata:
  729. annotations:
  730. controller-gen.kubebuilder.io/version: v0.16.1
  731. name: middlewares.traefik.io
  732. spec:
  733. group: traefik.io
  734. names:
  735. kind: Middleware
  736. listKind: MiddlewareList
  737. plural: middlewares
  738. singular: middleware
  739. scope: Namespaced
  740. versions:
  741. - name: v1alpha1
  742. schema:
  743. openAPIV3Schema:
  744. description: |-
  745. Middleware is the CRD implementation of a Traefik Middleware.
  746. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/overview/
  747. properties:
  748. apiVersion:
  749. description: |-
  750. APIVersion defines the versioned schema of this representation of an object.
  751. Servers should convert recognized schemas to the latest internal value, and
  752. may reject unrecognized values.
  753. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  754. type: string
  755. kind:
  756. description: |-
  757. Kind is a string value representing the REST resource this object represents.
  758. Servers may infer this from the endpoint the client submits requests to.
  759. Cannot be updated.
  760. In CamelCase.
  761. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  762. type: string
  763. metadata:
  764. type: object
  765. spec:
  766. description: MiddlewareSpec defines the desired state of a Middleware.
  767. properties:
  768. addPrefix:
  769. description: |-
  770. AddPrefix holds the add prefix middleware configuration.
  771. This middleware updates the path of a request before forwarding it.
  772. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/addprefix/
  773. properties:
  774. prefix:
  775. description: |-
  776. Prefix is the string to add before the current path in the requested URL.
  777. It should include a leading slash (/).
  778. type: string
  779. type: object
  780. basicAuth:
  781. description: |-
  782. BasicAuth holds the basic auth middleware configuration.
  783. This middleware restricts access to your services to known users.
  784. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/basicauth/
  785. properties:
  786. headerField:
  787. description: |-
  788. HeaderField defines a header field to store the authenticated user.
  789. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/basicauth/#headerfield
  790. type: string
  791. realm:
  792. description: |-
  793. Realm allows the protected resources on a server to be partitioned into a set of protection spaces, each with its own authentication scheme.
  794. Default: traefik.
  795. type: string
  796. removeHeader:
  797. description: |-
  798. RemoveHeader sets the removeHeader option to true to remove the authorization header before forwarding the request to your service.
  799. Default: false.
  800. type: boolean
  801. secret:
  802. description: Secret is the name of the referenced Kubernetes Secret
  803. containing user credentials.
  804. type: string
  805. type: object
  806. buffering:
  807. description: |-
  808. Buffering holds the buffering middleware configuration.
  809. This middleware retries or limits the size of requests that can be forwarded to backends.
  810. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/buffering/#maxrequestbodybytes
  811. properties:
  812. maxRequestBodyBytes:
  813. description: |-
  814. MaxRequestBodyBytes defines the maximum allowed body size for the request (in bytes).
  815. If the request exceeds the allowed size, it is not forwarded to the service, and the client gets a 413 (Request Entity Too Large) response.
  816. Default: 0 (no maximum).
  817. format: int64
  818. type: integer
  819. maxResponseBodyBytes:
  820. description: |-
  821. MaxResponseBodyBytes defines the maximum allowed response size from the service (in bytes).
  822. If the response exceeds the allowed size, it is not forwarded to the client. The client gets a 500 (Internal Server Error) response instead.
  823. Default: 0 (no maximum).
  824. format: int64
  825. type: integer
  826. memRequestBodyBytes:
  827. description: |-
  828. MemRequestBodyBytes defines the threshold (in bytes) from which the request will be buffered on disk instead of in memory.
  829. Default: 1048576 (1Mi).
  830. format: int64
  831. type: integer
  832. memResponseBodyBytes:
  833. description: |-
  834. MemResponseBodyBytes defines the threshold (in bytes) from which the response will be buffered on disk instead of in memory.
  835. Default: 1048576 (1Mi).
  836. format: int64
  837. type: integer
  838. retryExpression:
  839. description: |-
  840. RetryExpression defines the retry conditions.
  841. It is a logical combination of functions with operators AND (&&) and OR (||).
  842. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/buffering/#retryexpression
  843. type: string
  844. type: object
  845. chain:
  846. description: |-
  847. Chain holds the configuration of the chain middleware.
  848. This middleware enables to define reusable combinations of other pieces of middleware.
  849. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/chain/
  850. properties:
  851. middlewares:
  852. description: Middlewares is the list of MiddlewareRef which composes
  853. the chain.
  854. items:
  855. description: MiddlewareRef is a reference to a Middleware resource.
  856. properties:
  857. name:
  858. description: Name defines the name of the referenced Middleware
  859. resource.
  860. type: string
  861. namespace:
  862. description: Namespace defines the namespace of the referenced
  863. Middleware resource.
  864. type: string
  865. required:
  866. - name
  867. type: object
  868. type: array
  869. type: object
  870. circuitBreaker:
  871. description: CircuitBreaker holds the circuit breaker configuration.
  872. properties:
  873. checkPeriod:
  874. anyOf:
  875. - type: integer
  876. - type: string
  877. description: CheckPeriod is the interval between successive checks
  878. of the circuit breaker condition (when in standby state).
  879. x-kubernetes-int-or-string: true
  880. expression:
  881. description: Expression is the condition that triggers the tripped
  882. state.
  883. type: string
  884. fallbackDuration:
  885. anyOf:
  886. - type: integer
  887. - type: string
  888. description: FallbackDuration is the duration for which the circuit
  889. breaker will wait before trying to recover (from a tripped state).
  890. x-kubernetes-int-or-string: true
  891. recoveryDuration:
  892. anyOf:
  893. - type: integer
  894. - type: string
  895. description: RecoveryDuration is the duration for which the circuit
  896. breaker will try to recover (as soon as it is in recovering
  897. state).
  898. x-kubernetes-int-or-string: true
  899. responseCode:
  900. description: ResponseCode is the status code that the circuit
  901. breaker will return while it is in the open state.
  902. type: integer
  903. type: object
  904. compress:
  905. description: |-
  906. Compress holds the compress middleware configuration.
  907. This middleware compresses responses before sending them to the client, using gzip, brotli, or zstd compression.
  908. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/compress/
  909. properties:
  910. defaultEncoding:
  911. description: DefaultEncoding specifies the default encoding if
  912. the `Accept-Encoding` header is not in the request or contains
  913. a wildcard (`*`).
  914. type: string
  915. encodings:
  916. description: Encodings defines the list of supported compression
  917. algorithms.
  918. items:
  919. type: string
  920. type: array
  921. excludedContentTypes:
  922. description: |-
  923. ExcludedContentTypes defines the list of content types to compare the Content-Type header of the incoming requests and responses before compressing.
  924. `application/grpc` is always excluded.
  925. items:
  926. type: string
  927. type: array
  928. includedContentTypes:
  929. description: IncludedContentTypes defines the list of content
  930. types to compare the Content-Type header of the responses before
  931. compressing.
  932. items:
  933. type: string
  934. type: array
  935. minResponseBodyBytes:
  936. description: |-
  937. MinResponseBodyBytes defines the minimum amount of bytes a response body must have to be compressed.
  938. Default: 1024.
  939. type: integer
  940. type: object
  941. contentType:
  942. description: |-
  943. ContentType holds the content-type middleware configuration.
  944. This middleware exists to enable the correct behavior until at least the default one can be changed in a future version.
  945. properties:
  946. autoDetect:
  947. description: |-
  948. AutoDetect specifies whether to let the `Content-Type` header, if it has not been set by the backend,
  949. be automatically set to a value derived from the contents of the response.
  950. Deprecated: AutoDetect option is deprecated, Content-Type middleware is only meant to be used to enable the content-type detection, please remove any usage of this option.
  951. type: boolean
  952. type: object
  953. digestAuth:
  954. description: |-
  955. DigestAuth holds the digest auth middleware configuration.
  956. This middleware restricts access to your services to known users.
  957. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/digestauth/
  958. properties:
  959. headerField:
  960. description: |-
  961. HeaderField defines a header field to store the authenticated user.
  962. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/basicauth/#headerfield
  963. type: string
  964. realm:
  965. description: |-
  966. Realm allows the protected resources on a server to be partitioned into a set of protection spaces, each with its own authentication scheme.
  967. Default: traefik.
  968. type: string
  969. removeHeader:
  970. description: RemoveHeader defines whether to remove the authorization
  971. header before forwarding the request to the backend.
  972. type: boolean
  973. secret:
  974. description: Secret is the name of the referenced Kubernetes Secret
  975. containing user credentials.
  976. type: string
  977. type: object
  978. errors:
  979. description: |-
  980. ErrorPage holds the custom error middleware configuration.
  981. This middleware returns a custom page in lieu of the default, according to configured ranges of HTTP Status codes.
  982. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/errorpages/
  983. properties:
  984. query:
  985. description: |-
  986. Query defines the URL for the error page (hosted by service).
  987. The {status} variable can be used in order to insert the status code in the URL.
  988. type: string
  989. service:
  990. description: |-
  991. Service defines the reference to a Kubernetes Service that will serve the error page.
  992. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/errorpages/#service
  993. properties:
  994. healthCheck:
  995. description: Healthcheck defines health checks for ExternalName
  996. services.
  997. properties:
  998. followRedirects:
  999. description: |-
  1000. FollowRedirects defines whether redirects should be followed during the health check calls.
  1001. Default: true
  1002. type: boolean
  1003. headers:
  1004. additionalProperties:
  1005. type: string
  1006. description: Headers defines custom headers to be sent
  1007. to the health check endpoint.
  1008. type: object
  1009. hostname:
  1010. description: Hostname defines the value of hostname in
  1011. the Host header of the health check request.
  1012. type: string
  1013. interval:
  1014. anyOf:
  1015. - type: integer
  1016. - type: string
  1017. description: |-
  1018. Interval defines the frequency of the health check calls.
  1019. Default: 30s
  1020. x-kubernetes-int-or-string: true
  1021. method:
  1022. description: Method defines the healthcheck method.
  1023. type: string
  1024. mode:
  1025. description: |-
  1026. Mode defines the health check mode.
  1027. If defined to grpc, will use the gRPC health check protocol to probe the server.
  1028. Default: http
  1029. type: string
  1030. path:
  1031. description: Path defines the server URL path for the
  1032. health check endpoint.
  1033. type: string
  1034. port:
  1035. description: Port defines the server URL port for the
  1036. health check endpoint.
  1037. type: integer
  1038. scheme:
  1039. description: Scheme replaces the server URL scheme for
  1040. the health check endpoint.
  1041. type: string
  1042. status:
  1043. description: Status defines the expected HTTP status code
  1044. of the response to the health check request.
  1045. type: integer
  1046. timeout:
  1047. anyOf:
  1048. - type: integer
  1049. - type: string
  1050. description: |-
  1051. Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
  1052. Default: 5s
  1053. x-kubernetes-int-or-string: true
  1054. type: object
  1055. kind:
  1056. description: Kind defines the kind of the Service.
  1057. enum:
  1058. - Service
  1059. - TraefikService
  1060. type: string
  1061. name:
  1062. description: |-
  1063. Name defines the name of the referenced Kubernetes Service or TraefikService.
  1064. The differentiation between the two is specified in the Kind field.
  1065. type: string
  1066. namespace:
  1067. description: Namespace defines the namespace of the referenced
  1068. Kubernetes Service or TraefikService.
  1069. type: string
  1070. nativeLB:
  1071. description: |-
  1072. NativeLB controls, when creating the load-balancer,
  1073. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  1074. The Kubernetes Service itself does load-balance to the pods.
  1075. By default, NativeLB is false.
  1076. type: boolean
  1077. nodePortLB:
  1078. description: |-
  1079. NodePortLB controls, when creating the load-balancer,
  1080. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  1081. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  1082. By default, NodePortLB is false.
  1083. type: boolean
  1084. passHostHeader:
  1085. description: |-
  1086. PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
  1087. By default, passHostHeader is true.
  1088. type: boolean
  1089. port:
  1090. anyOf:
  1091. - type: integer
  1092. - type: string
  1093. description: |-
  1094. Port defines the port of a Kubernetes Service.
  1095. This can be a reference to a named port.
  1096. x-kubernetes-int-or-string: true
  1097. responseForwarding:
  1098. description: ResponseForwarding defines how Traefik forwards
  1099. the response from the upstream Kubernetes Service to the
  1100. client.
  1101. properties:
  1102. flushInterval:
  1103. description: |-
  1104. FlushInterval defines the interval, in milliseconds, in between flushes to the client while copying the response body.
  1105. A negative value means to flush immediately after each write to the client.
  1106. This configuration is ignored when ReverseProxy recognizes a response as a streaming response;
  1107. for such responses, writes are flushed to the client immediately.
  1108. Default: 100ms
  1109. type: string
  1110. type: object
  1111. scheme:
  1112. description: |-
  1113. Scheme defines the scheme to use for the request to the upstream Kubernetes Service.
  1114. It defaults to https when Kubernetes Service port is 443, http otherwise.
  1115. type: string
  1116. serversTransport:
  1117. description: |-
  1118. ServersTransport defines the name of ServersTransport resource to use.
  1119. It allows to configure the transport between Traefik and your servers.
  1120. Can only be used on a Kubernetes Service.
  1121. type: string
  1122. sticky:
  1123. description: |-
  1124. Sticky defines the sticky sessions configuration.
  1125. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#sticky-sessions
  1126. properties:
  1127. cookie:
  1128. description: Cookie defines the sticky cookie configuration.
  1129. properties:
  1130. httpOnly:
  1131. description: HTTPOnly defines whether the cookie can
  1132. be accessed by client-side APIs, such as JavaScript.
  1133. type: boolean
  1134. maxAge:
  1135. description: |-
  1136. MaxAge indicates the number of seconds until the cookie expires.
  1137. When set to a negative number, the cookie expires immediately.
  1138. When set to zero, the cookie never expires.
  1139. type: integer
  1140. name:
  1141. description: Name defines the Cookie name.
  1142. type: string
  1143. sameSite:
  1144. description: |-
  1145. SameSite defines the same site policy.
  1146. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
  1147. type: string
  1148. secure:
  1149. description: Secure defines whether the cookie can
  1150. only be transmitted over an encrypted connection
  1151. (i.e. HTTPS).
  1152. type: boolean
  1153. type: object
  1154. type: object
  1155. strategy:
  1156. description: |-
  1157. Strategy defines the load balancing strategy between the servers.
  1158. RoundRobin is the only supported value at the moment.
  1159. type: string
  1160. weight:
  1161. description: |-
  1162. Weight defines the weight and should only be specified when Name references a TraefikService object
  1163. (and to be precise, one that embeds a Weighted Round Robin).
  1164. type: integer
  1165. required:
  1166. - name
  1167. type: object
  1168. status:
  1169. description: |-
  1170. Status defines which status or range of statuses should result in an error page.
  1171. It can be either a status code as a number (500),
  1172. as multiple comma-separated numbers (500,502),
  1173. as ranges by separating two codes with a dash (500-599),
  1174. or a combination of the two (404,418,500-599).
  1175. items:
  1176. type: string
  1177. type: array
  1178. type: object
  1179. forwardAuth:
  1180. description: |-
  1181. ForwardAuth holds the forward auth middleware configuration.
  1182. This middleware delegates the request authentication to a Service.
  1183. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/forwardauth/
  1184. properties:
  1185. addAuthCookiesToResponse:
  1186. description: AddAuthCookiesToResponse defines the list of cookies
  1187. to copy from the authentication server response to the response.
  1188. items:
  1189. type: string
  1190. type: array
  1191. address:
  1192. description: Address defines the authentication server address.
  1193. type: string
  1194. authRequestHeaders:
  1195. description: |-
  1196. AuthRequestHeaders defines the list of the headers to copy from the request to the authentication server.
  1197. If not set or empty then all request headers are passed.
  1198. items:
  1199. type: string
  1200. type: array
  1201. authResponseHeaders:
  1202. description: AuthResponseHeaders defines the list of headers to
  1203. copy from the authentication server response and set on forwarded
  1204. request, replacing any existing conflicting headers.
  1205. items:
  1206. type: string
  1207. type: array
  1208. authResponseHeadersRegex:
  1209. description: |-
  1210. AuthResponseHeadersRegex defines the regex to match headers to copy from the authentication server response and set on forwarded request, after stripping all headers that match the regex.
  1211. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/forwardauth/#authresponseheadersregex
  1212. type: string
  1213. tls:
  1214. description: TLS defines the configuration used to secure the
  1215. connection to the authentication server.
  1216. properties:
  1217. caOptional:
  1218. description: 'Deprecated: TLS client authentication is a server
  1219. side option (see https://github.com/golang/go/blob/740a490f71d026bb7d2d13cb8fa2d6d6e0572b70/src/crypto/tls/common.go#L634).'
  1220. type: boolean
  1221. caSecret:
  1222. description: |-
  1223. CASecret is the name of the referenced Kubernetes Secret containing the CA to validate the server certificate.
  1224. The CA certificate is extracted from key `tls.ca` or `ca.crt`.
  1225. type: string
  1226. certSecret:
  1227. description: |-
  1228. CertSecret is the name of the referenced Kubernetes Secret containing the client certificate.
  1229. The client certificate is extracted from the keys `tls.crt` and `tls.key`.
  1230. type: string
  1231. insecureSkipVerify:
  1232. description: InsecureSkipVerify defines whether the server
  1233. certificates should be validated.
  1234. type: boolean
  1235. type: object
  1236. trustForwardHeader:
  1237. description: 'TrustForwardHeader defines whether to trust (ie:
  1238. forward) all X-Forwarded-* headers.'
  1239. type: boolean
  1240. type: object
  1241. grpcWeb:
  1242. description: |-
  1243. GrpcWeb holds the gRPC web middleware configuration.
  1244. This middleware converts a gRPC web request to an HTTP/2 gRPC request.
  1245. properties:
  1246. allowOrigins:
  1247. description: |-
  1248. AllowOrigins is a list of allowable origins.
  1249. Can also be a wildcard origin "*".
  1250. items:
  1251. type: string
  1252. type: array
  1253. type: object
  1254. headers:
  1255. description: |-
  1256. Headers holds the headers middleware configuration.
  1257. This middleware manages the requests and responses headers.
  1258. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/headers/#customrequestheaders
  1259. properties:
  1260. accessControlAllowCredentials:
  1261. description: AccessControlAllowCredentials defines whether the
  1262. request can include user credentials.
  1263. type: boolean
  1264. accessControlAllowHeaders:
  1265. description: AccessControlAllowHeaders defines the Access-Control-Request-Headers
  1266. values sent in preflight response.
  1267. items:
  1268. type: string
  1269. type: array
  1270. accessControlAllowMethods:
  1271. description: AccessControlAllowMethods defines the Access-Control-Request-Method
  1272. values sent in preflight response.
  1273. items:
  1274. type: string
  1275. type: array
  1276. accessControlAllowOriginList:
  1277. description: AccessControlAllowOriginList is a list of allowable
  1278. origins. Can also be a wildcard origin "*".
  1279. items:
  1280. type: string
  1281. type: array
  1282. accessControlAllowOriginListRegex:
  1283. description: AccessControlAllowOriginListRegex is a list of allowable
  1284. origins written following the Regular Expression syntax (https://golang.org/pkg/regexp/).
  1285. items:
  1286. type: string
  1287. type: array
  1288. accessControlExposeHeaders:
  1289. description: AccessControlExposeHeaders defines the Access-Control-Expose-Headers
  1290. values sent in preflight response.
  1291. items:
  1292. type: string
  1293. type: array
  1294. accessControlMaxAge:
  1295. description: AccessControlMaxAge defines the time that a preflight
  1296. request may be cached.
  1297. format: int64
  1298. type: integer
  1299. addVaryHeader:
  1300. description: AddVaryHeader defines whether the Vary header is
  1301. automatically added/updated when the AccessControlAllowOriginList
  1302. is set.
  1303. type: boolean
  1304. allowedHosts:
  1305. description: AllowedHosts defines the fully qualified list of
  1306. allowed domain names.
  1307. items:
  1308. type: string
  1309. type: array
  1310. browserXssFilter:
  1311. description: BrowserXSSFilter defines whether to add the X-XSS-Protection
  1312. header with the value 1; mode=block.
  1313. type: boolean
  1314. contentSecurityPolicy:
  1315. description: ContentSecurityPolicy defines the Content-Security-Policy
  1316. header value.
  1317. type: string
  1318. contentSecurityPolicyReportOnly:
  1319. description: ContentSecurityPolicyReportOnly defines the Content-Security-Policy-Report-Only
  1320. header value.
  1321. type: string
  1322. contentTypeNosniff:
  1323. description: ContentTypeNosniff defines whether to add the X-Content-Type-Options
  1324. header with the nosniff value.
  1325. type: boolean
  1326. customBrowserXSSValue:
  1327. description: |-
  1328. CustomBrowserXSSValue defines the X-XSS-Protection header value.
  1329. This overrides the BrowserXssFilter option.
  1330. type: string
  1331. customFrameOptionsValue:
  1332. description: |-
  1333. CustomFrameOptionsValue defines the X-Frame-Options header value.
  1334. This overrides the FrameDeny option.
  1335. type: string
  1336. customRequestHeaders:
  1337. additionalProperties:
  1338. type: string
  1339. description: CustomRequestHeaders defines the header names and
  1340. values to apply to the request.
  1341. type: object
  1342. customResponseHeaders:
  1343. additionalProperties:
  1344. type: string
  1345. description: CustomResponseHeaders defines the header names and
  1346. values to apply to the response.
  1347. type: object
  1348. featurePolicy:
  1349. description: 'Deprecated: FeaturePolicy option is deprecated,
  1350. please use PermissionsPolicy instead.'
  1351. type: string
  1352. forceSTSHeader:
  1353. description: ForceSTSHeader defines whether to add the STS header
  1354. even when the connection is HTTP.
  1355. type: boolean
  1356. frameDeny:
  1357. description: FrameDeny defines whether to add the X-Frame-Options
  1358. header with the DENY value.
  1359. type: boolean
  1360. hostsProxyHeaders:
  1361. description: HostsProxyHeaders defines the header keys that may
  1362. hold a proxied hostname value for the request.
  1363. items:
  1364. type: string
  1365. type: array
  1366. isDevelopment:
  1367. description: |-
  1368. IsDevelopment defines whether to mitigate the unwanted effects of the AllowedHosts, SSL, and STS options when developing.
  1369. Usually testing takes place using HTTP, not HTTPS, and on localhost, not your production domain.
  1370. If you would like your development environment to mimic production with complete Host blocking, SSL redirects,
  1371. and STS headers, leave this as false.
  1372. type: boolean
  1373. permissionsPolicy:
  1374. description: |-
  1375. PermissionsPolicy defines the Permissions-Policy header value.
  1376. This allows sites to control browser features.
  1377. type: string
  1378. publicKey:
  1379. description: PublicKey is the public key that implements HPKP
  1380. to prevent MITM attacks with forged certificates.
  1381. type: string
  1382. referrerPolicy:
  1383. description: |-
  1384. ReferrerPolicy defines the Referrer-Policy header value.
  1385. This allows sites to control whether browsers forward the Referer header to other sites.
  1386. type: string
  1387. sslForceHost:
  1388. description: 'Deprecated: SSLForceHost option is deprecated, please
  1389. use RedirectRegex instead.'
  1390. type: boolean
  1391. sslHost:
  1392. description: 'Deprecated: SSLHost option is deprecated, please
  1393. use RedirectRegex instead.'
  1394. type: string
  1395. sslProxyHeaders:
  1396. additionalProperties:
  1397. type: string
  1398. description: |-
  1399. SSLProxyHeaders defines the header keys with associated values that would indicate a valid HTTPS request.
  1400. It can be useful when using other proxies (example: "X-Forwarded-Proto": "https").
  1401. type: object
  1402. sslRedirect:
  1403. description: 'Deprecated: SSLRedirect option is deprecated, please
  1404. use EntryPoint redirection or RedirectScheme instead.'
  1405. type: boolean
  1406. sslTemporaryRedirect:
  1407. description: 'Deprecated: SSLTemporaryRedirect option is deprecated,
  1408. please use EntryPoint redirection or RedirectScheme instead.'
  1409. type: boolean
  1410. stsIncludeSubdomains:
  1411. description: STSIncludeSubdomains defines whether the includeSubDomains
  1412. directive is appended to the Strict-Transport-Security header.
  1413. type: boolean
  1414. stsPreload:
  1415. description: STSPreload defines whether the preload flag is appended
  1416. to the Strict-Transport-Security header.
  1417. type: boolean
  1418. stsSeconds:
  1419. description: |-
  1420. STSSeconds defines the max-age of the Strict-Transport-Security header.
  1421. If set to 0, the header is not set.
  1422. format: int64
  1423. type: integer
  1424. type: object
  1425. inFlightReq:
  1426. description: |-
  1427. InFlightReq holds the in-flight request middleware configuration.
  1428. This middleware limits the number of requests being processed and served concurrently.
  1429. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/inflightreq/
  1430. properties:
  1431. amount:
  1432. description: |-
  1433. Amount defines the maximum amount of allowed simultaneous in-flight request.
  1434. The middleware responds with HTTP 429 Too Many Requests if there are already amount requests in progress (based on the same sourceCriterion strategy).
  1435. format: int64
  1436. type: integer
  1437. sourceCriterion:
  1438. description: |-
  1439. SourceCriterion defines what criterion is used to group requests as originating from a common source.
  1440. If several strategies are defined at the same time, an error will be raised.
  1441. If none are set, the default is to use the requestHost.
  1442. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/inflightreq/#sourcecriterion
  1443. properties:
  1444. ipStrategy:
  1445. description: |-
  1446. IPStrategy holds the IP strategy configuration used by Traefik to determine the client IP.
  1447. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/ipallowlist/#ipstrategy
  1448. properties:
  1449. depth:
  1450. description: Depth tells Traefik to use the X-Forwarded-For
  1451. header and take the IP located at the depth position
  1452. (starting from the right).
  1453. type: integer
  1454. excludedIPs:
  1455. description: ExcludedIPs configures Traefik to scan the
  1456. X-Forwarded-For header and select the first IP not in
  1457. the list.
  1458. items:
  1459. type: string
  1460. type: array
  1461. ipv6Subnet:
  1462. description: IPv6Subnet configures Traefik to consider
  1463. all IPv6 addresses from the defined subnet as originating
  1464. from the same IP. Applies to RemoteAddrStrategy and
  1465. DepthStrategy.
  1466. type: integer
  1467. type: object
  1468. requestHeaderName:
  1469. description: RequestHeaderName defines the name of the header
  1470. used to group incoming requests.
  1471. type: string
  1472. requestHost:
  1473. description: RequestHost defines whether to consider the request
  1474. Host as the source.
  1475. type: boolean
  1476. type: object
  1477. type: object
  1478. ipAllowList:
  1479. description: |-
  1480. IPAllowList holds the IP allowlist middleware configuration.
  1481. This middleware limits allowed requests based on the client IP.
  1482. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/ipallowlist/
  1483. properties:
  1484. ipStrategy:
  1485. description: |-
  1486. IPStrategy holds the IP strategy configuration used by Traefik to determine the client IP.
  1487. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/ipallowlist/#ipstrategy
  1488. properties:
  1489. depth:
  1490. description: Depth tells Traefik to use the X-Forwarded-For
  1491. header and take the IP located at the depth position (starting
  1492. from the right).
  1493. type: integer
  1494. excludedIPs:
  1495. description: ExcludedIPs configures Traefik to scan the X-Forwarded-For
  1496. header and select the first IP not in the list.
  1497. items:
  1498. type: string
  1499. type: array
  1500. ipv6Subnet:
  1501. description: IPv6Subnet configures Traefik to consider all
  1502. IPv6 addresses from the defined subnet as originating from
  1503. the same IP. Applies to RemoteAddrStrategy and DepthStrategy.
  1504. type: integer
  1505. type: object
  1506. rejectStatusCode:
  1507. description: |-
  1508. RejectStatusCode defines the HTTP status code used for refused requests.
  1509. If not set, the default is 403 (Forbidden).
  1510. type: integer
  1511. sourceRange:
  1512. description: SourceRange defines the set of allowed IPs (or ranges
  1513. of allowed IPs by using CIDR notation).
  1514. items:
  1515. type: string
  1516. type: array
  1517. type: object
  1518. ipWhiteList:
  1519. description: 'Deprecated: please use IPAllowList instead.'
  1520. properties:
  1521. ipStrategy:
  1522. description: |-
  1523. IPStrategy holds the IP strategy configuration used by Traefik to determine the client IP.
  1524. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/ipallowlist/#ipstrategy
  1525. properties:
  1526. depth:
  1527. description: Depth tells Traefik to use the X-Forwarded-For
  1528. header and take the IP located at the depth position (starting
  1529. from the right).
  1530. type: integer
  1531. excludedIPs:
  1532. description: ExcludedIPs configures Traefik to scan the X-Forwarded-For
  1533. header and select the first IP not in the list.
  1534. items:
  1535. type: string
  1536. type: array
  1537. ipv6Subnet:
  1538. description: IPv6Subnet configures Traefik to consider all
  1539. IPv6 addresses from the defined subnet as originating from
  1540. the same IP. Applies to RemoteAddrStrategy and DepthStrategy.
  1541. type: integer
  1542. type: object
  1543. sourceRange:
  1544. description: SourceRange defines the set of allowed IPs (or ranges
  1545. of allowed IPs by using CIDR notation). Required.
  1546. items:
  1547. type: string
  1548. type: array
  1549. type: object
  1550. passTLSClientCert:
  1551. description: |-
  1552. PassTLSClientCert holds the pass TLS client cert middleware configuration.
  1553. This middleware adds the selected data from the passed client TLS certificate to a header.
  1554. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/passtlsclientcert/
  1555. properties:
  1556. info:
  1557. description: Info selects the specific client certificate details
  1558. you want to add to the X-Forwarded-Tls-Client-Cert-Info header.
  1559. properties:
  1560. issuer:
  1561. description: Issuer defines the client certificate issuer
  1562. details to add to the X-Forwarded-Tls-Client-Cert-Info header.
  1563. properties:
  1564. commonName:
  1565. description: CommonName defines whether to add the organizationalUnit
  1566. information into the issuer.
  1567. type: boolean
  1568. country:
  1569. description: Country defines whether to add the country
  1570. information into the issuer.
  1571. type: boolean
  1572. domainComponent:
  1573. description: DomainComponent defines whether to add the
  1574. domainComponent information into the issuer.
  1575. type: boolean
  1576. locality:
  1577. description: Locality defines whether to add the locality
  1578. information into the issuer.
  1579. type: boolean
  1580. organization:
  1581. description: Organization defines whether to add the organization
  1582. information into the issuer.
  1583. type: boolean
  1584. province:
  1585. description: Province defines whether to add the province
  1586. information into the issuer.
  1587. type: boolean
  1588. serialNumber:
  1589. description: SerialNumber defines whether to add the serialNumber
  1590. information into the issuer.
  1591. type: boolean
  1592. type: object
  1593. notAfter:
  1594. description: NotAfter defines whether to add the Not After
  1595. information from the Validity part.
  1596. type: boolean
  1597. notBefore:
  1598. description: NotBefore defines whether to add the Not Before
  1599. information from the Validity part.
  1600. type: boolean
  1601. sans:
  1602. description: Sans defines whether to add the Subject Alternative
  1603. Name information from the Subject Alternative Name part.
  1604. type: boolean
  1605. serialNumber:
  1606. description: SerialNumber defines whether to add the client
  1607. serialNumber information.
  1608. type: boolean
  1609. subject:
  1610. description: Subject defines the client certificate subject
  1611. details to add to the X-Forwarded-Tls-Client-Cert-Info header.
  1612. properties:
  1613. commonName:
  1614. description: CommonName defines whether to add the organizationalUnit
  1615. information into the subject.
  1616. type: boolean
  1617. country:
  1618. description: Country defines whether to add the country
  1619. information into the subject.
  1620. type: boolean
  1621. domainComponent:
  1622. description: DomainComponent defines whether to add the
  1623. domainComponent information into the subject.
  1624. type: boolean
  1625. locality:
  1626. description: Locality defines whether to add the locality
  1627. information into the subject.
  1628. type: boolean
  1629. organization:
  1630. description: Organization defines whether to add the organization
  1631. information into the subject.
  1632. type: boolean
  1633. organizationalUnit:
  1634. description: OrganizationalUnit defines whether to add
  1635. the organizationalUnit information into the subject.
  1636. type: boolean
  1637. province:
  1638. description: Province defines whether to add the province
  1639. information into the subject.
  1640. type: boolean
  1641. serialNumber:
  1642. description: SerialNumber defines whether to add the serialNumber
  1643. information into the subject.
  1644. type: boolean
  1645. type: object
  1646. type: object
  1647. pem:
  1648. description: PEM sets the X-Forwarded-Tls-Client-Cert header with
  1649. the certificate.
  1650. type: boolean
  1651. type: object
  1652. plugin:
  1653. additionalProperties:
  1654. x-kubernetes-preserve-unknown-fields: true
  1655. description: |-
  1656. Plugin defines the middleware plugin configuration.
  1657. More info: https://doc.traefik.io/traefik/plugins/
  1658. type: object
  1659. rateLimit:
  1660. description: |-
  1661. RateLimit holds the rate limit configuration.
  1662. This middleware ensures that services will receive a fair amount of requests, and allows one to define what fair is.
  1663. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/ratelimit/
  1664. properties:
  1665. average:
  1666. description: |-
  1667. Average is the maximum rate, by default in requests/s, allowed for the given source.
  1668. It defaults to 0, which means no rate limiting.
  1669. The rate is actually defined by dividing Average by Period. So for a rate below 1req/s,
  1670. one needs to define a Period larger than a second.
  1671. format: int64
  1672. type: integer
  1673. burst:
  1674. description: |-
  1675. Burst is the maximum number of requests allowed to arrive in the same arbitrarily small period of time.
  1676. It defaults to 1.
  1677. format: int64
  1678. type: integer
  1679. period:
  1680. anyOf:
  1681. - type: integer
  1682. - type: string
  1683. description: |-
  1684. Period, in combination with Average, defines the actual maximum rate, such as:
  1685. r = Average / Period. It defaults to a second.
  1686. x-kubernetes-int-or-string: true
  1687. sourceCriterion:
  1688. description: |-
  1689. SourceCriterion defines what criterion is used to group requests as originating from a common source.
  1690. If several strategies are defined at the same time, an error will be raised.
  1691. If none are set, the default is to use the request's remote address field (as an ipStrategy).
  1692. properties:
  1693. ipStrategy:
  1694. description: |-
  1695. IPStrategy holds the IP strategy configuration used by Traefik to determine the client IP.
  1696. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/ipallowlist/#ipstrategy
  1697. properties:
  1698. depth:
  1699. description: Depth tells Traefik to use the X-Forwarded-For
  1700. header and take the IP located at the depth position
  1701. (starting from the right).
  1702. type: integer
  1703. excludedIPs:
  1704. description: ExcludedIPs configures Traefik to scan the
  1705. X-Forwarded-For header and select the first IP not in
  1706. the list.
  1707. items:
  1708. type: string
  1709. type: array
  1710. ipv6Subnet:
  1711. description: IPv6Subnet configures Traefik to consider
  1712. all IPv6 addresses from the defined subnet as originating
  1713. from the same IP. Applies to RemoteAddrStrategy and
  1714. DepthStrategy.
  1715. type: integer
  1716. type: object
  1717. requestHeaderName:
  1718. description: RequestHeaderName defines the name of the header
  1719. used to group incoming requests.
  1720. type: string
  1721. requestHost:
  1722. description: RequestHost defines whether to consider the request
  1723. Host as the source.
  1724. type: boolean
  1725. type: object
  1726. type: object
  1727. redirectRegex:
  1728. description: |-
  1729. RedirectRegex holds the redirect regex middleware configuration.
  1730. This middleware redirects a request using regex matching and replacement.
  1731. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/redirectregex/#regex
  1732. properties:
  1733. permanent:
  1734. description: Permanent defines whether the redirection is permanent
  1735. (301).
  1736. type: boolean
  1737. regex:
  1738. description: Regex defines the regex used to match and capture
  1739. elements from the request URL.
  1740. type: string
  1741. replacement:
  1742. description: Replacement defines how to modify the URL to have
  1743. the new target URL.
  1744. type: string
  1745. type: object
  1746. redirectScheme:
  1747. description: |-
  1748. RedirectScheme holds the redirect scheme middleware configuration.
  1749. This middleware redirects requests from a scheme/port to another.
  1750. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/redirectscheme/
  1751. properties:
  1752. permanent:
  1753. description: Permanent defines whether the redirection is permanent
  1754. (301).
  1755. type: boolean
  1756. port:
  1757. description: Port defines the port of the new URL.
  1758. type: string
  1759. scheme:
  1760. description: Scheme defines the scheme of the new URL.
  1761. type: string
  1762. type: object
  1763. replacePath:
  1764. description: |-
  1765. ReplacePath holds the replace path middleware configuration.
  1766. This middleware replaces the path of the request URL and store the original path in an X-Replaced-Path header.
  1767. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/replacepath/
  1768. properties:
  1769. path:
  1770. description: Path defines the path to use as replacement in the
  1771. request URL.
  1772. type: string
  1773. type: object
  1774. replacePathRegex:
  1775. description: |-
  1776. ReplacePathRegex holds the replace path regex middleware configuration.
  1777. This middleware replaces the path of a URL using regex matching and replacement.
  1778. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/replacepathregex/
  1779. properties:
  1780. regex:
  1781. description: Regex defines the regular expression used to match
  1782. and capture the path from the request URL.
  1783. type: string
  1784. replacement:
  1785. description: Replacement defines the replacement path format,
  1786. which can include captured variables.
  1787. type: string
  1788. type: object
  1789. retry:
  1790. description: |-
  1791. Retry holds the retry middleware configuration.
  1792. This middleware reissues requests a given number of times to a backend server if that server does not reply.
  1793. As soon as the server answers, the middleware stops retrying, regardless of the response status.
  1794. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/retry/
  1795. properties:
  1796. attempts:
  1797. description: Attempts defines how many times the request should
  1798. be retried.
  1799. type: integer
  1800. initialInterval:
  1801. anyOf:
  1802. - type: integer
  1803. - type: string
  1804. description: |-
  1805. InitialInterval defines the first wait time in the exponential backoff series.
  1806. The maximum interval is calculated as twice the initialInterval.
  1807. If unspecified, requests will be retried immediately.
  1808. The value of initialInterval should be provided in seconds or as a valid duration format,
  1809. see https://pkg.go.dev/time#ParseDuration.
  1810. x-kubernetes-int-or-string: true
  1811. type: object
  1812. stripPrefix:
  1813. description: |-
  1814. StripPrefix holds the strip prefix middleware configuration.
  1815. This middleware removes the specified prefixes from the URL path.
  1816. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/stripprefix/
  1817. properties:
  1818. forceSlash:
  1819. description: |-
  1820. Deprecated: ForceSlash option is deprecated, please remove any usage of this option.
  1821. ForceSlash ensures that the resulting stripped path is not the empty string, by replacing it with / when necessary.
  1822. Default: true.
  1823. type: boolean
  1824. prefixes:
  1825. description: Prefixes defines the prefixes to strip from the request
  1826. URL.
  1827. items:
  1828. type: string
  1829. type: array
  1830. type: object
  1831. stripPrefixRegex:
  1832. description: |-
  1833. StripPrefixRegex holds the strip prefix regex middleware configuration.
  1834. This middleware removes the matching prefixes from the URL path.
  1835. More info: https://doc.traefik.io/traefik/v3.2/middlewares/http/stripprefixregex/
  1836. properties:
  1837. regex:
  1838. description: Regex defines the regular expression to match the
  1839. path prefix from the request URL.
  1840. items:
  1841. type: string
  1842. type: array
  1843. type: object
  1844. type: object
  1845. required:
  1846. - metadata
  1847. - spec
  1848. type: object
  1849. served: true
  1850. storage: true
  1851. ---
  1852. apiVersion: apiextensions.k8s.io/v1
  1853. kind: CustomResourceDefinition
  1854. metadata:
  1855. annotations:
  1856. controller-gen.kubebuilder.io/version: v0.16.1
  1857. name: middlewaretcps.traefik.io
  1858. spec:
  1859. group: traefik.io
  1860. names:
  1861. kind: MiddlewareTCP
  1862. listKind: MiddlewareTCPList
  1863. plural: middlewaretcps
  1864. singular: middlewaretcp
  1865. scope: Namespaced
  1866. versions:
  1867. - name: v1alpha1
  1868. schema:
  1869. openAPIV3Schema:
  1870. description: |-
  1871. MiddlewareTCP is the CRD implementation of a Traefik TCP middleware.
  1872. More info: https://doc.traefik.io/traefik/v3.2/middlewares/overview/
  1873. properties:
  1874. apiVersion:
  1875. description: |-
  1876. APIVersion defines the versioned schema of this representation of an object.
  1877. Servers should convert recognized schemas to the latest internal value, and
  1878. may reject unrecognized values.
  1879. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  1880. type: string
  1881. kind:
  1882. description: |-
  1883. Kind is a string value representing the REST resource this object represents.
  1884. Servers may infer this from the endpoint the client submits requests to.
  1885. Cannot be updated.
  1886. In CamelCase.
  1887. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1888. type: string
  1889. metadata:
  1890. type: object
  1891. spec:
  1892. description: MiddlewareTCPSpec defines the desired state of a MiddlewareTCP.
  1893. properties:
  1894. inFlightConn:
  1895. description: InFlightConn defines the InFlightConn middleware configuration.
  1896. properties:
  1897. amount:
  1898. description: |-
  1899. Amount defines the maximum amount of allowed simultaneous connections.
  1900. The middleware closes the connection if there are already amount connections opened.
  1901. format: int64
  1902. type: integer
  1903. type: object
  1904. ipAllowList:
  1905. description: |-
  1906. IPAllowList defines the IPAllowList middleware configuration.
  1907. This middleware accepts/refuses connections based on the client IP.
  1908. More info: https://doc.traefik.io/traefik/v3.2/middlewares/tcp/ipallowlist/
  1909. properties:
  1910. sourceRange:
  1911. description: SourceRange defines the allowed IPs (or ranges of
  1912. allowed IPs by using CIDR notation).
  1913. items:
  1914. type: string
  1915. type: array
  1916. type: object
  1917. ipWhiteList:
  1918. description: |-
  1919. IPWhiteList defines the IPWhiteList middleware configuration.
  1920. This middleware accepts/refuses connections based on the client IP.
  1921. Deprecated: please use IPAllowList instead.
  1922. More info: https://doc.traefik.io/traefik/v3.2/middlewares/tcp/ipwhitelist/
  1923. properties:
  1924. sourceRange:
  1925. description: SourceRange defines the allowed IPs (or ranges of
  1926. allowed IPs by using CIDR notation).
  1927. items:
  1928. type: string
  1929. type: array
  1930. type: object
  1931. type: object
  1932. required:
  1933. - metadata
  1934. - spec
  1935. type: object
  1936. served: true
  1937. storage: true
  1938. ---
  1939. apiVersion: apiextensions.k8s.io/v1
  1940. kind: CustomResourceDefinition
  1941. metadata:
  1942. annotations:
  1943. controller-gen.kubebuilder.io/version: v0.16.1
  1944. name: serverstransports.traefik.io
  1945. spec:
  1946. group: traefik.io
  1947. names:
  1948. kind: ServersTransport
  1949. listKind: ServersTransportList
  1950. plural: serverstransports
  1951. singular: serverstransport
  1952. scope: Namespaced
  1953. versions:
  1954. - name: v1alpha1
  1955. schema:
  1956. openAPIV3Schema:
  1957. description: |-
  1958. ServersTransport is the CRD implementation of a ServersTransport.
  1959. If no serversTransport is specified, the default@internal will be used.
  1960. The default@internal serversTransport is created from the static configuration.
  1961. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#serverstransport_1
  1962. properties:
  1963. apiVersion:
  1964. description: |-
  1965. APIVersion defines the versioned schema of this representation of an object.
  1966. Servers should convert recognized schemas to the latest internal value, and
  1967. may reject unrecognized values.
  1968. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  1969. type: string
  1970. kind:
  1971. description: |-
  1972. Kind is a string value representing the REST resource this object represents.
  1973. Servers may infer this from the endpoint the client submits requests to.
  1974. Cannot be updated.
  1975. In CamelCase.
  1976. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  1977. type: string
  1978. metadata:
  1979. type: object
  1980. spec:
  1981. description: ServersTransportSpec defines the desired state of a ServersTransport.
  1982. properties:
  1983. certificatesSecrets:
  1984. description: CertificatesSecrets defines a list of secret storing
  1985. client certificates for mTLS.
  1986. items:
  1987. type: string
  1988. type: array
  1989. disableHTTP2:
  1990. description: DisableHTTP2 disables HTTP/2 for connections with backend
  1991. servers.
  1992. type: boolean
  1993. forwardingTimeouts:
  1994. description: ForwardingTimeouts defines the timeouts for requests
  1995. forwarded to the backend servers.
  1996. properties:
  1997. dialTimeout:
  1998. anyOf:
  1999. - type: integer
  2000. - type: string
  2001. description: DialTimeout is the amount of time to wait until a
  2002. connection to a backend server can be established.
  2003. x-kubernetes-int-or-string: true
  2004. idleConnTimeout:
  2005. anyOf:
  2006. - type: integer
  2007. - type: string
  2008. description: IdleConnTimeout is the maximum period for which an
  2009. idle HTTP keep-alive connection will remain open before closing
  2010. itself.
  2011. x-kubernetes-int-or-string: true
  2012. pingTimeout:
  2013. anyOf:
  2014. - type: integer
  2015. - type: string
  2016. description: PingTimeout is the timeout after which the HTTP/2
  2017. connection will be closed if a response to ping is not received.
  2018. x-kubernetes-int-or-string: true
  2019. readIdleTimeout:
  2020. anyOf:
  2021. - type: integer
  2022. - type: string
  2023. description: ReadIdleTimeout is the timeout after which a health
  2024. check using ping frame will be carried out if no frame is received
  2025. on the HTTP/2 connection.
  2026. x-kubernetes-int-or-string: true
  2027. responseHeaderTimeout:
  2028. anyOf:
  2029. - type: integer
  2030. - type: string
  2031. description: ResponseHeaderTimeout is the amount of time to wait
  2032. for a server's response headers after fully writing the request
  2033. (including its body, if any).
  2034. x-kubernetes-int-or-string: true
  2035. type: object
  2036. insecureSkipVerify:
  2037. description: InsecureSkipVerify disables SSL certificate verification.
  2038. type: boolean
  2039. maxIdleConnsPerHost:
  2040. description: MaxIdleConnsPerHost controls the maximum idle (keep-alive)
  2041. to keep per-host.
  2042. type: integer
  2043. peerCertURI:
  2044. description: PeerCertURI defines the peer cert URI used to match against
  2045. SAN URI during the peer certificate verification.
  2046. type: string
  2047. rootCAsSecrets:
  2048. description: RootCAsSecrets defines a list of CA secret used to validate
  2049. self-signed certificate.
  2050. items:
  2051. type: string
  2052. type: array
  2053. serverName:
  2054. description: ServerName defines the server name used to contact the
  2055. server.
  2056. type: string
  2057. spiffe:
  2058. description: Spiffe defines the SPIFFE configuration.
  2059. properties:
  2060. ids:
  2061. description: IDs defines the allowed SPIFFE IDs (takes precedence
  2062. over the SPIFFE TrustDomain).
  2063. items:
  2064. type: string
  2065. type: array
  2066. trustDomain:
  2067. description: TrustDomain defines the allowed SPIFFE trust domain.
  2068. type: string
  2069. type: object
  2070. type: object
  2071. required:
  2072. - metadata
  2073. - spec
  2074. type: object
  2075. served: true
  2076. storage: true
  2077. ---
  2078. apiVersion: apiextensions.k8s.io/v1
  2079. kind: CustomResourceDefinition
  2080. metadata:
  2081. annotations:
  2082. controller-gen.kubebuilder.io/version: v0.16.1
  2083. name: serverstransporttcps.traefik.io
  2084. spec:
  2085. group: traefik.io
  2086. names:
  2087. kind: ServersTransportTCP
  2088. listKind: ServersTransportTCPList
  2089. plural: serverstransporttcps
  2090. singular: serverstransporttcp
  2091. scope: Namespaced
  2092. versions:
  2093. - name: v1alpha1
  2094. schema:
  2095. openAPIV3Schema:
  2096. description: |-
  2097. ServersTransportTCP is the CRD implementation of a TCPServersTransport.
  2098. If no tcpServersTransport is specified, a default one named default@internal will be used.
  2099. The default@internal tcpServersTransport can be configured in the static configuration.
  2100. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#serverstransport_3
  2101. properties:
  2102. apiVersion:
  2103. description: |-
  2104. APIVersion defines the versioned schema of this representation of an object.
  2105. Servers should convert recognized schemas to the latest internal value, and
  2106. may reject unrecognized values.
  2107. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  2108. type: string
  2109. kind:
  2110. description: |-
  2111. Kind is a string value representing the REST resource this object represents.
  2112. Servers may infer this from the endpoint the client submits requests to.
  2113. Cannot be updated.
  2114. In CamelCase.
  2115. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2116. type: string
  2117. metadata:
  2118. type: object
  2119. spec:
  2120. description: ServersTransportTCPSpec defines the desired state of a ServersTransportTCP.
  2121. properties:
  2122. dialKeepAlive:
  2123. anyOf:
  2124. - type: integer
  2125. - type: string
  2126. description: DialKeepAlive is the interval between keep-alive probes
  2127. for an active network connection. If zero, keep-alive probes are
  2128. sent with a default value (currently 15 seconds), if supported by
  2129. the protocol and operating system. Network protocols or operating
  2130. systems that do not support keep-alives ignore this field. If negative,
  2131. keep-alive probes are disabled.
  2132. x-kubernetes-int-or-string: true
  2133. dialTimeout:
  2134. anyOf:
  2135. - type: integer
  2136. - type: string
  2137. description: DialTimeout is the amount of time to wait until a connection
  2138. to a backend server can be established.
  2139. x-kubernetes-int-or-string: true
  2140. terminationDelay:
  2141. anyOf:
  2142. - type: integer
  2143. - type: string
  2144. description: TerminationDelay defines the delay to wait before fully
  2145. terminating the connection, after one connected peer has closed
  2146. its writing capability.
  2147. x-kubernetes-int-or-string: true
  2148. tls:
  2149. description: TLS defines the TLS configuration
  2150. properties:
  2151. certificatesSecrets:
  2152. description: CertificatesSecrets defines a list of secret storing
  2153. client certificates for mTLS.
  2154. items:
  2155. type: string
  2156. type: array
  2157. insecureSkipVerify:
  2158. description: InsecureSkipVerify disables TLS certificate verification.
  2159. type: boolean
  2160. peerCertURI:
  2161. description: |-
  2162. MaxIdleConnsPerHost controls the maximum idle (keep-alive) to keep per-host.
  2163. PeerCertURI defines the peer cert URI used to match against SAN URI during the peer certificate verification.
  2164. type: string
  2165. rootCAsSecrets:
  2166. description: RootCAsSecrets defines a list of CA secret used to
  2167. validate self-signed certificates.
  2168. items:
  2169. type: string
  2170. type: array
  2171. serverName:
  2172. description: ServerName defines the server name used to contact
  2173. the server.
  2174. type: string
  2175. spiffe:
  2176. description: Spiffe defines the SPIFFE configuration.
  2177. properties:
  2178. ids:
  2179. description: IDs defines the allowed SPIFFE IDs (takes precedence
  2180. over the SPIFFE TrustDomain).
  2181. items:
  2182. type: string
  2183. type: array
  2184. trustDomain:
  2185. description: TrustDomain defines the allowed SPIFFE trust
  2186. domain.
  2187. type: string
  2188. type: object
  2189. type: object
  2190. type: object
  2191. required:
  2192. - metadata
  2193. - spec
  2194. type: object
  2195. served: true
  2196. storage: true
  2197. ---
  2198. apiVersion: apiextensions.k8s.io/v1
  2199. kind: CustomResourceDefinition
  2200. metadata:
  2201. annotations:
  2202. controller-gen.kubebuilder.io/version: v0.16.1
  2203. name: tlsoptions.traefik.io
  2204. spec:
  2205. group: traefik.io
  2206. names:
  2207. kind: TLSOption
  2208. listKind: TLSOptionList
  2209. plural: tlsoptions
  2210. singular: tlsoption
  2211. scope: Namespaced
  2212. versions:
  2213. - name: v1alpha1
  2214. schema:
  2215. openAPIV3Schema:
  2216. description: |-
  2217. TLSOption is the CRD implementation of a Traefik TLS Option, allowing to configure some parameters of the TLS connection.
  2218. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#tls-options
  2219. properties:
  2220. apiVersion:
  2221. description: |-
  2222. APIVersion defines the versioned schema of this representation of an object.
  2223. Servers should convert recognized schemas to the latest internal value, and
  2224. may reject unrecognized values.
  2225. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  2226. type: string
  2227. kind:
  2228. description: |-
  2229. Kind is a string value representing the REST resource this object represents.
  2230. Servers may infer this from the endpoint the client submits requests to.
  2231. Cannot be updated.
  2232. In CamelCase.
  2233. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2234. type: string
  2235. metadata:
  2236. type: object
  2237. spec:
  2238. description: TLSOptionSpec defines the desired state of a TLSOption.
  2239. properties:
  2240. alpnProtocols:
  2241. description: |-
  2242. ALPNProtocols defines the list of supported application level protocols for the TLS handshake, in order of preference.
  2243. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#alpn-protocols
  2244. items:
  2245. type: string
  2246. type: array
  2247. cipherSuites:
  2248. description: |-
  2249. CipherSuites defines the list of supported cipher suites for TLS versions up to TLS 1.2.
  2250. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#cipher-suites
  2251. items:
  2252. type: string
  2253. type: array
  2254. clientAuth:
  2255. description: ClientAuth defines the server's policy for TLS Client
  2256. Authentication.
  2257. properties:
  2258. clientAuthType:
  2259. description: ClientAuthType defines the client authentication
  2260. type to apply.
  2261. enum:
  2262. - NoClientCert
  2263. - RequestClientCert
  2264. - RequireAnyClientCert
  2265. - VerifyClientCertIfGiven
  2266. - RequireAndVerifyClientCert
  2267. type: string
  2268. secretNames:
  2269. description: SecretNames defines the names of the referenced Kubernetes
  2270. Secret storing certificate details.
  2271. items:
  2272. type: string
  2273. type: array
  2274. type: object
  2275. curvePreferences:
  2276. description: |-
  2277. CurvePreferences defines the preferred elliptic curves in a specific order.
  2278. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#curve-preferences
  2279. items:
  2280. type: string
  2281. type: array
  2282. maxVersion:
  2283. description: |-
  2284. MaxVersion defines the maximum TLS version that Traefik will accept.
  2285. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  2286. Default: None.
  2287. type: string
  2288. minVersion:
  2289. description: |-
  2290. MinVersion defines the minimum TLS version that Traefik will accept.
  2291. Possible values: VersionTLS10, VersionTLS11, VersionTLS12, VersionTLS13.
  2292. Default: VersionTLS10.
  2293. type: string
  2294. preferServerCipherSuites:
  2295. description: |-
  2296. PreferServerCipherSuites defines whether the server chooses a cipher suite among his own instead of among the client's.
  2297. It is enabled automatically when minVersion or maxVersion is set.
  2298. Deprecated: https://github.com/golang/go/issues/45430
  2299. type: boolean
  2300. sniStrict:
  2301. description: SniStrict defines whether Traefik allows connections
  2302. from clients connections that do not specify a server_name extension.
  2303. type: boolean
  2304. type: object
  2305. required:
  2306. - metadata
  2307. - spec
  2308. type: object
  2309. served: true
  2310. storage: true
  2311. ---
  2312. apiVersion: apiextensions.k8s.io/v1
  2313. kind: CustomResourceDefinition
  2314. metadata:
  2315. annotations:
  2316. controller-gen.kubebuilder.io/version: v0.16.1
  2317. name: tlsstores.traefik.io
  2318. spec:
  2319. group: traefik.io
  2320. names:
  2321. kind: TLSStore
  2322. listKind: TLSStoreList
  2323. plural: tlsstores
  2324. singular: tlsstore
  2325. scope: Namespaced
  2326. versions:
  2327. - name: v1alpha1
  2328. schema:
  2329. openAPIV3Schema:
  2330. description: |-
  2331. TLSStore is the CRD implementation of a Traefik TLS Store.
  2332. For the time being, only the TLSStore named default is supported.
  2333. This means that you cannot have two stores that are named default in different Kubernetes namespaces.
  2334. More info: https://doc.traefik.io/traefik/v3.2/https/tls/#certificates-stores
  2335. properties:
  2336. apiVersion:
  2337. description: |-
  2338. APIVersion defines the versioned schema of this representation of an object.
  2339. Servers should convert recognized schemas to the latest internal value, and
  2340. may reject unrecognized values.
  2341. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  2342. type: string
  2343. kind:
  2344. description: |-
  2345. Kind is a string value representing the REST resource this object represents.
  2346. Servers may infer this from the endpoint the client submits requests to.
  2347. Cannot be updated.
  2348. In CamelCase.
  2349. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2350. type: string
  2351. metadata:
  2352. type: object
  2353. spec:
  2354. description: TLSStoreSpec defines the desired state of a TLSStore.
  2355. properties:
  2356. certificates:
  2357. description: Certificates is a list of secret names, each secret holding
  2358. a key/certificate pair to add to the store.
  2359. items:
  2360. description: Certificate holds a secret name for the TLSStore resource.
  2361. properties:
  2362. secretName:
  2363. description: SecretName is the name of the referenced Kubernetes
  2364. Secret to specify the certificate details.
  2365. type: string
  2366. required:
  2367. - secretName
  2368. type: object
  2369. type: array
  2370. defaultCertificate:
  2371. description: DefaultCertificate defines the default certificate configuration.
  2372. properties:
  2373. secretName:
  2374. description: SecretName is the name of the referenced Kubernetes
  2375. Secret to specify the certificate details.
  2376. type: string
  2377. required:
  2378. - secretName
  2379. type: object
  2380. defaultGeneratedCert:
  2381. description: DefaultGeneratedCert defines the default generated certificate
  2382. configuration.
  2383. properties:
  2384. domain:
  2385. description: Domain is the domain definition for the DefaultCertificate.
  2386. properties:
  2387. main:
  2388. description: Main defines the main domain name.
  2389. type: string
  2390. sans:
  2391. description: SANs defines the subject alternative domain names.
  2392. items:
  2393. type: string
  2394. type: array
  2395. type: object
  2396. resolver:
  2397. description: Resolver is the name of the resolver that will be
  2398. used to issue the DefaultCertificate.
  2399. type: string
  2400. type: object
  2401. type: object
  2402. required:
  2403. - metadata
  2404. - spec
  2405. type: object
  2406. served: true
  2407. storage: true
  2408. ---
  2409. apiVersion: apiextensions.k8s.io/v1
  2410. kind: CustomResourceDefinition
  2411. metadata:
  2412. annotations:
  2413. controller-gen.kubebuilder.io/version: v0.16.1
  2414. name: traefikservices.traefik.io
  2415. spec:
  2416. group: traefik.io
  2417. names:
  2418. kind: TraefikService
  2419. listKind: TraefikServiceList
  2420. plural: traefikservices
  2421. singular: traefikservice
  2422. scope: Namespaced
  2423. versions:
  2424. - name: v1alpha1
  2425. schema:
  2426. openAPIV3Schema:
  2427. description: |-
  2428. TraefikService is the CRD implementation of a Traefik Service.
  2429. TraefikService object allows to:
  2430. - Apply weight to Services on load-balancing
  2431. - Mirror traffic on services
  2432. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#kind-traefikservice
  2433. properties:
  2434. apiVersion:
  2435. description: |-
  2436. APIVersion defines the versioned schema of this representation of an object.
  2437. Servers should convert recognized schemas to the latest internal value, and
  2438. may reject unrecognized values.
  2439. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
  2440. type: string
  2441. kind:
  2442. description: |-
  2443. Kind is a string value representing the REST resource this object represents.
  2444. Servers may infer this from the endpoint the client submits requests to.
  2445. Cannot be updated.
  2446. In CamelCase.
  2447. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
  2448. type: string
  2449. metadata:
  2450. type: object
  2451. spec:
  2452. description: TraefikServiceSpec defines the desired state of a TraefikService.
  2453. properties:
  2454. mirroring:
  2455. description: Mirroring defines the Mirroring service configuration.
  2456. properties:
  2457. healthCheck:
  2458. description: Healthcheck defines health checks for ExternalName
  2459. services.
  2460. properties:
  2461. followRedirects:
  2462. description: |-
  2463. FollowRedirects defines whether redirects should be followed during the health check calls.
  2464. Default: true
  2465. type: boolean
  2466. headers:
  2467. additionalProperties:
  2468. type: string
  2469. description: Headers defines custom headers to be sent to
  2470. the health check endpoint.
  2471. type: object
  2472. hostname:
  2473. description: Hostname defines the value of hostname in the
  2474. Host header of the health check request.
  2475. type: string
  2476. interval:
  2477. anyOf:
  2478. - type: integer
  2479. - type: string
  2480. description: |-
  2481. Interval defines the frequency of the health check calls.
  2482. Default: 30s
  2483. x-kubernetes-int-or-string: true
  2484. method:
  2485. description: Method defines the healthcheck method.
  2486. type: string
  2487. mode:
  2488. description: |-
  2489. Mode defines the health check mode.
  2490. If defined to grpc, will use the gRPC health check protocol to probe the server.
  2491. Default: http
  2492. type: string
  2493. path:
  2494. description: Path defines the server URL path for the health
  2495. check endpoint.
  2496. type: string
  2497. port:
  2498. description: Port defines the server URL port for the health
  2499. check endpoint.
  2500. type: integer
  2501. scheme:
  2502. description: Scheme replaces the server URL scheme for the
  2503. health check endpoint.
  2504. type: string
  2505. status:
  2506. description: Status defines the expected HTTP status code
  2507. of the response to the health check request.
  2508. type: integer
  2509. timeout:
  2510. anyOf:
  2511. - type: integer
  2512. - type: string
  2513. description: |-
  2514. Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
  2515. Default: 5s
  2516. x-kubernetes-int-or-string: true
  2517. type: object
  2518. kind:
  2519. description: Kind defines the kind of the Service.
  2520. enum:
  2521. - Service
  2522. - TraefikService
  2523. type: string
  2524. maxBodySize:
  2525. description: |-
  2526. MaxBodySize defines the maximum size allowed for the body of the request.
  2527. If the body is larger, the request is not mirrored.
  2528. Default value is -1, which means unlimited size.
  2529. format: int64
  2530. type: integer
  2531. mirrorBody:
  2532. description: |-
  2533. MirrorBody defines whether the body of the request should be mirrored.
  2534. Default value is true.
  2535. type: boolean
  2536. mirrors:
  2537. description: Mirrors defines the list of mirrors where Traefik
  2538. will duplicate the traffic.
  2539. items:
  2540. description: MirrorService holds the mirror configuration.
  2541. properties:
  2542. healthCheck:
  2543. description: Healthcheck defines health checks for ExternalName
  2544. services.
  2545. properties:
  2546. followRedirects:
  2547. description: |-
  2548. FollowRedirects defines whether redirects should be followed during the health check calls.
  2549. Default: true
  2550. type: boolean
  2551. headers:
  2552. additionalProperties:
  2553. type: string
  2554. description: Headers defines custom headers to be sent
  2555. to the health check endpoint.
  2556. type: object
  2557. hostname:
  2558. description: Hostname defines the value of hostname
  2559. in the Host header of the health check request.
  2560. type: string
  2561. interval:
  2562. anyOf:
  2563. - type: integer
  2564. - type: string
  2565. description: |-
  2566. Interval defines the frequency of the health check calls.
  2567. Default: 30s
  2568. x-kubernetes-int-or-string: true
  2569. method:
  2570. description: Method defines the healthcheck method.
  2571. type: string
  2572. mode:
  2573. description: |-
  2574. Mode defines the health check mode.
  2575. If defined to grpc, will use the gRPC health check protocol to probe the server.
  2576. Default: http
  2577. type: string
  2578. path:
  2579. description: Path defines the server URL path for the
  2580. health check endpoint.
  2581. type: string
  2582. port:
  2583. description: Port defines the server URL port for the
  2584. health check endpoint.
  2585. type: integer
  2586. scheme:
  2587. description: Scheme replaces the server URL scheme for
  2588. the health check endpoint.
  2589. type: string
  2590. status:
  2591. description: Status defines the expected HTTP status
  2592. code of the response to the health check request.
  2593. type: integer
  2594. timeout:
  2595. anyOf:
  2596. - type: integer
  2597. - type: string
  2598. description: |-
  2599. Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
  2600. Default: 5s
  2601. x-kubernetes-int-or-string: true
  2602. type: object
  2603. kind:
  2604. description: Kind defines the kind of the Service.
  2605. enum:
  2606. - Service
  2607. - TraefikService
  2608. type: string
  2609. name:
  2610. description: |-
  2611. Name defines the name of the referenced Kubernetes Service or TraefikService.
  2612. The differentiation between the two is specified in the Kind field.
  2613. type: string
  2614. namespace:
  2615. description: Namespace defines the namespace of the referenced
  2616. Kubernetes Service or TraefikService.
  2617. type: string
  2618. nativeLB:
  2619. description: |-
  2620. NativeLB controls, when creating the load-balancer,
  2621. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  2622. The Kubernetes Service itself does load-balance to the pods.
  2623. By default, NativeLB is false.
  2624. type: boolean
  2625. nodePortLB:
  2626. description: |-
  2627. NodePortLB controls, when creating the load-balancer,
  2628. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  2629. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  2630. By default, NodePortLB is false.
  2631. type: boolean
  2632. passHostHeader:
  2633. description: |-
  2634. PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
  2635. By default, passHostHeader is true.
  2636. type: boolean
  2637. percent:
  2638. description: |-
  2639. Percent defines the part of the traffic to mirror.
  2640. Supported values: 0 to 100.
  2641. type: integer
  2642. port:
  2643. anyOf:
  2644. - type: integer
  2645. - type: string
  2646. description: |-
  2647. Port defines the port of a Kubernetes Service.
  2648. This can be a reference to a named port.
  2649. x-kubernetes-int-or-string: true
  2650. responseForwarding:
  2651. description: ResponseForwarding defines how Traefik forwards
  2652. the response from the upstream Kubernetes Service to the
  2653. client.
  2654. properties:
  2655. flushInterval:
  2656. description: |-
  2657. FlushInterval defines the interval, in milliseconds, in between flushes to the client while copying the response body.
  2658. A negative value means to flush immediately after each write to the client.
  2659. This configuration is ignored when ReverseProxy recognizes a response as a streaming response;
  2660. for such responses, writes are flushed to the client immediately.
  2661. Default: 100ms
  2662. type: string
  2663. type: object
  2664. scheme:
  2665. description: |-
  2666. Scheme defines the scheme to use for the request to the upstream Kubernetes Service.
  2667. It defaults to https when Kubernetes Service port is 443, http otherwise.
  2668. type: string
  2669. serversTransport:
  2670. description: |-
  2671. ServersTransport defines the name of ServersTransport resource to use.
  2672. It allows to configure the transport between Traefik and your servers.
  2673. Can only be used on a Kubernetes Service.
  2674. type: string
  2675. sticky:
  2676. description: |-
  2677. Sticky defines the sticky sessions configuration.
  2678. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#sticky-sessions
  2679. properties:
  2680. cookie:
  2681. description: Cookie defines the sticky cookie configuration.
  2682. properties:
  2683. httpOnly:
  2684. description: HTTPOnly defines whether the cookie
  2685. can be accessed by client-side APIs, such as JavaScript.
  2686. type: boolean
  2687. maxAge:
  2688. description: |-
  2689. MaxAge indicates the number of seconds until the cookie expires.
  2690. When set to a negative number, the cookie expires immediately.
  2691. When set to zero, the cookie never expires.
  2692. type: integer
  2693. name:
  2694. description: Name defines the Cookie name.
  2695. type: string
  2696. sameSite:
  2697. description: |-
  2698. SameSite defines the same site policy.
  2699. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
  2700. type: string
  2701. secure:
  2702. description: Secure defines whether the cookie can
  2703. only be transmitted over an encrypted connection
  2704. (i.e. HTTPS).
  2705. type: boolean
  2706. type: object
  2707. type: object
  2708. strategy:
  2709. description: |-
  2710. Strategy defines the load balancing strategy between the servers.
  2711. RoundRobin is the only supported value at the moment.
  2712. type: string
  2713. weight:
  2714. description: |-
  2715. Weight defines the weight and should only be specified when Name references a TraefikService object
  2716. (and to be precise, one that embeds a Weighted Round Robin).
  2717. type: integer
  2718. required:
  2719. - name
  2720. type: object
  2721. type: array
  2722. name:
  2723. description: |-
  2724. Name defines the name of the referenced Kubernetes Service or TraefikService.
  2725. The differentiation between the two is specified in the Kind field.
  2726. type: string
  2727. namespace:
  2728. description: Namespace defines the namespace of the referenced
  2729. Kubernetes Service or TraefikService.
  2730. type: string
  2731. nativeLB:
  2732. description: |-
  2733. NativeLB controls, when creating the load-balancer,
  2734. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  2735. The Kubernetes Service itself does load-balance to the pods.
  2736. By default, NativeLB is false.
  2737. type: boolean
  2738. nodePortLB:
  2739. description: |-
  2740. NodePortLB controls, when creating the load-balancer,
  2741. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  2742. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  2743. By default, NodePortLB is false.
  2744. type: boolean
  2745. passHostHeader:
  2746. description: |-
  2747. PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
  2748. By default, passHostHeader is true.
  2749. type: boolean
  2750. port:
  2751. anyOf:
  2752. - type: integer
  2753. - type: string
  2754. description: |-
  2755. Port defines the port of a Kubernetes Service.
  2756. This can be a reference to a named port.
  2757. x-kubernetes-int-or-string: true
  2758. responseForwarding:
  2759. description: ResponseForwarding defines how Traefik forwards the
  2760. response from the upstream Kubernetes Service to the client.
  2761. properties:
  2762. flushInterval:
  2763. description: |-
  2764. FlushInterval defines the interval, in milliseconds, in between flushes to the client while copying the response body.
  2765. A negative value means to flush immediately after each write to the client.
  2766. This configuration is ignored when ReverseProxy recognizes a response as a streaming response;
  2767. for such responses, writes are flushed to the client immediately.
  2768. Default: 100ms
  2769. type: string
  2770. type: object
  2771. scheme:
  2772. description: |-
  2773. Scheme defines the scheme to use for the request to the upstream Kubernetes Service.
  2774. It defaults to https when Kubernetes Service port is 443, http otherwise.
  2775. type: string
  2776. serversTransport:
  2777. description: |-
  2778. ServersTransport defines the name of ServersTransport resource to use.
  2779. It allows to configure the transport between Traefik and your servers.
  2780. Can only be used on a Kubernetes Service.
  2781. type: string
  2782. sticky:
  2783. description: |-
  2784. Sticky defines the sticky sessions configuration.
  2785. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#sticky-sessions
  2786. properties:
  2787. cookie:
  2788. description: Cookie defines the sticky cookie configuration.
  2789. properties:
  2790. httpOnly:
  2791. description: HTTPOnly defines whether the cookie can be
  2792. accessed by client-side APIs, such as JavaScript.
  2793. type: boolean
  2794. maxAge:
  2795. description: |-
  2796. MaxAge indicates the number of seconds until the cookie expires.
  2797. When set to a negative number, the cookie expires immediately.
  2798. When set to zero, the cookie never expires.
  2799. type: integer
  2800. name:
  2801. description: Name defines the Cookie name.
  2802. type: string
  2803. sameSite:
  2804. description: |-
  2805. SameSite defines the same site policy.
  2806. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
  2807. type: string
  2808. secure:
  2809. description: Secure defines whether the cookie can only
  2810. be transmitted over an encrypted connection (i.e. HTTPS).
  2811. type: boolean
  2812. type: object
  2813. type: object
  2814. strategy:
  2815. description: |-
  2816. Strategy defines the load balancing strategy between the servers.
  2817. RoundRobin is the only supported value at the moment.
  2818. type: string
  2819. weight:
  2820. description: |-
  2821. Weight defines the weight and should only be specified when Name references a TraefikService object
  2822. (and to be precise, one that embeds a Weighted Round Robin).
  2823. type: integer
  2824. required:
  2825. - name
  2826. type: object
  2827. weighted:
  2828. description: Weighted defines the Weighted Round Robin configuration.
  2829. properties:
  2830. services:
  2831. description: Services defines the list of Kubernetes Service and/or
  2832. TraefikService to load-balance, with weight.
  2833. items:
  2834. description: Service defines an upstream HTTP service to proxy
  2835. traffic to.
  2836. properties:
  2837. healthCheck:
  2838. description: Healthcheck defines health checks for ExternalName
  2839. services.
  2840. properties:
  2841. followRedirects:
  2842. description: |-
  2843. FollowRedirects defines whether redirects should be followed during the health check calls.
  2844. Default: true
  2845. type: boolean
  2846. headers:
  2847. additionalProperties:
  2848. type: string
  2849. description: Headers defines custom headers to be sent
  2850. to the health check endpoint.
  2851. type: object
  2852. hostname:
  2853. description: Hostname defines the value of hostname
  2854. in the Host header of the health check request.
  2855. type: string
  2856. interval:
  2857. anyOf:
  2858. - type: integer
  2859. - type: string
  2860. description: |-
  2861. Interval defines the frequency of the health check calls.
  2862. Default: 30s
  2863. x-kubernetes-int-or-string: true
  2864. method:
  2865. description: Method defines the healthcheck method.
  2866. type: string
  2867. mode:
  2868. description: |-
  2869. Mode defines the health check mode.
  2870. If defined to grpc, will use the gRPC health check protocol to probe the server.
  2871. Default: http
  2872. type: string
  2873. path:
  2874. description: Path defines the server URL path for the
  2875. health check endpoint.
  2876. type: string
  2877. port:
  2878. description: Port defines the server URL port for the
  2879. health check endpoint.
  2880. type: integer
  2881. scheme:
  2882. description: Scheme replaces the server URL scheme for
  2883. the health check endpoint.
  2884. type: string
  2885. status:
  2886. description: Status defines the expected HTTP status
  2887. code of the response to the health check request.
  2888. type: integer
  2889. timeout:
  2890. anyOf:
  2891. - type: integer
  2892. - type: string
  2893. description: |-
  2894. Timeout defines the maximum duration Traefik will wait for a health check request before considering the server unhealthy.
  2895. Default: 5s
  2896. x-kubernetes-int-or-string: true
  2897. type: object
  2898. kind:
  2899. description: Kind defines the kind of the Service.
  2900. enum:
  2901. - Service
  2902. - TraefikService
  2903. type: string
  2904. name:
  2905. description: |-
  2906. Name defines the name of the referenced Kubernetes Service or TraefikService.
  2907. The differentiation between the two is specified in the Kind field.
  2908. type: string
  2909. namespace:
  2910. description: Namespace defines the namespace of the referenced
  2911. Kubernetes Service or TraefikService.
  2912. type: string
  2913. nativeLB:
  2914. description: |-
  2915. NativeLB controls, when creating the load-balancer,
  2916. whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
  2917. The Kubernetes Service itself does load-balance to the pods.
  2918. By default, NativeLB is false.
  2919. type: boolean
  2920. nodePortLB:
  2921. description: |-
  2922. NodePortLB controls, when creating the load-balancer,
  2923. whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is NodePort.
  2924. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes.
  2925. By default, NodePortLB is false.
  2926. type: boolean
  2927. passHostHeader:
  2928. description: |-
  2929. PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
  2930. By default, passHostHeader is true.
  2931. type: boolean
  2932. port:
  2933. anyOf:
  2934. - type: integer
  2935. - type: string
  2936. description: |-
  2937. Port defines the port of a Kubernetes Service.
  2938. This can be a reference to a named port.
  2939. x-kubernetes-int-or-string: true
  2940. responseForwarding:
  2941. description: ResponseForwarding defines how Traefik forwards
  2942. the response from the upstream Kubernetes Service to the
  2943. client.
  2944. properties:
  2945. flushInterval:
  2946. description: |-
  2947. FlushInterval defines the interval, in milliseconds, in between flushes to the client while copying the response body.
  2948. A negative value means to flush immediately after each write to the client.
  2949. This configuration is ignored when ReverseProxy recognizes a response as a streaming response;
  2950. for such responses, writes are flushed to the client immediately.
  2951. Default: 100ms
  2952. type: string
  2953. type: object
  2954. scheme:
  2955. description: |-
  2956. Scheme defines the scheme to use for the request to the upstream Kubernetes Service.
  2957. It defaults to https when Kubernetes Service port is 443, http otherwise.
  2958. type: string
  2959. serversTransport:
  2960. description: |-
  2961. ServersTransport defines the name of ServersTransport resource to use.
  2962. It allows to configure the transport between Traefik and your servers.
  2963. Can only be used on a Kubernetes Service.
  2964. type: string
  2965. sticky:
  2966. description: |-
  2967. Sticky defines the sticky sessions configuration.
  2968. More info: https://doc.traefik.io/traefik/v3.2/routing/services/#sticky-sessions
  2969. properties:
  2970. cookie:
  2971. description: Cookie defines the sticky cookie configuration.
  2972. properties:
  2973. httpOnly:
  2974. description: HTTPOnly defines whether the cookie
  2975. can be accessed by client-side APIs, such as JavaScript.
  2976. type: boolean
  2977. maxAge:
  2978. description: |-
  2979. MaxAge indicates the number of seconds until the cookie expires.
  2980. When set to a negative number, the cookie expires immediately.
  2981. When set to zero, the cookie never expires.
  2982. type: integer
  2983. name:
  2984. description: Name defines the Cookie name.
  2985. type: string
  2986. sameSite:
  2987. description: |-
  2988. SameSite defines the same site policy.
  2989. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
  2990. type: string
  2991. secure:
  2992. description: Secure defines whether the cookie can
  2993. only be transmitted over an encrypted connection
  2994. (i.e. HTTPS).
  2995. type: boolean
  2996. type: object
  2997. type: object
  2998. strategy:
  2999. description: |-
  3000. Strategy defines the load balancing strategy between the servers.
  3001. RoundRobin is the only supported value at the moment.
  3002. type: string
  3003. weight:
  3004. description: |-
  3005. Weight defines the weight and should only be specified when Name references a TraefikService object
  3006. (and to be precise, one that embeds a Weighted Round Robin).
  3007. type: integer
  3008. required:
  3009. - name
  3010. type: object
  3011. type: array
  3012. sticky:
  3013. description: |-
  3014. Sticky defines whether sticky sessions are enabled.
  3015. More info: https://doc.traefik.io/traefik/v3.2/routing/providers/kubernetes-crd/#stickiness-and-load-balancing
  3016. properties:
  3017. cookie:
  3018. description: Cookie defines the sticky cookie configuration.
  3019. properties:
  3020. httpOnly:
  3021. description: HTTPOnly defines whether the cookie can be
  3022. accessed by client-side APIs, such as JavaScript.
  3023. type: boolean
  3024. maxAge:
  3025. description: |-
  3026. MaxAge indicates the number of seconds until the cookie expires.
  3027. When set to a negative number, the cookie expires immediately.
  3028. When set to zero, the cookie never expires.
  3029. type: integer
  3030. name:
  3031. description: Name defines the Cookie name.
  3032. type: string
  3033. sameSite:
  3034. description: |-
  3035. SameSite defines the same site policy.
  3036. More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
  3037. type: string
  3038. secure:
  3039. description: Secure defines whether the cookie can only
  3040. be transmitted over an encrypted connection (i.e. HTTPS).
  3041. type: boolean
  3042. type: object
  3043. type: object
  3044. type: object
  3045. type: object
  3046. required:
  3047. - metadata
  3048. - spec
  3049. type: object
  3050. served: true
  3051. storage: true

Resources

apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
  name: wrr2
  namespace: default

spec:
  weighted:
    services:
      - name: s1
        weight: 1
        port: 80
        # Optional, as it is the default value
        kind: Service
      - name: s3
        weight: 1
        port: 80

---
apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
  name: wrr1
  namespace: default

spec:
  weighted:
    services:
      - name: wrr2
        kind: TraefikService
        weight: 1
      - name: s3
        weight: 1
        port: 80

---
apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
  name: mirror1
  namespace: default

spec:
  mirroring:
    name: s1
    port: 80
    mirrors:
      - name: s3
        percent: 20
        port: 80
      - name: mirror2
        kind: TraefikService
        percent: 20

---
apiVersion: traefik.io/v1alpha1
kind: TraefikService
metadata:
  name: mirror2
  namespace: default

spec:
  mirroring:
    name: wrr2
    kind: TraefikService
    mirrorBody: true
    # Optional
    maxBodySize: 2000000000
    mirrors:
      - name: s2
        # Optional, as it is the default value
        kind: Service
        percent: 20
        port: 80

---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: ingressroute

spec:
  entryPoints:
    - web
    - websecure
  routes:
    - match: Host(`example.net`) && PathPrefix(`/bar`)
      kind: Rule
      priority: 12
      # defining several services is possible and allowed, but for now the servers of
      # all the services (for a given route) get merged altogether under the same
      # load-balancing strategy.
      services:
        - name: s1
          port: 80
          # strategy defines the load balancing strategy between the servers. It defaults
          # to Round Robin, and for now only Round Robin is supported anyway.
          strategy: RoundRobin
        - name: s2
          port: 433
          serversTransport: mytransport
    - match: PathPrefix(`/misc`)
      kind: Rule
      services:
        - name: s3
          port: 80
      middlewares:
        - name: stripprefix
        - name: addprefix
    - match: PathPrefix(`/misc`)
      kind: Rule
      services:
        - name: s3
          # Optional, as it is the default value
          kind: Service
          port: 8443
          # scheme allow to override the scheme for the service. (ex: https or h2c)
          scheme: https
    - match: PathPrefix(`/lb`)
      kind: Rule
      services:
        - name: wrr1
          kind: TraefikService
    - match: PathPrefix(`/mirrored`)
      kind: Rule
      services:
        - name: mirror1
          kind: TraefikService
  # use an empty tls object for TLS with Let's Encrypt
  tls:
    secretName: supersecret
    options:
      name: my-tls-option
      namespace: default

---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
  name: ingressroutetcp.crd
  namespace: default

spec:
  entryPoints:
    - footcp
  routes:
    - match: HostSNI(`example.com`)
      services:
        - name: whoamitcp
          port: 8080
          serversTransport: mytransporttcp
      middlewares:
        - name: ipallowlist
  tls:
    secretName: foosecret
    passthrough: false
    options:
      name: my-tls-option
      namespace: default

---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
  name: ingressrouteudp.crd
  namespace: default

spec:
  entryPoints:
    - footcp
  routes:
    - services:
        - name: whoamiudp
          port: 8080

---
apiVersion: traefik.io/v1alpha1
kind: TLSOption
metadata:
  name: tlsoption
  namespace: default

spec:
  minVersion: foobar
  maxVersion: foobar
  cipherSuites:
    - foobar
    - foobar
  curvePreferences:
    - foobar
    - foobar
  clientAuth:
    secretNames:
      - foobar
      - foobar
    clientAuthType: RequireAndVerifyClientCert
  sniStrict: true
  alpnProtocols:
    - foobar
    - foobar

---
apiVersion: traefik.io/v1alpha1
kind: ServersTransport
metadata:
  name: mytransport
  namespace: default

spec:
  serverName: foobar
  insecureSkipVerify: true
  rootCAsSecrets:
    - foobar
    - foobar
  certificatesSecrets:
    - foobar
    - foobar
  peerCertURI: foobar
  maxIdleConnsPerHost: 1
  forwardingTimeouts:
    dialTimeout: 42s
    responseHeaderTimeout: 42s
    idleConnTimeout: 42s
  disableHTTP2: true

---
apiVersion: traefik.io/v1alpha1
kind: ServersTransportTCP
metadata:
  name: mytransporttcp
  namespace: default

spec:
  serverName: foobar
  insecureSkipVerify: true
  rootCAsSecrets:
    - foobar
    - foobar
  certificatesSecrets:
    - foobar
    - foobar
  peerCertURI: foobar
  dialTimeout: 42s
  dialKeepAlive: 42s

RBAC

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: traefik-ingress-controller

rules:
  - apiGroups:
      - ""
    resources:
      - services
      - secrets
      - nodes
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - discovery.k8s.io
    resources:
      - endpointslices
    verbs:
      - list
      - watch
  - apiGroups:
      - extensions
      - networking.k8s.io
    resources:
      - ingresses
      - ingressclasses
    verbs:
      - get
      - list
      - watch
  - apiGroups:
      - extensions
      - networking.k8s.io
    resources:
      - ingresses/status
    verbs:
      - update
  - apiGroups:
      - traefik.io
    resources:
      - middlewares
      - middlewaretcps
      - ingressroutes
      - traefikservices
      - ingressroutetcps
      - ingressrouteudps
      - tlsoptions
      - tlsstores
      - serverstransports
      - serverstransporttcps
    verbs:
      - get
      - list
      - watch

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: traefik-ingress-controller

roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: traefik-ingress-controller
subjects:
  - kind: ServiceAccount
    name: traefik-ingress-controller
    namespace: default

Using Traefik OSS in Production?

If you are using Traefik at work, consider adding enterprise-grade API gateway capabilities or commercial support for Traefik OSS.

Adding API Gateway capabilities to Traefik OSS is fast and seamless. There’s no rip and replace and all configurations remain intact. See it in action via this short video.