├── docs ├── .dockerignore ├── runtime.txt ├── content │ ├── reference │ │ ├── dynamic-configuration │ │ │ ├── ecs.yml │ │ │ ├── nomad.yml │ │ │ ├── rancher.yml │ │ │ ├── marathon.json │ │ │ ├── consul-catalog.yml │ │ │ ├── docker.yml │ │ │ ├── ecs.md │ │ │ └── file.md │ │ └── static-configuration │ │ │ ├── cli.md │ │ │ ├── env.md │ │ │ ├── overview.md │ │ │ └── file.md │ ├── includes │ │ └── .markdownlint.json │ ├── assets │ │ ├── js │ │ │ └── extra.js │ │ └── img │ │ │ ├── providers.png │ │ │ ├── routers.png │ │ │ ├── services.png │ │ │ ├── entrypoints.png │ │ │ ├── traefik.logo.png │ │ │ ├── middleware │ │ │ ├── chain.png │ │ │ ├── compress.png │ │ │ ├── headers.png │ │ │ ├── overview.png │ │ │ ├── addprefix.png │ │ │ ├── basicauth.png │ │ │ ├── buffering.png │ │ │ ├── digestauth.png │ │ │ ├── errorpages.png │ │ │ ├── authforward.png │ │ │ ├── inflightreq.png │ │ │ ├── ipwhitelist.png │ │ │ └── circuitbreaker.png │ │ │ ├── providers │ │ │ ├── consul.png │ │ │ ├── docker.png │ │ │ ├── nomad.png │ │ │ └── rancher.png │ │ │ ├── webui-dashboard.png │ │ │ ├── quickstart-diagram.png │ │ │ ├── traefik-concepts-1.png │ │ │ ├── traefik-concepts-2.png │ │ │ ├── architecture-overview.png │ │ │ ├── traefik-architecture.png │ │ │ ├── maintainers-guidelines.png │ │ │ ├── traefikproxy-icon-color.png │ │ │ └── static-dynamic-configuration.png │ ├── https │ │ └── .markdownlint.json │ ├── routing │ │ ├── routers │ │ │ └── .markdownlint.json │ │ └── services │ │ │ └── .markdownlint.json │ ├── operations │ │ └── .markdownlint.json │ └── user-guides │ │ └── crd-acme │ │ └── 05-tlsoption.yml ├── .markdownlint.json └── docs.Dockerfile ├── webui ├── .eslintignore ├── .dockerignore ├── static │ └── DONT-EDIT-FILES-IN-THIS-DIRECTORY.md ├── src │ ├── store │ │ ├── core │ │ │ ├── state.js │ │ │ ├── index.js │ │ │ └── getters.js │ │ ├── entrypoints │ │ │ ├── state.js │ │ │ ├── index.js │ │ │ └── getters.js │ │ ├── udp │ │ │ ├── state.js │ │ │ └── index.js │ │ ├── http │ │ │ ├── state.js │ │ │ └── index.js │ │ └── tcp │ │ │ ├── state.js │ │ │ └── index.js │ ├── statics │ │ ├── icons │ │ │ ├── favicon.ico │ │ │ ├── favicon-16x16.png │ │ │ ├── favicon-32x32.png │ │ │ ├── favicon-96x96.png │ │ │ ├── icon-128x128.png │ │ │ ├── icon-192x192.png │ │ │ ├── icon-256x256.png │ │ │ ├── icon-384x384.png │ │ │ ├── icon-512x512.png │ │ │ ├── ms-icon-144x144.png │ │ │ ├── apple-icon-120x120.png │ │ │ ├── apple-icon-152x152.png │ │ │ ├── apple-icon-167x167.png │ │ │ └── apple-icon-180x180.png │ │ ├── app-logo-128x128.png │ │ └── providers │ │ │ └── nomad.svg │ ├── css │ │ └── fonts │ │ │ ├── nunito-v11-latin-600.eot │ │ │ ├── nunito-v11-latin-600.ttf │ │ │ ├── nunito-v11-latin-700.eot │ │ │ ├── nunito-v11-latin-700.ttf │ │ │ ├── nunito-v11-latin-600.woff │ │ │ ├── nunito-v11-latin-600.woff2 │ │ │ ├── nunito-v11-latin-700.woff │ │ │ ├── nunito-v11-latin-700.woff2 │ │ │ ├── nunito-v11-latin-regular.eot │ │ │ ├── nunito-v11-latin-regular.ttf │ │ │ ├── nunito-v11-latin-regular.woff │ │ │ └── nunito-v11-latin-regular.woff2 │ ├── _helpers │ │ └── APP.js │ ├── components │ │ └── _commons │ │ │ ├── PageDefault.vue │ │ │ ├── Chips.vue │ │ │ └── TLSState.vue │ ├── _directives │ │ └── resize.js │ ├── boot │ │ ├── _globals.js │ │ ├── _hacks.js │ │ └── api.js │ ├── _services │ │ └── utils.js │ └── pages │ │ └── _commons │ │ └── Error404.vue ├── babel.config.js ├── .editorconfig ├── src-pwa │ └── custom-service-worker.js ├── embed.go ├── .postcssrc.js └── Dockerfile ├── pkg ├── api │ └── testdata │ │ ├── routers-empty.json │ │ ├── services-empty.json │ │ ├── entrypoints-empty.json │ │ ├── middlewares-empty.json │ │ ├── tcprouters-empty.json │ │ ├── tcpservices-empty.json │ │ ├── udprouters-empty.json │ │ ├── udpservices-empty.json │ │ ├── tcpmiddlewares-empty.json │ │ ├── entrypoint-bar.json │ │ ├── entrypoints-page2.json │ │ ├── udprouter-bar.json │ │ ├── udprouters-page2.json │ │ ├── tcprouter-bar.json │ │ ├── udprouters-filtered-search.json │ │ ├── udprouters-filtered-status.json │ │ ├── middlewares-page2.json │ │ ├── middleware-auth.json │ │ ├── routers-page2.json │ │ ├── tcprouters-page2.json │ │ ├── tcpmiddleware-ipwhitelist.json │ │ ├── tcpmiddlewares-page2.json │ │ ├── tcprouters-filtered-search.json │ │ ├── tcpservice-bar.json │ │ ├── udpservice-bar.json │ │ ├── tcpservices-page2.json │ │ ├── udpservices-page2.json │ │ ├── router-bar.json │ │ ├── tcpservices-filtered-search.json │ │ ├── udpservices-filtered-search.json │ │ ├── tcprouters-filtered-status.json │ │ ├── tcpservices-filtered-status.json │ │ ├── udpservices-filtered-status.json │ │ ├── routers-filtered-search.json │ │ ├── routers-filtered-status.json │ │ ├── router-baz-custom-tls-options.json │ │ ├── service-bar.json │ │ ├── router-baz-default-tls-options.json │ │ ├── services-page2.json │ │ ├── entrypoints-many-lastpage.json │ │ ├── services-filtered-search.json │ │ ├── services-filtered-status.json │ │ └── middlewares-filtered-search.json ├── provider │ ├── file │ │ └── fixtures │ │ │ ├── toml │ │ │ ├── tls_file.cert │ │ │ ├── tls_file_key.cert │ │ │ ├── template_file.toml │ │ │ ├── template_in_directory_file01.toml │ │ │ ├── dir01_file01.toml │ │ │ ├── template_in_directory_file02.toml │ │ │ └── dir01_file02.toml │ │ │ └── yaml │ │ │ ├── tls_file.cert │ │ │ ├── simple_empty_store.yml │ │ │ ├── dir01_file01.yml │ │ │ ├── template_file.yml │ │ │ ├── template_in_directory_file01.yml │ │ │ ├── template_in_directory_file02.yml │ │ │ └── dir01_file02.yml │ ├── traefik │ │ └── fixtures │ │ │ ├── ping_custom.json │ │ │ ├── rest_secure.json │ │ │ ├── prometheus_custom.json │ │ │ ├── api_secure_without_dashboard.json │ │ │ ├── api_secure_with_dashboard.json │ │ │ ├── full_configuration_secure.json │ │ │ ├── ping_simple.json │ │ │ ├── rest_insecure.json │ │ │ ├── api_insecure_without_dashboard.json │ │ │ └── prometheus_simple.json │ ├── kubernetes │ │ ├── crd │ │ │ ├── traefik │ │ │ │ └── v1alpha1 │ │ │ │ │ ├── doc.go │ │ │ │ │ └── objectreference.go │ │ │ └── fixtures │ │ │ │ ├── udp │ │ │ │ ├── simple.yml │ │ │ │ ├── with_externalname_without_ports.yml │ │ │ │ ├── with_ipv6.yml │ │ │ │ ├── with_externalname.yml │ │ │ │ ├── with_externalname_service.yml │ │ │ │ ├── with_externalname_with_port.yml │ │ │ │ ├── with_empty_services.yml │ │ │ │ ├── with_cross_namespace.yml │ │ │ │ ├── with_two_routes.yml │ │ │ │ └── with_two_services.yml │ │ │ │ ├── with_plugin_read_not_exist_secret.yml │ │ │ │ ├── with_error_page.yml │ │ │ │ ├── tcp │ │ │ │ ├── with_no_rule_value.yml │ │ │ │ ├── simple.yml │ │ │ │ ├── with_externalname_without_ports.yml │ │ │ │ ├── with_externalname.yml │ │ │ │ ├── with_externalname_with_port.yml │ │ │ │ ├── with_tls_acme.yml │ │ │ │ ├── with_empty_services.yml │ │ │ │ ├── with_termination_delay.yml │ │ │ │ ├── with_cross_namespace.yml │ │ │ │ ├── with_proxyprotocol.yml │ │ │ │ ├── with_ipv6.yml │ │ │ │ ├── with_two_services.yml │ │ │ │ ├── with_two_rules.yml │ │ │ │ └── with_two_identical_rules.yml │ │ │ │ ├── with_externalname_without_ports.yml │ │ │ │ ├── with_wrong_rule_kind.yml │ │ │ │ ├── with_externalname.yml │ │ │ │ ├── with_no_rule_value.yml │ │ │ │ ├── with_externalname_with_http.yml │ │ │ │ ├── with_externalname_with_https.yml │ │ │ │ ├── simple.yml │ │ │ │ ├── with_https_default.yml │ │ │ │ ├── with_tls_acme.yml │ │ │ │ ├── with_https_scheme.yml │ │ │ │ ├── with_empty_services.yml │ │ │ │ ├── with_two_services.yml │ │ │ │ ├── with_ipv6.yml │ │ │ │ ├── with_plugin_read_secret.yml │ │ │ │ ├── with_options.yml │ │ │ │ ├── with_two_services_weight.yml │ │ │ │ ├── with_plugin_read_array_of_secret.yml │ │ │ │ ├── with_two_rules.yml │ │ │ │ └── with_plugin_deep_read_secret.yml │ │ └── ingress │ │ │ └── fixtures │ │ │ ├── Ingress-with-one-service-without-endpoints-subset_endpoint.yml │ │ │ ├── v18-Ingress-with-ingressClass_ingressclass.yml │ │ │ ├── v19-Ingress-with-ingressClass_ingressclass.yml │ │ │ ├── v19-Ingress-with-ingressClassv1_ingressclass.yml │ │ │ ├── Ingress-one-rule-with-two-paths_service.yml │ │ │ ├── Ingress-with-a-bad-host-syntax_service.yml │ │ │ ├── Ingress-with-a-bad-path-syntax_service.yml │ │ │ ├── v18-Ingress-with-empty-pathType_service.yml │ │ │ ├── v18-Ingress-with-exact-pathType_service.yml │ │ │ ├── v18-Ingress-with-ingressClass_service.yml │ │ │ ├── v18-Ingress-with-no-pathType_service.yml │ │ │ ├── v19-Ingress-with-empty-pathType_service.yml │ │ │ ├── v19-Ingress-with-exact-pathType_service.yml │ │ │ ├── v19-Ingress-with-ingressClass_service.yml │ │ │ ├── v19-Ingress-with-ingressClassv1_service.yml │ │ │ ├── v19-Ingress-with-no-pathType_service.yml │ │ │ ├── Ingress-one-rule-host-only_ingress.yml │ │ │ ├── Ingress-with-only-a-bad-host-syntax_service.yml │ │ │ ├── Ingress-with-unknown-service-port_service.yml │ │ │ ├── Ingress-with-wildcard-host_service.yml │ │ │ ├── v18-Ingress-with-ingress-annotation_service.yml │ │ │ ├── v18-Ingress-with-prefix-pathType_service.yml │ │ │ ├── v19-Ingress-with-ingress-annotation_service.yml │ │ │ ├── v19-Ingress-with-prefix-pathType_service.yml │ │ │ ├── Ingress-with-conflicting-routers-on-host_service.yml │ │ │ ├── Ingress-with-conflicting-routers-on-path_service.yml │ │ │ ├── Ingress-with-default-traefik-ingressClass_service.yml │ │ │ ├── Ingress-with-one-service-without-endpoint_service.yml │ │ │ ├── Ingress-with-only-a-bad-path-syntax_service.yml │ │ │ ├── Ingress-with-unknown-service-port-name_service.yml │ │ │ ├── v18-Ingress-with-ingressClasses-filter_service.yml │ │ │ ├── v18-Ingress-with-missing-ingressClass_service.yml │ │ │ ├── v18-Ingress-with-multiple-ingressClasses_service.yml │ │ │ ├── v19-Ingress-with-missing-ingressClass_service.yml │ │ │ ├── Ingress-Two-rules-with-one-host-and-one-path_service.yml │ │ │ ├── Ingress-one-rule-with-one-host-and-two-paths_service.yml │ │ │ ├── Ingress-one-rule-with-one-path-and-one-host_service.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path_service.yml │ │ │ ├── Ingress-with-ingressClass-without-annotation_service.yml │ │ │ ├── Ingress-with-two-different-rules-with-one-path_service.yml │ │ │ ├── Single-Service-Ingress-(without-any-rules)_service.yml │ │ │ ├── Ingress-with-one-service-without-endpoints-subset_service.yml │ │ │ ├── Ingress-with-wildcard-host_endpoint.yml │ │ │ ├── v18-Ingress-with-implementationSpecific-pathType_service.yml │ │ │ ├── v18-Ingress-with-ingressClass_endpoint.yml │ │ │ ├── v18-Ingress-with-no-pathType_endpoint.yml │ │ │ ├── v19-Ingress-with-implementationSpecific-pathType_service.yml │ │ │ ├── v19-Ingress-with-ingressClass_endpoint.yml │ │ │ ├── v19-Ingress-with-no-pathType_endpoint.yml │ │ │ ├── TLS-support_endpoint.yml │ │ │ ├── v18-Ingress-with-empty-pathType_endpoint.yml │ │ │ ├── v18-Ingress-with-exact-pathType_endpoint.yml │ │ │ ├── v18-Ingress-with-prefix-pathType_endpoint.yml │ │ │ ├── v19-Ingress-with-empty-pathType_endpoint.yml │ │ │ ├── v19-Ingress-with-exact-pathType_endpoint.yml │ │ │ ├── v19-Ingress-with-ingressClassv1_endpoint.yml │ │ │ ├── v19-Ingress-with-prefix-pathType_endpoint.yml │ │ │ ├── v18-Ingress-with-ingress-annotation_endpoint.yml │ │ │ ├── v18-Ingress-with-ingressClasses-filter_endpoint.yml │ │ │ ├── v18-Ingress-with-missing-ingressClass_endpoint.yml │ │ │ ├── v19-Ingress-with-ingress-annotation_endpoint.yml │ │ │ ├── v19-Ingress-with-missing-ingressClass_endpoint.yml │ │ │ ├── v19-Ingress-with-named-port_service.yml │ │ │ ├── Ingress-with-default-traefik-ingressClass_endpoint.yml │ │ │ ├── Ingress-with-ingressClass-without-annotation_endpoint.yml │ │ │ ├── v18-Ingress-with-multiple-ingressClasses_endpoint.yml │ │ │ ├── Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_service.yml │ │ │ ├── Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_service.yml │ │ │ ├── v18-Ingress-with-implementationSpecific-pathType_endpoint.yml │ │ │ ├── v19-Ingress-with-implementationSpecific-pathType_endpoint.yml │ │ │ ├── Single-Service-Ingress-(without-any-rules)_ingress.yml │ │ │ ├── Ingress-with-one-host-without-path_endpoint.yml │ │ │ ├── Ingress-with-one-host-without-path_service.yml │ │ │ ├── Ingress-with-unknown-service-port_endpoint.yml │ │ │ ├── Ingress-with-unknown-service-port-name_endpoint.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_service.yml │ │ │ ├── Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_endpoint.yml │ │ │ ├── v19-Ingress-with-named-port_endpoint.yml │ │ │ ├── Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_endpoint.yml │ │ │ ├── Ingress-with-IPv6-endpoints_endpoint.yml │ │ │ ├── Ingress-with-service-with-externalName_service.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_service.yml │ │ │ ├── Ingress-with-service-with-externalName-enabled_service.yml │ │ │ ├── v19-Ingress-with-defaultbackend_ingress.yml │ │ │ ├── Ingress-with-annotations_endpoint.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_service.yml │ │ │ ├── Ingress-with-port-name-in-backend-and-2-pod-replica_service.yml │ │ │ ├── Ingress-with-port-name-in-backend-and-no-pod-replica_service.yml │ │ │ ├── Ingress-with-port-value-in-backend-and-no-pod-replica_service.yml │ │ │ ├── Ingress-one-rule-with-two-paths_endpoint.yml │ │ │ ├── Ingress-with-a-bad-host-syntax_endpoint.yml │ │ │ ├── Ingress-with-a-bad-path-syntax_endpoint.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path_endpoint.yml │ │ │ ├── Ingress-with-a-named-port-matching-subset-of-service-pods_service.yml │ │ │ ├── Ingress-with-only-a-bad-host-syntax_endpoint.yml │ │ │ ├── Ingress-with-two-paths-using-same-service-and-different-port-name_service.yml │ │ │ ├── TLS-support_secret.yml │ │ │ ├── Ingress-Two-rules-with-one-host-and-one-path_endpoint.yml │ │ │ ├── Ingress-one-rule-with-one-host-and-two-paths_endpoint.yml │ │ │ ├── Ingress-one-rule-with-one-path-and-one-host_endpoint.yml │ │ │ ├── Ingress-with-conflicting-routers-on-host_endpoint.yml │ │ │ ├── Ingress-with-conflicting-routers-on-path_endpoint.yml │ │ │ ├── Single-Service-Ingress-(without-any-rules)_endpoint.yml │ │ │ ├── Ingress-with-IPv6-endpoints-externalname-enabled_service.yml │ │ │ ├── Ingress-with-two-different-rules-with-one-path_endpoint.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path_ingress.yml │ │ │ ├── Ingress-with-only-a-bad-path-syntax_endpoint.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_endpoint.yml │ │ │ ├── Ingress-with-one-host-without-path_ingress.yml │ │ │ ├── Ingress-with-port-name-in-backend-and-2-pod-replica_endpoint.yml │ │ │ ├── Ingress-with-two-paths-using-same-service-and-different-port-name_endpoint.yml │ │ │ ├── Ingress-with-wildcard-host_ingress.yml │ │ │ ├── v18-Ingress-with-exact-pathType_ingress.yml │ │ │ ├── v18-Ingress-with-prefix-pathType_ingress.yml │ │ │ ├── v18-Ingress-with-ingressClass_ingress.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_ingress.yml │ │ │ ├── Ingress-with-unknown-service-port_ingress.yml │ │ │ ├── v18-Ingress-with-missing-ingressClass_ingress.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_ingress.yml │ │ │ ├── Ingress-with-service-with-externalName_ingress.yml │ │ │ ├── Ingress-with-unknown-service-port-name_ingress.yml │ │ │ ├── Ingress-one-rule-with-one-path-and-one-host_ingress.yml │ │ │ ├── Ingress-with-IPv6-endpoints-externalname-enabled_ingress.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_ingress.yml │ │ │ ├── Ingress-with-one-service-without-endpoints-subset_ingress.yml │ │ │ ├── Ingress-with-service-with-externalName-enabled_ingress.yml │ │ │ ├── Ingress-with-port-name-in-backend-and-2-pod-replica_ingress.yml │ │ │ ├── Ingress-with-port-name-in-backend-and-no-pod-replica_ingress.yml │ │ │ ├── Ingress-with-port-value-in-backend-and-no-pod-replica_ingress.yml │ │ │ ├── v19-Ingress-with-exact-pathType_ingress.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_endpoint.yml │ │ │ ├── v19-Ingress-with-ingressClass_ingress.yml │ │ │ ├── v19-Ingress-with-named-port_ingress.yml │ │ │ ├── v19-Ingress-with-prefix-pathType_ingress.yml │ │ │ ├── Ingress-with-port-invalid-for-one-service_ingress.yml │ │ │ ├── v18-Ingress-with-ingress-annotation_ingress.yml │ │ │ ├── v18-Ingress-with-ingressClasses-filter_ingressclass.yml │ │ │ ├── v18-Ingress-with-multiple-ingressClasses_ingressclass.yml │ │ │ ├── v19-Ingress-with-ingressClassv1_ingress.yml │ │ │ ├── Double-Single-Service-Ingress_service.yml │ │ │ ├── Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_endpoint.yml │ │ │ ├── Ingress-with-default-traefik-ingressClass_ingress.yml │ │ │ ├── Ingress-with-two-services_service.yml │ │ │ ├── v18-Ingress-with-no-pathType_ingress.yml │ │ │ ├── v19-Ingress-with-missing-ingressClass_ingress.yml │ │ │ ├── Ingress-with-ingressClass-without-annotation_ingress.yml │ │ │ ├── Ingress-with-a-named-port-matching-subset-of-service-pods_ingress.yml │ │ │ ├── v19-Ingress-with-defaultbackend_service.yml │ │ │ ├── v19-Ingress-with-ingress-annotation_ingress.yml │ │ │ ├── Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_ingress.yml │ │ │ ├── v18-Ingress-with-empty-pathType_ingress.yml │ │ │ ├── v19-Ingress-with-no-pathType_ingress.yml │ │ │ ├── Ingress-one-rule-with-two-paths_ingress.yml │ │ │ ├── Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_ingress.yml │ │ │ ├── v19-Ingress-with-defaultbackend_endpoint.yml │ │ │ ├── Ingress-with-port-name-in-backend-and-no-pod-replica_endpoint.yml │ │ │ ├── Ingress-with-port-value-in-backend-and-no-pod-replica_endpoint.yml │ │ │ ├── Double-Single-Service-Ingress_ingress.yml │ │ │ ├── Ingress-with-conflicting-routers-on-path_ingress.yml │ │ │ ├── v18-Ingress-with-implementationSpecific-pathType_ingress.yml │ │ │ ├── v19-Ingress-with-empty-pathType_ingress.yml │ │ │ ├── Ingress-with-port-invalid-for-one-service_service.yml │ │ │ ├── TLS-support_service.yml │ │ │ ├── 2-ingresses-in-different-namespace-with-same-service-name_service.yml │ │ │ ├── Ingress-one-rule-with-one-host-and-two-paths_ingress.yml │ │ │ ├── Ingress-with-IPv6-endpoints_ingress.yml │ │ │ ├── Ingress-with-a-named-port-matching-subset-of-service-pods_endpoint.yml │ │ │ ├── Ingress-with-two-different-rules-with-one-path_ingress.yml │ │ │ ├── v19-Ingress-with-implementationSpecific-pathType_ingress.yml │ │ │ ├── Ingress-with-two-paths-using-same-service-and-different-port-name_ingress.yml │ │ │ ├── Ingress-with-conflicting-routers-on-host_ingress.yml │ │ │ └── Ingress-with-two-services_ingress.yml │ ├── provider.go │ ├── acme │ │ └── store.go │ ├── rancher │ │ └── label.go │ └── nomad │ │ └── tag.go ├── config │ └── static │ │ ├── plugins.go │ │ └── pilot.go ├── server │ ├── server_signals_windows.go │ └── service │ │ └── bufferpool.go ├── types │ └── route_appender.go ├── middlewares │ ├── stateful.go │ └── middleware.go ├── tcp │ ├── tls.go │ ├── proxy_unix.go │ └── proxy_windows.go ├── udp │ └── handler.go ├── tls │ └── version.go └── collector │ └── collector_test.go ├── integration ├── fixtures │ ├── k8s │ │ ├── config.skip │ │ │ └── .gitkeep │ │ ├── .gitignore │ │ ├── 03-tlsstore.yml │ │ ├── 03-tlsoption.yml │ │ ├── 05-ingressrouteudp.yml │ │ ├── 03-ingress.yml │ │ ├── 03-ingress-https.yml │ │ ├── 05-ingressroutetcp.yml │ │ └── 03-ingressroute.yml │ ├── https │ │ ├── clientca │ │ │ ├── ca1.srl │ │ │ ├── ca2.srl │ │ │ └── ca3.srl │ │ └── dynamic_https_sni.toml │ ├── invalid_configuration.toml │ ├── test.pdf │ ├── simple_default.toml │ ├── headers │ │ └── basic.toml │ ├── simple_web.toml │ ├── file │ │ ├── 56-simple-panic.toml │ │ ├── dir │ │ │ ├── simple1.toml │ │ │ └── simple2.toml │ │ └── directory.toml │ ├── simple_debug_log.toml │ ├── etcd │ │ └── simple.toml │ ├── k8s_default.toml │ ├── rest │ │ └── simple.toml │ ├── redis │ │ └── simple.toml │ ├── consul │ │ └── simple.toml │ ├── k8s_ingressclass.toml │ ├── zookeeper │ │ └── simple.toml │ ├── k8s_ingress_label_selector.toml │ ├── tlsclientheaders │ │ └── readme.md │ ├── simple_whitelist.toml │ ├── custom_ping_termination_status_code.toml │ ├── docker │ │ ├── simple.toml │ │ └── minimal.toml │ ├── http │ │ └── simple.toml │ ├── k8s_crd_label_selector.toml │ ├── k8s_crd.toml │ ├── marathon │ │ └── simple.toml │ ├── throttling │ │ └── simple.toml │ ├── consul_catalog │ │ ├── default_not_exposed.toml │ │ ├── connect.toml │ │ ├── connect_not_aware.toml │ │ ├── simple.toml │ │ ├── connect_by_default.toml │ │ └── simple_watch.toml │ ├── simple_hostresolver.toml │ ├── acme │ │ └── certificates.toml │ ├── traefik_log_config.toml │ └── simple_secure_api.toml └── resources │ ├── compose │ ├── .gitignore │ ├── redis.yml │ ├── consul.yml │ ├── rest.yml │ ├── retry.yml │ ├── ratelimit.yml │ ├── reqacceptgrace.yml │ ├── zookeeper.yml │ ├── stats.yml │ ├── error_pages.yml │ ├── timeout.yml │ ├── etcd.yml │ ├── proxy-protocol.yml │ ├── minimal.yml │ ├── healthcheck.yml │ ├── hostresolver.yml │ ├── file.yml │ ├── tlsclientheaders.yml │ ├── base.yml │ ├── udp.yml │ ├── tracing.yml │ └── pebble.yml │ └── tls │ ├── consul_config.json │ └── README.md ├── script ├── validate-lint ├── generate ├── validate-vendor └── test-integration ├── .dockerignore ├── .gitattributes ├── generate.go ├── .github ├── PULL_REQUEST_TEMPLATE │ ├── mergeback.md │ └── release.md ├── workflows │ └── check_doc.yml └── ISSUE_TEMPLATE │ └── config.yml ├── Dockerfile ├── .gitignore └── debug.Dockerfile /docs/.dockerignore: -------------------------------------------------------------------------------- 1 | site/ 2 | -------------------------------------------------------------------------------- /docs/runtime.txt: -------------------------------------------------------------------------------- 1 | 3.7 2 | -------------------------------------------------------------------------------- /webui/.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | -------------------------------------------------------------------------------- /pkg/api/testdata/routers-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/services-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/entrypoints-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/middlewares-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/tcprouters-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/tcpservices-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/udprouters-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/api/testdata/udpservices-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /integration/fixtures/k8s/config.skip/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /integration/resources/compose/.gitignore: -------------------------------------------------------------------------------- 1 | output/ -------------------------------------------------------------------------------- /pkg/api/testdata/tcpmiddlewares-empty.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/tls_file.cert: -------------------------------------------------------------------------------- 1 | CONTENT -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/tls_file.cert: -------------------------------------------------------------------------------- 1 | CONTENT -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/tls_file_key.cert: -------------------------------------------------------------------------------- 1 | CONTENTKEY -------------------------------------------------------------------------------- /integration/fixtures/https/clientca/ca1.srl: -------------------------------------------------------------------------------- 1 | 83E81F36599F4402 2 | -------------------------------------------------------------------------------- /integration/fixtures/https/clientca/ca2.srl: -------------------------------------------------------------------------------- 1 | 9EAC6D05226C2217 2 | -------------------------------------------------------------------------------- /integration/fixtures/https/clientca/ca3.srl: -------------------------------------------------------------------------------- 1 | 813218563E2DA0DF 2 | -------------------------------------------------------------------------------- /script/validate-lint: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | golangci-lint run -------------------------------------------------------------------------------- /script/generate: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | go generate 5 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | !dist/traefik 3 | site/ 4 | vendor/ 5 | .idea/ 6 | -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/ecs.yml: -------------------------------------------------------------------------------- 1 | - "traefik.enable=true" 2 | -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/nomad.yml: -------------------------------------------------------------------------------- 1 | - "traefik.enable=true" 2 | -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/rancher.yml: -------------------------------------------------------------------------------- 1 | - "traefik.enable=true" 2 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/.gitignore: -------------------------------------------------------------------------------- 1 | ccm.yaml 2 | local-storage.yaml 3 | metrics-server 4 | -------------------------------------------------------------------------------- /webui/.dockerignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist 3 | 4 | # dependencies 5 | /node_modules 6 | -------------------------------------------------------------------------------- /webui/static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md: -------------------------------------------------------------------------------- 1 | For more information see `webui/readme.md` -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # vendor/github.com/go-acme/lego/providers/dns/cloudxns/cloudxns.go eol=crlf 2 | -------------------------------------------------------------------------------- /generate.go: -------------------------------------------------------------------------------- 1 | //go:generate go run ./internal/ 2 | 3 | package main 4 | 5 | func main() {} 6 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/simple_empty_store.yml: -------------------------------------------------------------------------------- 1 | tls: 2 | stores: 3 | default: {} 4 | -------------------------------------------------------------------------------- /webui/src/store/core/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | allOverview: {}, 3 | version: '' 4 | } 5 | -------------------------------------------------------------------------------- /webui/src/store/entrypoints/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | all: {}, 3 | byName: {} 4 | } 5 | -------------------------------------------------------------------------------- /integration/fixtures/invalid_configuration.toml: -------------------------------------------------------------------------------- 1 | { 2 | "who": ["am", "I", "?", "JSON"] 3 | } 4 | -------------------------------------------------------------------------------- /pkg/api/testdata/entrypoint-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "address": ":81", 3 | "http": {}, 4 | "name": "bar" 5 | } -------------------------------------------------------------------------------- /integration/fixtures/test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/integration/fixtures/test.pdf -------------------------------------------------------------------------------- /webui/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@quasar/babel-preset-app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /docs/content/includes/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.markdownlint.json", 3 | "MD041": false 4 | } 5 | -------------------------------------------------------------------------------- /docs/content/assets/js/extra.js: -------------------------------------------------------------------------------- 1 | /* Highlight */ 2 | (function(hljs) { 3 | hljs.initHighlightingOnLoad(); 4 | })(hljs); -------------------------------------------------------------------------------- /docs/content/https/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.markdownlint.json", 3 | "MD041": false 4 | } 5 | -------------------------------------------------------------------------------- /pkg/api/testdata/entrypoints-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "address": ":82", 4 | "http": {}, 5 | "name": "web2" 6 | } 7 | ] -------------------------------------------------------------------------------- /docs/content/assets/img/providers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/providers.png -------------------------------------------------------------------------------- /docs/content/assets/img/routers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/routers.png -------------------------------------------------------------------------------- /docs/content/assets/img/services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/services.png -------------------------------------------------------------------------------- /webui/src/statics/icons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/favicon.ico -------------------------------------------------------------------------------- /docs/content/assets/img/entrypoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/entrypoints.png -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/marathon.json: -------------------------------------------------------------------------------- 1 | "traefik.enable": "true", 2 | "traefik.marathon.ipaddressidx": "42", 3 | -------------------------------------------------------------------------------- /docs/content/routing/routers/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.markdownlint.json", 3 | "MD024": false 4 | } 5 | -------------------------------------------------------------------------------- /webui/src/statics/app-logo-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/app-logo-128x128.png -------------------------------------------------------------------------------- /docs/content/assets/img/traefik.logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/traefik.logo.png -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/consul-catalog.yml: -------------------------------------------------------------------------------- 1 | - "traefik.enable=true" 2 | - "traefik.consulcatalog.connect=true" 3 | -------------------------------------------------------------------------------- /webui/src/statics/icons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/favicon-16x16.png -------------------------------------------------------------------------------- /webui/src/statics/icons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/favicon-32x32.png -------------------------------------------------------------------------------- /webui/src/statics/icons/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/favicon-96x96.png -------------------------------------------------------------------------------- /webui/src/statics/icons/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/icon-128x128.png -------------------------------------------------------------------------------- /webui/src/statics/icons/icon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/icon-192x192.png -------------------------------------------------------------------------------- /webui/src/statics/icons/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/icon-256x256.png -------------------------------------------------------------------------------- /webui/src/statics/icons/icon-384x384.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/icon-384x384.png -------------------------------------------------------------------------------- /webui/src/statics/icons/icon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/icon-512x512.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/chain.png -------------------------------------------------------------------------------- /docs/content/assets/img/providers/consul.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/providers/consul.png -------------------------------------------------------------------------------- /docs/content/assets/img/providers/docker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/providers/docker.png -------------------------------------------------------------------------------- /docs/content/assets/img/providers/nomad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/providers/nomad.png -------------------------------------------------------------------------------- /docs/content/assets/img/webui-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/webui-dashboard.png -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-600.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-600.eot -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-600.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-600.ttf -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-700.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-700.eot -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-700.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-700.ttf -------------------------------------------------------------------------------- /webui/src/statics/icons/ms-icon-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/ms-icon-144x144.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/compress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/compress.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/headers.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/overview.png -------------------------------------------------------------------------------- /docs/content/assets/img/providers/rancher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/providers/rancher.png -------------------------------------------------------------------------------- /docs/content/assets/img/quickstart-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/quickstart-diagram.png -------------------------------------------------------------------------------- /docs/content/assets/img/traefik-concepts-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/traefik-concepts-1.png -------------------------------------------------------------------------------- /docs/content/assets/img/traefik-concepts-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/traefik-concepts-2.png -------------------------------------------------------------------------------- /docs/content/operations/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../.markdownlint.json", 3 | "MD041": false, 4 | "MD046": false 5 | } 6 | -------------------------------------------------------------------------------- /pkg/config/static/plugins.go: -------------------------------------------------------------------------------- 1 | package static 2 | 3 | // PluginConf holds the plugin configuration. 4 | type PluginConf map[string]interface{} 5 | -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-600.woff -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-600.woff2 -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-700.woff -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-700.woff2 -------------------------------------------------------------------------------- /webui/src/statics/icons/apple-icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/apple-icon-120x120.png -------------------------------------------------------------------------------- /webui/src/statics/icons/apple-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/apple-icon-152x152.png -------------------------------------------------------------------------------- /webui/src/statics/icons/apple-icon-167x167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/apple-icon-167x167.png -------------------------------------------------------------------------------- /webui/src/statics/icons/apple-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/statics/icons/apple-icon-180x180.png -------------------------------------------------------------------------------- /webui/src/store/udp/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | allRouters: {}, 3 | routerByName: {}, 4 | allServices: {}, 5 | serviceByName: {} 6 | } 7 | -------------------------------------------------------------------------------- /docs/content/assets/img/architecture-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/architecture-overview.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/addprefix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/addprefix.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/basicauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/basicauth.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/buffering.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/buffering.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/digestauth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/digestauth.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/errorpages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/errorpages.png -------------------------------------------------------------------------------- /docs/content/assets/img/traefik-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/traefik-architecture.png -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-regular.eot -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-regular.ttf -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-regular.woff -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/mergeback.md: -------------------------------------------------------------------------------- 1 | ### What does this PR do? 2 | 3 | Merge v{{.Version}} into master 4 | 5 | ### Motivation 6 | 7 | Be sync. 8 | -------------------------------------------------------------------------------- /docs/content/assets/img/maintainers-guidelines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/maintainers-guidelines.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/authforward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/authforward.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/inflightreq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/inflightreq.png -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/ipwhitelist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/ipwhitelist.png -------------------------------------------------------------------------------- /docs/content/assets/img/traefikproxy-icon-color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/traefikproxy-icon-color.png -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/docker.yml: -------------------------------------------------------------------------------- 1 | - "traefik.enable=true" 2 | - "traefik.docker.network=foobar" 3 | - "traefik.docker.lbswarm=true" 4 | -------------------------------------------------------------------------------- /docs/content/routing/services/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../.markdownlint.json", 3 | "MD024": false, 4 | "MD046": false 5 | } 6 | -------------------------------------------------------------------------------- /webui/src/css/fonts/nunito-v11-latin-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/webui/src/css/fonts/nunito-v11-latin-regular.woff2 -------------------------------------------------------------------------------- /docs/content/assets/img/middleware/circuitbreaker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/middleware/circuitbreaker.png -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/release.md: -------------------------------------------------------------------------------- 1 | ### What does this PR do? 2 | 3 | Prepare release v{{.Version}}. 4 | 5 | ### Motivation 6 | 7 | Create a new release. 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | COPY script/ca-certificates.crt /etc/ssl/certs/ 3 | COPY dist/traefik / 4 | EXPOSE 80 5 | VOLUME ["/tmp"] 6 | ENTRYPOINT ["/traefik"] 7 | -------------------------------------------------------------------------------- /docs/content/assets/img/static-dynamic-configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/teambition/traefik/urbs/docs/content/assets/img/static-dynamic-configuration.png -------------------------------------------------------------------------------- /webui/src/_helpers/APP.js: -------------------------------------------------------------------------------- 1 | const APP = { 2 | config: { 3 | env: process.env.APP_ENV, 4 | apiUrl: process.env.APP_API 5 | } 6 | } 7 | 8 | export { APP } 9 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/dir01_file01.yml: -------------------------------------------------------------------------------- 1 | http: 2 | routers: 3 | router1: 4 | service: application-1 5 | router2: 6 | service: application-2 7 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/template_file.yml: -------------------------------------------------------------------------------- 1 | http: 2 | routers: 3 | {{ range $i, $e := until 20 }} 4 | router{{ $e }}: 5 | service: application-1 6 | {{ end }} -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/template_file.toml: -------------------------------------------------------------------------------- 1 | [http.routers] 2 | {{ range $i, $e := until 20 }} 3 | [http.routers.router{{ $e }}] 4 | service = "application" 5 | {{ end }} 6 | -------------------------------------------------------------------------------- /integration/fixtures/simple_default.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [entryPoints] 6 | [entryPoints.web] 7 | address = ":8000" 8 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/template_in_directory_file01.toml: -------------------------------------------------------------------------------- 1 | [http.routers] 2 | {{ range $i, $e := until 20 }} 3 | [http.routers.router{{ $e }}] 4 | service = "application" 5 | {{ end }} -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/template_in_directory_file01.yml: -------------------------------------------------------------------------------- 1 | http: 2 | routers: 3 | {{ range $i, $e := until 20 }} 4 | router{{ $e }}: 5 | service: application-1 6 | {{ end }} 7 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/ping_custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "services": { 4 | "noop": {}, 5 | "ping": {} 6 | } 7 | }, 8 | "tcp": {}, 9 | "tls": {} 10 | } -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/rest_secure.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "services": { 4 | "noop": {}, 5 | "rest": {} 6 | } 7 | }, 8 | "tcp": {}, 9 | "tls": {} 10 | } -------------------------------------------------------------------------------- /webui/src/store/http/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | allRouters: {}, 3 | routerByName: {}, 4 | allServices: {}, 5 | serviceByName: {}, 6 | allMiddlewares: {}, 7 | middlewareByName: {} 8 | } 9 | -------------------------------------------------------------------------------- /webui/src/store/tcp/state.js: -------------------------------------------------------------------------------- 1 | export default { 2 | allRouters: {}, 3 | routerByName: {}, 4 | allServices: {}, 5 | serviceByName: {}, 6 | allMiddlewares: {}, 7 | middlewareByName: {} 8 | } 9 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/dir01_file01.toml: -------------------------------------------------------------------------------- 1 | [http.routers] 2 | 3 | [http.routers."router1"] 4 | service = "application-1" 5 | 6 | [http.routers."router2"] 7 | service = "application-2" 8 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/traefik/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | // +k8s:deepcopy-gen=package 2 | 3 | // Package v1alpha1 is the v1alpha1 version of the API. 4 | // +groupName=traefik.containo.us 5 | package v1alpha1 6 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/prometheus_custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "services": { 4 | "noop": {}, 5 | "prometheus": {} 6 | } 7 | }, 8 | "tcp": {}, 9 | "tls": {} 10 | } -------------------------------------------------------------------------------- /integration/resources/compose/redis.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | redis: 4 | image: redis:5.0 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/api_secure_without_dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "services": { 4 | "api": {}, 5 | "noop": {} 6 | } 7 | }, 8 | "tcp": {}, 9 | "tls": {} 10 | } -------------------------------------------------------------------------------- /webui/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /integration/resources/compose/consul.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | consul: 4 | image: consul:1.6 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /integration/resources/compose/rest.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /integration/resources/compose/retry.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami: 4 | image: traefik/whoami 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /integration/resources/compose/ratelimit.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /integration/resources/compose/reqacceptgrace.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami: 4 | image: traefik/whoami 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /integration/resources/compose/zookeeper.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | zookeeper: 4 | image: zookeeper:3.5 5 | 6 | networks: 7 | default: 8 | name: traefik-test-network 9 | external: true 10 | -------------------------------------------------------------------------------- /webui/src-pwa/custom-service-worker.js: -------------------------------------------------------------------------------- 1 | /* 2 | * This file (which will be your service worker) 3 | * is picked up by the build system ONLY if 4 | * quasar.conf > pwa > workboxPluginMode is set to "InjectManifest" 5 | */ 6 | -------------------------------------------------------------------------------- /webui/embed.go: -------------------------------------------------------------------------------- 1 | package webui 2 | 3 | import ( 4 | "embed" 5 | "io/fs" 6 | ) 7 | 8 | //go:embed static 9 | var assets embed.FS 10 | 11 | // FS contains the web UI assets. 12 | var FS, _ = fs.Sub(assets, "static") 13 | -------------------------------------------------------------------------------- /integration/fixtures/headers/basic.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/api_secure_with_dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "services": { 4 | "api": {}, 5 | "dashboard": {}, 6 | "noop": {} 7 | } 8 | }, 9 | "tcp": {}, 10 | "tls": {} 11 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingressclass.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1beta1 2 | kind: IngressClass 3 | metadata: 4 | name: traefik-lb 5 | spec: 6 | controller: traefik.io/ingress-controller 7 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingressclass.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1beta1 2 | kind: IngressClass 3 | metadata: 4 | name: traefik-lb 5 | spec: 6 | controller: traefik.io/ingress-controller 7 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingressclass.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: IngressClass 3 | metadata: 4 | name: traefik-lb-v1 5 | spec: 6 | controller: traefik.io/ingress-controller 7 | -------------------------------------------------------------------------------- /webui/.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | plugins: [ 5 | // to edit target browsers: use "browserslist" field in package.json 6 | require('autoprefixer') 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/template_in_directory_file02.yml: -------------------------------------------------------------------------------- 1 | http: 2 | services: 3 | {{ range $i, $e := until 20 }} 4 | application-{{ $e }}: 5 | loadBalancer: 6 | servers: 7 | - url: 'http://127.0.0.1' 8 | {{ end }} 9 | -------------------------------------------------------------------------------- /pkg/server/server_signals_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package server 5 | 6 | import "context" 7 | 8 | func (s *Server) configureSignals() {} 9 | 10 | func (s *Server) listenSignals(ctx context.Context) {} 11 | -------------------------------------------------------------------------------- /pkg/api/testdata/udprouter-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "web" 4 | ], 5 | "name": "bar@myprovider", 6 | "provider": "myprovider", 7 | "service": "foo-service@myprovider", 8 | "status": "enabled", 9 | "using": [ 10 | "web" 11 | ] 12 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/types/route_appender.go: -------------------------------------------------------------------------------- 1 | package types 2 | 3 | import ( 4 | "github.com/gorilla/mux" 5 | ) 6 | 7 | // RouteAppender appends routes on a router (/api, /ping ...). 8 | type RouteAppender interface { 9 | Append(systemRouter *mux.Router) 10 | } 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-host-only_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: testing.example.com 10 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: service1 6 | namespace: testing 7 | 8 | spec: 9 | ports: 10 | - port: 80 11 | clusterIP: 10.0.0.1 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /integration/fixtures/simple_web.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | -------------------------------------------------------------------------------- /integration/resources/compose/stats.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | 6 | whoami2: 7 | image: traefik/whoami 8 | 9 | networks: 10 | default: 11 | name: traefik-test-network 12 | external: true 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoint_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: service1 6 | namespace: testing 7 | 8 | spec: 9 | ports: 10 | - port: 80 11 | clusterIP: 10.0.0.1 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /webui/src/components/_commons/PageDefault.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/03-tlsstore.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: TLSStore 3 | metadata: 4 | name: mytlsstore 5 | namespace: default 6 | labels: 7 | app: traefik 8 | 9 | spec: 10 | defaultCertificate: 11 | secretName: tls-cert 12 | -------------------------------------------------------------------------------- /integration/resources/tls/consul_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ports": { 3 | "https": 8585 4 | }, 5 | "ca_file": "/configs/ca.cert", 6 | "cert_file": "/configs/consul.cert", 7 | "key_file": "/configs/consul.key", 8 | "verify_outgoing": true 9 | } 10 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /webui/src/_directives/resize.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import iFrameResize from 'iframe-resizer/js/iframeResizer' 3 | 4 | Vue.directive('resize', { 5 | bind: function (el, { value = {} }) { 6 | el.addEventListener('load', () => iFrameResize(value, el)) 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /integration/resources/compose/error_pages.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | nginx1: 4 | image: nginx:1.13.8-alpine 5 | 6 | nginx2: 7 | image: nginx:1.13.8-alpine 8 | 9 | networks: 10 | default: 11 | name: traefik-test-network 12 | external: true 13 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/template_in_directory_file02.toml: -------------------------------------------------------------------------------- 1 | [http.services] 2 | {{ range $i, $e := until 20 }} 3 | [http.services.application-{{ $e }}.loadBalancer] 4 | [[http.services.application-{{ $e }}.loadBalancer.servers]] 5 | url = "http://127.0.0.1" 6 | {{ end }} -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/TLS-support_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: example-com 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.11.0.1 10 | ports: 11 | - name: http 12 | port: 80 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/api/testdata/udprouters-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "baz@myprovider", 7 | "provider": "myprovider", 8 | "service": "foo-service@myprovider", 9 | "status": "enabled", 10 | "using": [ 11 | "web" 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: foobar 10 | port: 4711 11 | clusterIP: 10.0.0.1 12 | 13 | -------------------------------------------------------------------------------- /webui/src/boot/_globals.js: -------------------------------------------------------------------------------- 1 | import { APP } from '../_helpers/APP' 2 | import Boot from '../_middleware/Boot' 3 | 4 | export default async ({ app, router, store, Vue }) => { 5 | Vue.use(Boot) 6 | 7 | APP.root = app 8 | APP.router = router 9 | APP.store = store 10 | } 11 | -------------------------------------------------------------------------------- /integration/resources/compose/timeout.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | timeoutEndpoint: 4 | image: yaman/timeout 5 | environment: 6 | PROTO: http 7 | PORT: 9000 8 | 9 | networks: 10 | default: 11 | name: traefik-test-network 12 | external: true 13 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcprouter-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "web" 4 | ], 5 | "name": "bar@myprovider", 6 | "provider": "myprovider", 7 | "rule": "Host(`foo.bar`)", 8 | "service": "foo-service@myprovider", 9 | "status": "enabled", 10 | "using": [ 11 | "web" 12 | ] 13 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/api/testdata/udprouters-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "bar@myprovider", 7 | "provider": "myprovider", 8 | "service": "foo-service@myprovider", 9 | "status": "warning", 10 | "using": [ 11 | "web" 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /pkg/api/testdata/udprouters-filtered-status.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "test@myprovider", 7 | "provider": "myprovider", 8 | "service": "foo-service@myprovider", 9 | "status": "enabled", 10 | "using": [ 11 | "web" 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /webui/src/_services/utils.js: -------------------------------------------------------------------------------- 1 | export const getTotal = (headers, params) => { 2 | const nextPage = parseInt(headers['x-next-page'], 10) || 1 3 | const hasNextPage = nextPage > 1 4 | 5 | return hasNextPage 6 | ? (params.page + 1) * params.limit 7 | : params.page * params.limit 8 | } 9 | -------------------------------------------------------------------------------- /pkg/api/testdata/middlewares-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "addPrefix": { 4 | "prefix": "/titi" 5 | }, 6 | "name": "addPrefixTest@myprovider", 7 | "provider": "myprovider", 8 | "status": "enabled", 9 | "type": "addprefix", 10 | "usedBy": [ 11 | "test@myprovider" 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | backend: 9 | serviceName: service1 10 | servicePort: 80 11 | -------------------------------------------------------------------------------- /integration/fixtures/file/56-simple-panic.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [providers.file] 13 | filename = "{{ .SelfFilename }}" 14 | -------------------------------------------------------------------------------- /integration/fixtures/simple_debug_log.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [api] 9 | insecure = true 10 | 11 | [providers.docker] 12 | 13 | [entryPoints] 14 | [entryPoints.webHost] 15 | address = ":8000" 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: example-com 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.11.0.1 10 | ports: 11 | - name: http 12 | port: 80 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: example-com 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: http 10 | port: 80 11 | clusterIP: 10.0.0.1 12 | type: ClusterIP 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.11.0.1 10 | - ip: 10.11.0.2 11 | ports: 12 | - port: 8089 13 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/full_configuration_secure.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "services": { 4 | "api": {}, 5 | "dashboard": {}, 6 | "noop": {}, 7 | "ping": {}, 8 | "prometheus": {}, 9 | "rest": {} 10 | } 11 | }, 12 | "tcp": {}, 13 | "tls": {} 14 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.11.0.1 10 | - ip: 10.11.0.2 11 | ports: 12 | - port: 8089 13 | -------------------------------------------------------------------------------- /webui/src/store/core/index.js: -------------------------------------------------------------------------------- 1 | import state from './state' 2 | import * as getters from './getters' 3 | import * as mutations from './mutations' 4 | import * as actions from './actions' 5 | 6 | export default { 7 | namespaced: true, 8 | getters, 9 | mutations, 10 | actions, 11 | state 12 | } 13 | -------------------------------------------------------------------------------- /webui/src/store/http/index.js: -------------------------------------------------------------------------------- 1 | import state from './state' 2 | import * as getters from './getters' 3 | import * as mutations from './mutations' 4 | import * as actions from './actions' 5 | 6 | export default { 7 | namespaced: true, 8 | getters, 9 | mutations, 10 | actions, 11 | state 12 | } 13 | -------------------------------------------------------------------------------- /webui/src/store/tcp/index.js: -------------------------------------------------------------------------------- 1 | import state from './state' 2 | import * as getters from './getters' 3 | import * as mutations from './mutations' 4 | import * as actions from './actions' 5 | 6 | export default { 7 | namespaced: true, 8 | getters, 9 | mutations, 10 | actions, 11 | state 12 | } 13 | -------------------------------------------------------------------------------- /webui/src/store/udp/index.js: -------------------------------------------------------------------------------- 1 | import state from './state' 2 | import * as getters from './getters' 3 | import * as mutations from './mutations' 4 | import * as actions from './actions' 5 | 6 | export default { 7 | namespaced: true, 8 | getters, 9 | mutations, 10 | actions, 11 | state 12 | } 13 | -------------------------------------------------------------------------------- /pkg/api/testdata/middleware-auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "basicAuth": { 3 | "users": [ 4 | "admin:admin" 5 | ] 6 | }, 7 | "name": "auth@myprovider", 8 | "provider": "myprovider", 9 | "status": "enabled", 10 | "type": "basicauth", 11 | "usedBy": [ 12 | "bar@myprovider", 13 | "test@myprovider" 14 | ] 15 | } -------------------------------------------------------------------------------- /pkg/api/testdata/routers-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "baz@myprovider", 7 | "provider": "myprovider", 8 | "rule": "Host(`toto.bar`)", 9 | "service": "foo-service@myprovider", 10 | "status": "enabled", 11 | "using": [ 12 | "web" 13 | ] 14 | } 15 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 443 10 | targetPort: 8443 11 | clusterIP: 10.0.0.1 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - name: foobar 12 | port: 4711 13 | -------------------------------------------------------------------------------- /webui/src/store/entrypoints/index.js: -------------------------------------------------------------------------------- 1 | import state from './state' 2 | import * as getters from './getters' 3 | import * as mutations from './mutations' 4 | import * as actions from './actions' 5 | 6 | export default { 7 | namespaced: true, 8 | getters, 9 | mutations, 10 | actions, 11 | state 12 | } 13 | -------------------------------------------------------------------------------- /integration/fixtures/file/dir/simple1.toml: -------------------------------------------------------------------------------- 1 | [http.routers] 2 | [http.routers.router1] 3 | rule = "Path(`/test1`)" 4 | service = "service1" 5 | 6 | [http.services] 7 | [http.services.service1.loadBalancer] 8 | [[http.services.service1.loadBalancer.servers]] 9 | url = "http://172.17.0.2:80" 10 | -------------------------------------------------------------------------------- /integration/fixtures/file/dir/simple2.toml: -------------------------------------------------------------------------------- 1 | [http.routers] 2 | [http.routers.router2] 3 | rule = "Path(`/test2`)" 4 | service = "service2" 5 | 6 | [http.services] 7 | [http.services.service2.loadBalancer] 8 | [[http.services.service2.loadBalancer.servers]] 9 | url = "http://127.0.0.1:80" 10 | -------------------------------------------------------------------------------- /integration/fixtures/file/directory.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [providers] 13 | [providers.file] 14 | directory = "fixtures/file/dir/" 15 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcprouters-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "baz@myprovider", 7 | "provider": "myprovider", 8 | "rule": "Host(`toto.bar`)", 9 | "service": "foo-service@myprovider", 10 | "status": "enabled", 11 | "using": [ 12 | "web" 13 | ] 14 | } 15 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | -------------------------------------------------------------------------------- /docs/.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "no-hard-tabs": false, 3 | "MD007": { "indent": 4 }, 4 | "MD009": false, 5 | "MD013": false, 6 | "MD024": false, 7 | "MD025": false, 8 | "MD026": false, 9 | "MD033": false, 10 | "MD034": false, 11 | "MD036": false, 12 | "MD046": false 13 | } 14 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcpmiddleware-ipwhitelist.json: -------------------------------------------------------------------------------- 1 | { 2 | "ipWhiteList": { 3 | "sourceRange": ["127.0.0.1/32"] 4 | }, 5 | "name": "ipwhitelist@myprovider", 6 | "provider": "myprovider", 7 | "status": "enabled", 8 | "type": "ipwhitelist", 9 | "usedBy": [ 10 | "bar@myprovider", 11 | "test@myprovider" 12 | ] 13 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/simple.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: whoamiudp 14 | port: 8000 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_plugin_read_not_exist_secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: Middleware 3 | metadata: 4 | name: test-secret 5 | namespace: default 6 | 7 | spec: 8 | plugin: 9 | test-secret: 10 | user: admin 11 | secret: urn:k8s:secret:notfound:key 12 | -------------------------------------------------------------------------------- /webui/src/boot/_hacks.js: -------------------------------------------------------------------------------- 1 | import Bowser from 'bowser' 2 | import vhCheck from 'vh-check' 3 | 4 | const browser = Bowser.getParser(window.navigator.userAgent) 5 | 6 | // In Mobile 7 | if (browser.getPlatform().type === 'mobile') { 8 | vhCheck() 9 | } 10 | 11 | export default async ({ app, Vue }) => { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /integration/resources/compose/etcd.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | etcd: 4 | image: quay.io/coreos/etcd:v3.3.18 5 | command: etcd --listen-client-urls http://0.0.0.0:2379 --advertise-client-urls http://0.0.0.0:2380 6 | 7 | networks: 8 | default: 9 | name: traefik-test-network 10 | external: true 11 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcpmiddlewares-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "ipWhiteList": { 4 | "sourceRange": ["127.0.0.1/32"] 5 | }, 6 | "name": "ipwhitelist@anotherprovider", 7 | "provider": "anotherprovider", 8 | "status": "enabled", 9 | "type": "ipwhitelist", 10 | "usedBy": [ 11 | "bar@myprovider" 12 | ] 13 | } 14 | ] -------------------------------------------------------------------------------- /pkg/api/testdata/tcprouters-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "bar@myprovider", 7 | "provider": "myprovider", 8 | "rule": "Host(`foo.bar`)", 9 | "service": "foo-service@myprovider", 10 | "status": "warning", 11 | "using": [ 12 | "web" 13 | ] 14 | } 15 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_without_ports.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: external-svc 14 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service-bar 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: "2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b" 10 | ports: 11 | - name: http 12 | port: 8080 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 8080 10 | clusterIP: 10.0.0.1 11 | type: ExternalName 12 | externalName: traefik.wtf 13 | 14 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_ipv6.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: whoamiudp-ipv6 14 | port: 8080 15 | -------------------------------------------------------------------------------- /integration/fixtures/etcd/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints.web] 9 | address = ":8000" 10 | 11 | [api] 12 | insecure = true 13 | 14 | [providers.etcd] 15 | rootKey = "traefik" 16 | endpoints = ["{{ .EtcdAddress }}"] 17 | -------------------------------------------------------------------------------- /integration/fixtures/k8s_default.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [api] 9 | insecure = true 10 | 11 | [entryPoints] 12 | [entryPoints.web] 13 | address = ":8000" 14 | 15 | [providers.kubernetesIngress] 16 | allowEmptyServices = true 17 | -------------------------------------------------------------------------------- /integration/fixtures/rest/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.rest] 17 | insecure = true 18 | -------------------------------------------------------------------------------- /pkg/middlewares/stateful.go: -------------------------------------------------------------------------------- 1 | package middlewares 2 | 3 | import "net/http" 4 | 5 | // Stateful interface groups all http interfaces that must be 6 | // implemented by a stateful middleware (ie: recorders). 7 | type Stateful interface { 8 | http.ResponseWriter 9 | http.Hijacker 10 | http.Flusher 11 | http.CloseNotifier 12 | } 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_externalname.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: external-svc 14 | port: 8000 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: https 10 | protocol: "" 11 | port: 8443 12 | clusterIP: 10.0.0.1 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 8080 10 | clusterIP: 10.0.0.1 11 | type: ExternalName 12 | externalName: traefik.wtf 13 | 14 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: defaultbackend 5 | namespace: testing 6 | 7 | spec: 8 | defaultBackend: 9 | service: 10 | name: defaultservice 11 | port: 12 | number: 8080 13 | -------------------------------------------------------------------------------- /webui/src/boot/api.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | 3 | import { APP } from '../_helpers/APP' 4 | 5 | // Set config defaults when creating the instance 6 | const API = axios.create({ 7 | baseURL: APP.config.apiUrl 8 | }) 9 | 10 | export default async ({ app, Vue }) => { 11 | Vue.prototype.$api = app.api = APP.api = API 12 | } 13 | -------------------------------------------------------------------------------- /docs/content/reference/static-configuration/cli.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Traefik CLI Flags Documentation" 3 | description: "Reference the CLI flags for static configuration in Traefik Proxy. Read the technical documentation." 4 | --- 5 | 6 | # Static Configuration: CLI 7 | 8 | --8<-- "content/reference/static-configuration/cli-ref.md" 9 | 10 | -------------------------------------------------------------------------------- /integration/fixtures/redis/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints.web] 9 | address = ":8000" 10 | 11 | [api] 12 | insecure = true 13 | 14 | [providers.redis] 15 | rootKey = "traefik" 16 | endpoints = ["{{ .RedisAddress }}"] 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-annotations_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /docs/docs.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.14 2 | 3 | ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin 4 | 5 | COPY requirements.txt /mkdocs/ 6 | WORKDIR /mkdocs 7 | VOLUME /mkdocs 8 | 9 | RUN apk --no-cache --no-progress add py3-pip gcc musl-dev python3-dev \ 10 | && pip3 install --user -r requirements.txt 11 | -------------------------------------------------------------------------------- /integration/fixtures/consul/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints.web] 9 | address = ":8000" 10 | 11 | [api] 12 | insecure = true 13 | 14 | [providers.consul] 15 | rootKey = "traefik" 16 | endpoints = ["{{ .ConsulAddress }}"] 17 | -------------------------------------------------------------------------------- /integration/fixtures/k8s_ingressclass.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [api] 9 | insecure = true 10 | 11 | [entryPoints] 12 | [entryPoints.web] 13 | address = ":8000" 14 | 15 | [providers.kubernetesIngress] 16 | ingressClass = "traefik-keep" 17 | -------------------------------------------------------------------------------- /integration/fixtures/zookeeper/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints.web] 9 | address = ":8000" 10 | 11 | [api] 12 | insecure = true 13 | 14 | [providers.zookeeper] 15 | rootKey = "traefik" 16 | endpoints = ["{{ .ZkAddress }}"] 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_error_page.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: Middleware 3 | metadata: 4 | name: errorpage 5 | namespace: default 6 | 7 | spec: 8 | errors: 9 | status: 10 | - "404" 11 | - "500" 12 | query: query 13 | service: 14 | name: whoami 15 | port: 80 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: https-foo 10 | protocol: "" 11 | port: 8443 12 | clusterIP: 10.0.0.1 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: carotte 10 | port: 8082 11 | - name: tchouk 12 | port: 80 13 | clusterIP: 10.0.0.1 14 | 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: carotte 10 | port: 8082 11 | - name: tchouk 12 | port: 80 13 | clusterIP: 10.0.0.1 14 | 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: carotte 10 | port: 8082 11 | - name: tchouk 12 | port: 80 13 | clusterIP: 10.0.0.1 14 | 15 | -------------------------------------------------------------------------------- /webui/src/store/entrypoints/getters.js: -------------------------------------------------------------------------------- 1 | // ---------------------------- 2 | // all 3 | // ---------------------------- 4 | export function all (state) { 5 | return state.all 6 | } 7 | 8 | // ---------------------------- 9 | // byName 10 | // ---------------------------- 11 | export function byName (state) { 12 | return state.byName 13 | } 14 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcpservice-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "loadBalancer": { 3 | "servers": [ 4 | { 5 | "address": "127.0.0.1:2345" 6 | } 7 | ] 8 | }, 9 | "name": "bar@myprovider", 10 | "provider": "myprovider", 11 | "status": "enabled", 12 | "type": "loadbalancer", 13 | "usedBy": [ 14 | "foo@myprovider", 15 | "test@myprovider" 16 | ] 17 | } -------------------------------------------------------------------------------- /pkg/api/testdata/udpservice-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "loadBalancer": { 3 | "servers": [ 4 | { 5 | "address": "127.0.0.1:2345" 6 | } 7 | ] 8 | }, 9 | "name": "bar@myprovider", 10 | "provider": "myprovider", 11 | "status": "enabled", 12 | "type": "loadbalancer", 13 | "usedBy": [ 14 | "foo@myprovider", 15 | "test@myprovider" 16 | ] 17 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_no_rule_value.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: "" 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-host-syntax_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-bad-path-syntax_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .intellij/ 3 | *.iml 4 | .vscode/ 5 | .DS_Store 6 | /dist 7 | /webui/.tmp/ 8 | /site/ 9 | /docs/site/ 10 | /autogen/ 11 | /traefik 12 | /traefik.toml 13 | /traefik.yml 14 | *.log 15 | *.exe 16 | cover.out 17 | vendor/ 18 | plugins-storage/ 19 | plugins-local/ 20 | traefik_changelog.md 21 | integration/tailscale.secret 22 | debug/ 23 | -------------------------------------------------------------------------------- /integration/fixtures/k8s_ingress_label_selector.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [api] 9 | insecure = true 10 | 11 | [entryPoints] 12 | [entryPoints.web] 13 | address = ":8000" 14 | 15 | [providers.kubernetesIngress] 16 | labelSelector = "app=traefik" 17 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcpservices-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "servers": [ 5 | { 6 | "address": "127.0.0.2:2345" 7 | } 8 | ] 9 | }, 10 | "name": "baz@myprovider", 11 | "provider": "myprovider", 12 | "status": "enabled", 13 | "type": "loadbalancer", 14 | "usedBy": [ 15 | "foo@myprovider" 16 | ] 17 | } 18 | ] -------------------------------------------------------------------------------- /pkg/api/testdata/udpservices-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "servers": [ 5 | { 6 | "address": "127.0.0.2:2345" 7 | } 8 | ] 9 | }, 10 | "name": "baz@myprovider", 11 | "provider": "myprovider", 12 | "status": "enabled", 13 | "type": "loadbalancer", 14 | "usedBy": [ 15 | "foo@myprovider" 16 | ] 17 | } 18 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/simple.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: external.service.with.port 14 | port: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_externalname_with_port.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: external.service.with.port 14 | port: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: carotte 10 | port: 8082 11 | - name: tchouk 12 | port: 80 13 | clusterIP: 10.0.0.1 14 | 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-host-syntax_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: carotte 10 | port: 8082 11 | - name: tchouk 12 | port: 80 13 | clusterIP: 10.0.0.1 14 | 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/TLS-support_secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: my-tls-secret 5 | namespace: testing 6 | 7 | data: 8 | tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0= 9 | tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0= 10 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_without_ports.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: external-svc 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-Two-rules-with-one-host-and-one-path_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Single-Service-Ingress-(without-any-rules)_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /docs/content/reference/static-configuration/env.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Traefik Environment Variables Documentation" 3 | description: "Reference the environment variables for static configuration in Traefik Proxy. Read the technical documentation." 4 | --- 5 | 6 | # Static Configuration: Environment variables 7 | 8 | --8<-- "content/reference/static-configuration/env-ref.md" 9 | -------------------------------------------------------------------------------- /docs/content/reference/static-configuration/overview.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Traefik Static Configuration Overview" 3 | description: "Read the official Traefik documentation to get started with static configuration in Traefik Proxy." 4 | --- 5 | 6 | # Static Configuration 7 | 8 | - [File](./file.md) 9 | - [CLI](./cli.md) 10 | - [Environment Variables](./env.md) 11 | -------------------------------------------------------------------------------- /integration/resources/compose/proxy-protocol.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | haproxy: 4 | image: haproxy:2.2 5 | volumes: 6 | - ./resources/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg 7 | 8 | whoami: 9 | image: traefik/whoami 10 | 11 | networks: 12 | default: 13 | name: traefik-test-network 14 | external: true 15 | -------------------------------------------------------------------------------- /integration/resources/tls/README.md: -------------------------------------------------------------------------------- 1 | # TLS certificate description 2 | 3 | ## local.crt / local.key 4 | 5 | Generate with 6 | 7 | ```bash 8 | go run $GOROOT/src/crypto/tls/generate_cert.go --rsa-bits 1024 --host 127.0.0.1,::1,localhost --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h 9 | mv cert.pem local.cert 10 | mv key.pem local.key 11 | ``` 12 | -------------------------------------------------------------------------------- /pkg/api/testdata/router-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "web" 4 | ], 5 | "middlewares": [ 6 | "auth", 7 | "addPrefixTest@anotherprovider" 8 | ], 9 | "name": "bar@myprovider", 10 | "provider": "myprovider", 11 | "rule": "Host(`foo.bar`)", 12 | "service": "foo-service@myprovider", 13 | "status": "enabled", 14 | "using": [ 15 | "web" 16 | ] 17 | } -------------------------------------------------------------------------------- /pkg/api/testdata/tcpservices-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "servers": [ 5 | { 6 | "address": "127.0.0.2:2345" 7 | } 8 | ] 9 | }, 10 | "name": "baz@myprovider", 11 | "provider": "myprovider", 12 | "status": "warning", 13 | "type": "loadbalancer", 14 | "usedBy": [ 15 | "foo@myprovider" 16 | ] 17 | } 18 | ] -------------------------------------------------------------------------------- /pkg/api/testdata/udpservices-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "servers": [ 5 | { 6 | "address": "127.0.0.2:2345" 7 | } 8 | ] 9 | }, 10 | "name": "baz@myprovider", 11 | "provider": "myprovider", 12 | "status": "warning", 13 | "type": "loadbalancer", 14 | "usedBy": [ 15 | "foo@myprovider" 16 | ] 17 | } 18 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_externalname_without_ports.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) 13 | kind: Rule 14 | services: 15 | - name: external-svc -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_service.yml: -------------------------------------------------------------------------------- 1 | --- 2 | kind: Service 3 | apiVersion: v1 4 | metadata: 5 | name: service-foo 6 | namespace: testing 7 | 8 | spec: 9 | ports: 10 | - name: http 11 | port: 8080 12 | type: ExternalName 13 | externalName: "2001:0db8:3c4d:0015:0000:0000:1a2f:2a3b" 14 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/tcp/tls.go: -------------------------------------------------------------------------------- 1 | package tcp 2 | 3 | import ( 4 | "crypto/tls" 5 | ) 6 | 7 | // TLSHandler handles TLS connections. 8 | type TLSHandler struct { 9 | Next Handler 10 | Config *tls.Config 11 | } 12 | 13 | // ServeTCP terminates the TLS connection. 14 | func (t *TLSHandler) ServeTCP(conn WriteCloser) { 15 | t.Next.ServeTCP(tls.Server(conn, t.Config)) 16 | } 17 | -------------------------------------------------------------------------------- /integration/resources/compose/minimal.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | labels: 6 | traefik.http.Routers.RouterMini.Rule: PathPrefix(`/whoami`) 7 | traefik.enable: true 8 | deploy: 9 | replicas: 2 10 | 11 | networks: 12 | default: 13 | name: traefik-test-network 14 | external: true 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: external-svc 15 | port: 8000 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_empty_services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: whoamiudp-without-endpoints-subsets 14 | port: 8000 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_wrong_rule_kind.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - web 10 | 11 | routes: 12 | - match: /prefix 13 | priority: 12 14 | services: 15 | - name: whoami 16 | port: 80 17 | -------------------------------------------------------------------------------- /webui/src/store/core/getters.js: -------------------------------------------------------------------------------- 1 | // ---------------------------- 2 | // all Overview 3 | // ---------------------------- 4 | export function allOverview (state) { 5 | return state.allOverview 6 | } 7 | 8 | // ---------------------------- 9 | // Version 10 | // ---------------------------- 11 | export function version (state) { 12 | return state.version 13 | } 14 | -------------------------------------------------------------------------------- /debug.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine:3.14 2 | # Feel free to add below any helpful dependency for debugging. 3 | # iproute2 is for ss. 4 | RUN apk --no-cache --no-progress add bash curl ca-certificates tzdata lsof iproute2 \ 5 | && update-ca-certificates \ 6 | && rm -rf /var/cache/apk/* 7 | COPY dist/traefik / 8 | EXPOSE 80 9 | VOLUME ["/tmp"] 10 | ENTRYPOINT ["/traefik"] 11 | -------------------------------------------------------------------------------- /integration/fixtures/tlsclientheaders/readme.md: -------------------------------------------------------------------------------- 1 | ```bash 2 | openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -extensions v3_ca -keyout root.key -out root.pem 3 | openssl genrsa -out server.key 2048 4 | openssl req -nodes -key server.key -new -out server.csr 5 | openssl x509 -req -days 3650 -in server.csr -CA root.pem -CAkey root.key -CAcreateserial -out server.pem 6 | ``` 7 | -------------------------------------------------------------------------------- /integration/resources/compose/healthcheck.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | 6 | whoami2: 7 | image: traefik/whoami 8 | 9 | whoami3: 10 | image: traefik/whoami 11 | 12 | whoami4: 13 | image: traefik/whoami 14 | 15 | networks: 16 | default: 17 | name: traefik-test-network 18 | external: true 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_cross_namespace.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: whoamiudp-cross-ns 14 | namespace: cross-ns 15 | port: 8000 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_externalname.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) 13 | kind: Rule 14 | services: 15 | - name: external-svc 16 | port: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-only-a-bad-path-syntax_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8080 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_no_rule_value.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - web 10 | 11 | routes: 12 | - match: "" 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 8443 12 | - addresses: 13 | - ip: 10.21.0.1 14 | ports: 15 | - port: 8443 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-host-without-path_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: example.com 10 | http: 11 | paths: 12 | - backend: 13 | serviceName: example-com 14 | servicePort: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | - ip: 10.10.0.2 11 | ports: 12 | - name: carotte 13 | port: 8090 14 | - name: tchouk 15 | port: 8089 16 | -------------------------------------------------------------------------------- /webui/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:14.16 2 | # Current Active LTS release according to (https://nodejs.org/en/about/releases/) 3 | 4 | ENV WEBUI_DIR /src/webui 5 | RUN mkdir -p $WEBUI_DIR 6 | 7 | COPY package.json $WEBUI_DIR/ 8 | COPY yarn.lock $WEBUI_DIR/ 9 | 10 | WORKDIR $WEBUI_DIR 11 | RUN yarn install 12 | 13 | COPY . $WEBUI_DIR/ 14 | 15 | EXPOSE 8080 16 | 17 | RUN yarn lint 18 | -------------------------------------------------------------------------------- /webui/src/components/_commons/Chips.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/03-tlsoption.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: TLSOption 3 | metadata: 4 | name: mytlsoption 5 | namespace: default 6 | labels: 7 | app: traefik 8 | 9 | spec: 10 | minVersion: VersionTLS12 11 | sniStrict: true 12 | cipherSuites: 13 | - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 14 | - TLS_RSA_WITH_AES_256_GCM_SHA384 15 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcprouters-filtered-status.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "name": "test@myprovider", 7 | "provider": "myprovider", 8 | "rule": "Host(`foo.bar.other`)", 9 | "service": "foo-service@myprovider", 10 | "status": "enabled", 11 | "tls": { 12 | "passthrough": false 13 | }, 14 | "using": [ 15 | "web" 16 | ] 17 | } 18 | ] -------------------------------------------------------------------------------- /integration/fixtures/simple_whitelist.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | [entryPoints.web.ForwardedHeaders] 12 | insecure = true 13 | 14 | [api] 15 | insecure = true 16 | 17 | [providers] 18 | [providers.docker] 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_externalname_with_port.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: external.service.with.port 15 | port: 80 16 | -------------------------------------------------------------------------------- /webui/src/statics/providers/nomad.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /pkg/api/testdata/tcpservices-filtered-status.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "servers": [ 5 | { 6 | "address": "127.0.0.1:2345" 7 | } 8 | ] 9 | }, 10 | "name": "bar@myprovider", 11 | "provider": "myprovider", 12 | "status": "enabled", 13 | "type": "loadbalancer", 14 | "usedBy": [ 15 | "foo@myprovider", 16 | "test@myprovider" 17 | ] 18 | } 19 | ] -------------------------------------------------------------------------------- /pkg/api/testdata/udpservices-filtered-status.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "servers": [ 5 | { 6 | "address": "127.0.0.1:2345" 7 | } 8 | ] 9 | }, 10 | "name": "bar@myprovider", 11 | "provider": "myprovider", 12 | "status": "enabled", 13 | "type": "loadbalancer", 14 | "usedBy": [ 15 | "foo@myprovider", 16 | "test@myprovider" 17 | ] 18 | } 19 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_externalname_with_http.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) 13 | kind: Rule 14 | services: 15 | - name: external-svc-with-http 16 | port: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | - ip: 10.10.0.2 11 | ports: 12 | - name: carotte 13 | port: 8090 14 | - name: tchouk 15 | port: 8089 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-wildcard-host_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: "*.foobar.com" 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-exact-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | rules: 8 | - http: 9 | paths: 10 | - path: /bar 11 | pathType: Exact 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-prefix-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | rules: 8 | - http: 9 | paths: 10 | - path: /bar 11 | pathType: Prefix 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | -------------------------------------------------------------------------------- /integration/fixtures/custom_ping_termination_status_code.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | 10 | [entryPoints.traefik] 11 | address = ":8001" 12 | [entryPoints.traefik.transport.lifeCycle] 13 | requestAcceptGraceTimeout = "10s" 14 | 15 | [ping] 16 | terminatingStatusCode = 204 -------------------------------------------------------------------------------- /integration/fixtures/k8s/05-ingressrouteudp.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test3.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - fooudp 10 | routes: 11 | - services: 12 | - name: whoamiudp 13 | namespace: default 14 | port: 8090 15 | - name: externalname-svc 16 | port: 9090 17 | -------------------------------------------------------------------------------- /integration/resources/compose/hostresolver.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | server1: 4 | image: traefik/whoami 5 | labels: 6 | traefik.enable: true 7 | traefik.http.services.service1.loadbalancer.server.port: 80 8 | traefik.http.routers.router1.rule: Host(`github.com`) 9 | 10 | networks: 11 | default: 12 | name: traefik-test-network 13 | external: true 14 | -------------------------------------------------------------------------------- /pkg/api/testdata/routers-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "middlewares": [ 7 | "addPrefixTest", 8 | "auth" 9 | ], 10 | "name": "test@myprovider", 11 | "provider": "myprovider", 12 | "rule": "Host(`fii.bar.other`)", 13 | "service": "fii-service@myprovider", 14 | "status": "enabled", 15 | "using": [ 16 | "web" 17 | ] 18 | } 19 | ] -------------------------------------------------------------------------------- /pkg/api/testdata/routers-filtered-status.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "entryPoints": [ 4 | "web" 5 | ], 6 | "middlewares": [ 7 | "addPrefixTest", 8 | "auth" 9 | ], 10 | "name": "test@myprovider", 11 | "provider": "myprovider", 12 | "rule": "Host(`foo.bar.other`)", 13 | "service": "foo-service@myprovider", 14 | "status": "enabled", 15 | "using": [ 16 | "web" 17 | ] 18 | } 19 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_tls_acme.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | 17 | tls: 18 | secretName: 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_two_routes.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: whoamiudp 14 | port: 8000 15 | - services: 16 | - name: whoamiudp2 17 | port: 8080 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_externalname_with_https.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) 13 | kind: Rule 14 | services: 15 | - name: external-svc-with-https 16 | port: 443 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClass_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | ingressClassName: traefik-lb 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/simple.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_empty_services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp-without-endpoints-subsets 15 | port: 8000 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_termination_delay.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | terminationDelay: 500 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(port-==-443)_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 443 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 21 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-missing-ingressClass_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | ingressClassName: traefik-lb 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_cross_namespace.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp-cross-ns 15 | namespace: cross-ns 16 | port: 8000 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 8443 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-unknown-service-port-name_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: toto 16 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/yaml/dir01_file02.yml: -------------------------------------------------------------------------------- 1 | http: 2 | services: 3 | application-1: 4 | loadBalancer: 5 | servers: 6 | - url: 'http://172.17.0.1:80' 7 | application-2: 8 | loadBalancer: 9 | servers: 10 | - url: 'http://172.17.0.2:80' 11 | application-3: 12 | loadBalancer: 13 | servers: 14 | - url: 'http://172.17.0.3:80' 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_proxyprotocol.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | proxyProtocol: 17 | version: 2 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-path-and-one-host_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | -------------------------------------------------------------------------------- /integration/resources/compose/file.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | 6 | whoami2: 7 | image: traefik/whoami 8 | 9 | whoami3: 10 | image: traefik/whoami 11 | 12 | whoami4: 13 | image: traefik/whoami 14 | 15 | whoami5: 16 | image: traefik/whoami 17 | 18 | networks: 19 | default: 20 | name: traefik-test-network 21 | external: true 22 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_https_default.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoamitls 17 | port: 443 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/traefik/v1alpha1/objectreference.go: -------------------------------------------------------------------------------- 1 | package v1alpha1 2 | 3 | // ObjectReference is a generic reference to a Traefik resource. 4 | type ObjectReference struct { 5 | // Name defines the name of the referenced Traefik resource. 6 | Name string `json:"name"` 7 | // Namespace defines the namespace of the referenced Traefik resource. 8 | Namespace string `json:"namespace,omitempty"` 9 | } 10 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints-externalname-enabled_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: example.com 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /foo 12 | backend: 13 | serviceName: service-foo 14 | servicePort: 8080 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 8443 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-one-service-without-endpoints-subset_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-service-with-externalName-enabled_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 8080 16 | -------------------------------------------------------------------------------- /script/validate-vendor: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -o errexit 3 | set -o pipefail 4 | set -o nounset 5 | 6 | SCRIPT_DIR="$( cd "$( dirname "${0}" )" && pwd -P)"; export SCRIPT_DIR 7 | 8 | echo "checking go modules for unintentional changes..." 9 | 10 | go mod tidy 11 | git diff --exit-code go.mod 12 | git diff --exit-code go.sum 13 | 14 | echo 'Congratulations! All go modules changes are done the right way.' 15 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/03-ingress.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: test.ingress 5 | namespace: default 6 | labels: 7 | app: traefik 8 | 9 | spec: 10 | rules: 11 | - host: whoami.test 12 | http: 13 | paths: 14 | - path: /whoami 15 | backend: 16 | serviceName: whoami 17 | servicePort: http 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_ipv6.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`*`) 13 | services: 14 | - name: whoamitcp-ipv6 15 | port: 8080 16 | - name: external.service.with.ipv6 17 | port: 8080 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/udp/with_two_services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteUDP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - services: 13 | - name: whoamiudp 14 | port: 8000 15 | weight: 2 16 | - name: whoamiudp2 17 | port: 8080 18 | weight: 3 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-2-pod-replica_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: tchouk 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: tchouk 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-exact-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | rules: 8 | - http: 9 | paths: 10 | - path: /bar 11 | pathType: Exact 12 | backend: 13 | service: 14 | name: service1 15 | port: 16 | number: 80 -------------------------------------------------------------------------------- /integration/fixtures/docker/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.docker] 17 | endpoint = "{{ .DockerHost }}" 18 | defaultRule = "{{ .DefaultRule }}" 19 | exposedByDefault = true 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_tls_acme.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - web 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | 19 | tls: {} 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-==-https)_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - name: https 12 | port: 8443 13 | - addresses: 14 | - ip: 10.21.0.1 15 | ports: 16 | - name: https 17 | port: 8443 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClass_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | ingressClassName: traefik-lb 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | service: 14 | name: service1 15 | port: 16 | number: 80 -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-named-port_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | rules: 8 | - http: 9 | paths: 10 | - path: /bar 11 | pathType: Prefix 12 | backend: 13 | service: 14 | name: service1 15 | port: 16 | name: foobar 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-prefix-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | rules: 8 | - http: 9 | paths: 10 | - path: /bar 11 | pathType: Prefix 12 | backend: 13 | service: 14 | name: service1 15 | port: 16 | number: 80 17 | -------------------------------------------------------------------------------- /integration/fixtures/docker/minimal.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.docker] 17 | endpoint = "{{ .DockerHost }}" 18 | defaultRule = "{{ .DefaultRule }}" 19 | exposedByDefault = false 20 | -------------------------------------------------------------------------------- /pkg/middlewares/middleware.go: -------------------------------------------------------------------------------- 1 | package middlewares 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/traefik/traefik/v2/pkg/log" 7 | ) 8 | 9 | // GetLoggerCtx creates a logger context with the middleware fields. 10 | func GetLoggerCtx(ctx context.Context, middleware, middlewareType string) context.Context { 11 | return log.With(ctx, log.Str(log.MiddlewareName, middleware), log.Str(log.MiddlewareType, middlewareType)) 12 | } 13 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.port 10 | http: 11 | paths: 12 | - path: /port 13 | backend: 14 | serviceName: service1 15 | servicePort: 8080 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingress-annotation_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | kubernetes.io/ingress.class: traefik 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-ingressClasses-filter_ingressclass.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1beta1 2 | kind: IngressClass 3 | metadata: 4 | name: traefik-lb2 5 | spec: 6 | controller: traefik.io/ingress-controller 7 | 8 | --- 9 | apiVersion: networking.k8s.io/v1beta1 10 | kind: IngressClass 11 | metadata: 12 | name: traefik-lb 13 | spec: 14 | controller: traefik.io/ingress-controller 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-multiple-ingressClasses_ingressclass.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1beta1 2 | kind: IngressClass 3 | metadata: 4 | name: traefik-lb2 5 | spec: 6 | controller: traefik.io/ingress-controller 7 | 8 | --- 9 | apiVersion: networking.k8s.io/v1beta1 10 | kind: IngressClass 11 | metadata: 12 | name: traefik-lb 13 | spec: 14 | controller: traefik.io/ingress-controller 15 | -------------------------------------------------------------------------------- /pkg/udp/handler.go: -------------------------------------------------------------------------------- 1 | package udp 2 | 3 | // Handler is the UDP counterpart of the usual HTTP handler. 4 | type Handler interface { 5 | ServeUDP(conn *Conn) 6 | } 7 | 8 | // The HandlerFunc type is an adapter to allow the use of ordinary functions as handlers. 9 | type HandlerFunc func(conn *Conn) 10 | 11 | // ServeUDP implements the Handler interface for UDP. 12 | func (f HandlerFunc) ServeUDP(conn *Conn) { 13 | f(conn) 14 | } 15 | -------------------------------------------------------------------------------- /integration/fixtures/http/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | [entryPoints.traefik] 12 | address = ":9090" 13 | 14 | [api] 15 | insecure = true 16 | 17 | [providers] 18 | [providers.http] 19 | endpoint = "http://127.0.0.1:9000" 20 | pollInterval = "100ms" 21 | -------------------------------------------------------------------------------- /integration/fixtures/k8s_crd_label_selector.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [api] 9 | 10 | [entryPoints] 11 | [entryPoints.footcp] 12 | address = ":8093" 13 | [entryPoints.fooudp] 14 | address = ":8090/udp" 15 | [entryPoints.web] 16 | address = ":8000" 17 | 18 | [providers.kubernetesCRD] 19 | labelSelector = "app=traefik" 20 | -------------------------------------------------------------------------------- /pkg/api/testdata/router-baz-custom-tls-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "web" 4 | ], 5 | "middlewares": [ 6 | "auth", 7 | "addPrefixTest@anotherprovider" 8 | ], 9 | "name": "baz@myprovider", 10 | "provider": "myprovider", 11 | "rule": "Host(`foo.baz`)", 12 | "service": "foo-service@myprovider", 13 | "tls": { 14 | "options": "myTLS" 15 | }, 16 | "status": "enabled", 17 | "using": [ 18 | "web" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /pkg/api/testdata/service-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "loadBalancer": { 3 | "passHostHeader": true, 4 | "servers": [ 5 | { 6 | "url": "http://127.0.0.1" 7 | } 8 | ] 9 | }, 10 | "name": "bar@myprovider", 11 | "provider": "myprovider", 12 | "serverStatus": { 13 | "http://127.0.0.1": "UP" 14 | }, 15 | "status": "enabled", 16 | "type": "loadbalancer", 17 | "usedBy": [ 18 | "foo@myprovider", 19 | "test@myprovider" 20 | ] 21 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingressClassv1_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | ingressClassName: traefik-lb-v1 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | service: 14 | name: service1 15 | port: 16 | number: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/ping_simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "routers": { 4 | "ping": { 5 | "entryPoints": [ 6 | "test" 7 | ], 8 | "service": "ping@internal", 9 | "rule": "PathPrefix(`/ping`)", 10 | "priority": 2147483647 11 | } 12 | }, 13 | "services": { 14 | "noop": {}, 15 | "ping": {} 16 | } 17 | }, 18 | "tcp": {}, 19 | "tls": {} 20 | } -------------------------------------------------------------------------------- /pkg/tcp/proxy_unix.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package tcp 5 | 6 | import ( 7 | "errors" 8 | "net" 9 | "syscall" 10 | ) 11 | 12 | // isReadConnResetError reports whether err is a connection reset error during a read operation. 13 | func isReadConnResetError(err error) bool { 14 | var oerr *net.OpError 15 | return errors.As(err, &oerr) && oerr.Op == "read" && errors.Is(err, syscall.ECONNRESET) 16 | } 17 | -------------------------------------------------------------------------------- /pkg/api/testdata/router-baz-default-tls-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "entryPoints": [ 3 | "web" 4 | ], 5 | "middlewares": [ 6 | "auth", 7 | "addPrefixTest@anotherprovider" 8 | ], 9 | "name": "baz@myprovider", 10 | "provider": "myprovider", 11 | "rule": "Host(`foo.baz`)", 12 | "service": "foo-service@myprovider", 13 | "tls": { 14 | "options": "default" 15 | }, 16 | "status": "enabled", 17 | "using": [ 18 | "web" 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_https_scheme.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami3 17 | port: 8443 18 | scheme: https 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | 12 | --- 13 | kind: Service 14 | apiVersion: v1 15 | metadata: 16 | name: service2 17 | namespace: testing 18 | 19 | spec: 20 | ports: 21 | - port: 80 22 | clusterIP: 10.0.0.1 23 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-basic-rule-on-one-path-with-https-(portname-starts-with-https)_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - name: https-foo 12 | port: 8443 13 | - addresses: 14 | - ip: 10.21.0.1 15 | ports: 16 | - name: https-foo 17 | port: 8443 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-default-traefik-ingressClass_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | kubernetes.io/ingress.class: traefik 8 | 9 | spec: 10 | rules: 11 | - http: 12 | paths: 13 | - path: /bar 14 | backend: 15 | serviceName: service1 16 | servicePort: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | 12 | --- 13 | kind: Service 14 | apiVersion: v1 15 | metadata: 16 | name: service2 17 | namespace: testing 18 | 19 | spec: 20 | ports: 21 | - port: 8082 22 | clusterIP: 10.1.0.1 23 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-no-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | traefik.ingress.kubernetes.io/router.pathmatcher: Path 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-missing-ingressClass_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | spec: 7 | ingressClassName: traefik-lb 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | service: 14 | name: service1 15 | port: 16 | number: 80 17 | -------------------------------------------------------------------------------- /pkg/tcp/proxy_windows.go: -------------------------------------------------------------------------------- 1 | //go:build windows 2 | // +build windows 3 | 4 | package tcp 5 | 6 | import ( 7 | "errors" 8 | "net" 9 | "syscall" 10 | ) 11 | 12 | // isReadConnResetError reports whether err is a connection reset error during a read operation. 13 | func isReadConnResetError(err error) bool { 14 | var oerr *net.OpError 15 | return errors.As(err, &oerr) && oerr.Op == "read" && errors.Is(err, syscall.WSAECONNRESET) 16 | } 17 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/03-ingress-https.yml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1beta1 2 | kind: Ingress 3 | metadata: 4 | name: test.ingress.https 5 | namespace: default 6 | 7 | spec: 8 | rules: 9 | - host: whoami.test.https 10 | http: 11 | paths: 12 | - path: /whoami 13 | backend: 14 | serviceName: whoami 15 | servicePort: http 16 | tls: 17 | - secretName: tls-cert 18 | -------------------------------------------------------------------------------- /pkg/api/testdata/services-page2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "passHostHeader": true, 5 | "servers": [ 6 | { 7 | "url": "http://127.0.0.2" 8 | } 9 | ] 10 | }, 11 | "name": "baz@myprovider", 12 | "provider": "myprovider", 13 | "serverStatus": { 14 | "http://127.0.0.2": "UP" 15 | }, 16 | "status": "enabled", 17 | "type": "loadbalancer", 18 | "usedBy": [ 19 | "foo@myprovider" 20 | ] 21 | } 22 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-ingressClass-without-annotation_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | kubernetes.io/ingress.class: traefik 8 | 9 | spec: 10 | rules: 11 | - http: 12 | paths: 13 | - path: /bar 14 | backend: 15 | serviceName: service1 16 | servicePort: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: tchouk 16 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - port: 80 10 | clusterIP: 10.0.0.1 11 | --- 12 | 13 | kind: Service 14 | apiVersion: v1 15 | metadata: 16 | name: defaultservice 17 | namespace: testing 18 | 19 | spec: 20 | ports: 21 | - port: 8080 22 | clusterIP: 10.0.0.1 23 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/rest_insecure.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "routers": { 4 | "rest": { 5 | "entryPoints": [ 6 | "traefik" 7 | ], 8 | "service": "rest@internal", 9 | "rule": "PathPrefix(`/api/providers`)", 10 | "priority": 2147483647 11 | } 12 | }, 13 | "services": { 14 | "noop": {}, 15 | "rest": {} 16 | } 17 | }, 18 | "tcp": {}, 19 | "tls": {} 20 | } -------------------------------------------------------------------------------- /integration/fixtures/https/dynamic_https_sni.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.websecure] 10 | address = ":4443" 11 | 12 | [entryPoints.https02] 13 | address = ":8443" 14 | 15 | [api] 16 | insecure = true 17 | 18 | [providers] 19 | [providers.file] 20 | fileName = "{{.DynamicConfFileName}}" 21 | watch = true 22 | -------------------------------------------------------------------------------- /integration/fixtures/k8s_crd.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [api] 9 | 10 | [entryPoints] 11 | [entryPoints.footcp] 12 | address = ":8093" 13 | [entryPoints.fooudp] 14 | address = ":8090/udp" 15 | [entryPoints.web] 16 | address = ":8000" 17 | 18 | [providers.kubernetesCRD] 19 | allowCrossNamespace = false 20 | allowExternalNameServices = true 21 | -------------------------------------------------------------------------------- /pkg/api/testdata/entrypoints-many-lastpage.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "address": ":14", 4 | "http": {}, 5 | "name": "ep14" 6 | }, 7 | { 8 | "address": ":15", 9 | "http": {}, 10 | "name": "ep15" 11 | }, 12 | { 13 | "address": ":16", 14 | "http": {}, 15 | "name": "ep16" 16 | }, 17 | { 18 | "address": ":17", 19 | "http": {}, 20 | "name": "ep17" 21 | }, 22 | { 23 | "address": ":18", 24 | "http": {}, 25 | "name": "ep18" 26 | } 27 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_two_services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | weight: 2 17 | - name: whoamitcp2 18 | port: 8080 19 | weight: 3 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_empty_services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami-without-endpoints-subsets 17 | port: 80 18 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/api_insecure_without_dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "routers": { 4 | "api": { 5 | "entryPoints": [ 6 | "traefik" 7 | ], 8 | "service": "api@internal", 9 | "rule": "PathPrefix(`/api`)", 10 | "priority": 2147483646 11 | } 12 | }, 13 | "services": { 14 | "api": {}, 15 | "noop": {} 16 | } 17 | }, 18 | "tcp": {}, 19 | "tls": {} 20 | } -------------------------------------------------------------------------------- /pkg/api/testdata/services-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "passHostHeader": true, 5 | "servers": [ 6 | { 7 | "url": "http://127.0.0.2" 8 | } 9 | ] 10 | }, 11 | "name": "baz@myprovider", 12 | "provider": "myprovider", 13 | "serverStatus": { 14 | "http://127.0.0.2": "UP" 15 | }, 16 | "status": "disabled", 17 | "type": "loadbalancer", 18 | "usedBy": [ 19 | "foo@myprovider" 20 | ] 21 | } 22 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_two_rules.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | - match: HostSNI(`bar.com`) 17 | services: 18 | - name: whoamitcp 19 | port: 8000 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-ingress-annotation_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | kubernetes.io/ingress.class: traefik 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | service: 15 | name: service1 16 | port: 17 | number: 80 -------------------------------------------------------------------------------- /integration/fixtures/marathon/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | [entryPoints.traefik] 12 | address = ":9090" 13 | 14 | [api] 15 | insecure = true 16 | 17 | [providers] 18 | [providers.marathon] 19 | endpoint = "{{.MarathonURL}}" 20 | watch = true 21 | exposedByDefault = true 22 | -------------------------------------------------------------------------------- /integration/fixtures/throttling/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | providersThrottleDuration = "400ms" 17 | [providers.rest] 18 | insecure = true 19 | 20 | [metrics] 21 | [metrics.prometheus] 22 | buckets = [0.1,0.3,1.2,5.0] 23 | -------------------------------------------------------------------------------- /pkg/config/static/pilot.go: -------------------------------------------------------------------------------- 1 | package static 2 | 3 | // Pilot Configuration related to Traefik Pilot. 4 | // Deprecated. 5 | type Pilot struct { 6 | Token string `description:"Traefik Pilot token. (Deprecated)" json:"token,omitempty" toml:"token,omitempty" yaml:"token,omitempty" loggable:"false"` 7 | Dashboard bool `description:"Enable Traefik Pilot in the dashboard. (Deprecated)" json:"dashboard,omitempty" toml:"dashboard,omitempty" yaml:"dashboard,omitempty"` 8 | } 9 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_two_services.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - web 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/foo`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | - name: whoami2 19 | port: 8080 20 | 21 | -------------------------------------------------------------------------------- /pkg/provider/traefik/fixtures/prometheus_simple.json: -------------------------------------------------------------------------------- 1 | { 2 | "http": { 3 | "routers": { 4 | "prometheus": { 5 | "entryPoints": [ 6 | "test" 7 | ], 8 | "service": "prometheus@internal", 9 | "rule": "PathPrefix(`/metrics`)", 10 | "priority": 2147483647 11 | } 12 | }, 13 | "services": { 14 | "noop": {}, 15 | "prometheus": {} 16 | } 17 | }, 18 | "tcp": {}, 19 | "tls": {} 20 | } -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/tcp/with_two_identical_rules.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: HostSNI(`foo.com`) 13 | services: 14 | - name: whoamitcp 15 | port: 8000 16 | - match: HostSNI(`foo.com`) 17 | services: 18 | - name: whoamitcp 19 | port: 8000 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_ipv6.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | services: 15 | - name: whoami-ipv6 16 | port: 8080 17 | - name: external-svc-with-ipv6 18 | port: 8080 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_plugin_read_secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: name 5 | namespace: default 6 | 7 | data: 8 | key: dGhpc19pc190aGVfc2VjcmV0 9 | 10 | --- 11 | apiVersion: traefik.containo.us/v1alpha1 12 | kind: Middleware 13 | metadata: 14 | name: test-secret 15 | namespace: default 16 | 17 | spec: 18 | plugin: 19 | test-secret: 20 | user: admin 21 | secret: urn:k8s:secret:name:key 22 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-without-provider-traefik-ingressClass-and-unknown-annotation_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | kubernetes.io/ingress.class: tchouk 8 | 9 | spec: 10 | rules: 11 | - http: 12 | paths: 13 | - path: /bar 14 | backend: 15 | serviceName: service1 16 | servicePort: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-empty-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | traefik.ingress.kubernetes.io/router.pathmatcher: Path 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | pathType: "" 14 | backend: 15 | serviceName: service1 16 | servicePort: 80 17 | -------------------------------------------------------------------------------- /.github/workflows/check_doc.yml: -------------------------------------------------------------------------------- 1 | name: Check Documentation 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - '*' 7 | 8 | jobs: 9 | 10 | docs: 11 | name: Check, verify and build documentation 12 | runs-on: ubuntu-20.04 13 | 14 | steps: 15 | - name: Check out code 16 | uses: actions/checkout@v2 17 | with: 18 | fetch-depth: 0 19 | 20 | - name: Check documentation 21 | run: make docs-pull-images docs 22 | -------------------------------------------------------------------------------- /integration/resources/compose/tlsclientheaders.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami: 4 | image: traefik/whoami 5 | labels: 6 | traefik.http.routers.route1.rule: PathPrefix(`/foo`) 7 | traefik.http.routers.route1.middlewares: passtls 8 | traefik.http.routers.route1.tls: true 9 | traefik.http.middlewares.passtls.passtlsclientcert.pem: true 10 | 11 | networks: 12 | default: 13 | name: traefik-test-network 14 | external: true 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-no-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | traefik.ingress.kubernetes.io/router.pathmatcher: Path 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | service: 15 | name: service1 16 | port: 17 | number: 80 18 | -------------------------------------------------------------------------------- /pkg/provider/provider.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import ( 4 | "github.com/traefik/traefik/v2/pkg/config/dynamic" 5 | "github.com/traefik/traefik/v2/pkg/safe" 6 | ) 7 | 8 | // Provider defines methods of a provider. 9 | type Provider interface { 10 | // Provide allows the provider to provide configurations to traefik 11 | // using the given configuration channel. 12 | Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error 13 | Init() error 14 | } 15 | -------------------------------------------------------------------------------- /script/test-integration: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | export DEST=. 5 | 6 | TESTFLAGS+=("-test.timeout=20m" -check.v) 7 | 8 | if [ -n "${VERBOSE}" ]; then 9 | TESTFLAGS+=(-v) 10 | elif [ -n "${VERBOSE_INTEGRATION}" ]; then 11 | TESTFLAGS+=(-v) 12 | fi 13 | 14 | cd integration 15 | echo "Testing against..." 16 | docker version 17 | 18 | # shellcheck disable=SC2086 19 | # shellcheck disable=SC2048 20 | CGO_ENABLED=0 go test -integration ${TESTFLAGS[*]} 21 | -------------------------------------------------------------------------------- /webui/src/pages/_commons/Error404.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /docs/content/reference/static-configuration/file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Traefik File Static Configuration" 3 | description: "Reference the YAML and TOML files for static configuration in Traefik Proxy. Read the technical documentation." 4 | --- 5 | 6 | # Static Configuration: File 7 | 8 | ```yml tab="YAML" 9 | --8<-- "content/reference/static-configuration/file.yaml" 10 | ``` 11 | 12 | ```toml tab="TOML" 13 | --8<-- "content/reference/static-configuration/file.toml" 14 | ``` 15 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-two-paths_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | - path: /foo 16 | backend: 17 | serviceName: service1 18 | servicePort: 80 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-non-matching-provider-traefik-ingressClass-and-annotation_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | kubernetes.io/ingress.class: toto 8 | 9 | spec: 10 | rules: 11 | - http: 12 | paths: 13 | - path: /bar 14 | backend: 15 | serviceName: service1 16 | servicePort: 80 17 | -------------------------------------------------------------------------------- /pkg/api/testdata/services-filtered-status.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "loadBalancer": { 4 | "passHostHeader": true, 5 | "servers": [ 6 | { 7 | "url": "http://127.0.0.1" 8 | } 9 | ] 10 | }, 11 | "name": "bar@myprovider", 12 | "provider": "myprovider", 13 | "serverStatus": { 14 | "http://127.0.0.1": "UP" 15 | }, 16 | "status": "enabled", 17 | "type": "loadbalancer", 18 | "usedBy": [ 19 | "foo@myprovider", 20 | "test@myprovider" 21 | ] 22 | } 23 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-defaultbackend_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - port: 80 12 | 13 | --- 14 | kind: Endpoints 15 | apiVersion: v1 16 | metadata: 17 | name: defaultservice 18 | namespace: testing 19 | 20 | subsets: 21 | - addresses: 22 | - ip: 10.10.0.1 23 | ports: 24 | - port: 8080 25 | -------------------------------------------------------------------------------- /integration/fixtures/consul_catalog/default_not_exposed.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.consulCatalog] 17 | exposedByDefault = false 18 | refreshInterval = "500ms" 19 | [providers.consulCatalog.endpoint] 20 | address = "{{ .ConsulAddress }}" 21 | -------------------------------------------------------------------------------- /integration/resources/compose/base.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami1: 4 | image: traefik/whoami 5 | labels: 6 | traefik.enable: true 7 | traefik.http.routers.router1.rule: PathPrefix(`/whoami`) 8 | traefik.http.routers.router2.rule: PathPrefix(`/whoami2`) 9 | 10 | whoami2: 11 | image: traefik/whoami 12 | labels: 13 | traefik.enable: false 14 | 15 | networks: 16 | default: 17 | name: traefik-test-network 18 | external: true 19 | -------------------------------------------------------------------------------- /pkg/provider/acme/store.go: -------------------------------------------------------------------------------- 1 | package acme 2 | 3 | // StoredData represents the data managed by Store. 4 | type StoredData struct { 5 | Account *Account 6 | Certificates []*CertAndStore 7 | } 8 | 9 | // Store is a generic interface that represents a storage. 10 | type Store interface { 11 | GetAccount(string) (*Account, error) 12 | SaveAccount(string, *Account) error 13 | GetCertificates(string) ([]*CertAndStore, error) 14 | SaveCertificates(string, []*CertAndStore) error 15 | } 16 | -------------------------------------------------------------------------------- /integration/fixtures/simple_hostresolver.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.docker] 17 | exposedByDefault = false 18 | defaultRule = "Host(`{{ normalize .Name }}.docker.local`)" 19 | watch = true 20 | 21 | [hostResolver] 22 | cnameFlattening = true 23 | -------------------------------------------------------------------------------- /integration/resources/compose/udp.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | whoami-a: 4 | image: traefik/whoamiudp:latest 5 | command: -name whoami-a 6 | 7 | whoami-b: 8 | image: traefik/whoamiudp:latest 9 | command: -name whoami-b 10 | 11 | whoami-c: 12 | image: traefik/whoamiudp:latest 13 | command: -name whoami-c 14 | 15 | whoami-d: 16 | image: traefik/whoami 17 | 18 | networks: 19 | default: 20 | name: traefik-test-network 21 | external: true 22 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-name-in-backend-and-no-pod-replica_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - name: carotte 12 | port: 8090 13 | - name: tchouk 14 | port: 8089 15 | - addresses: 16 | - ip: 10.21.0.1 17 | ports: 18 | - name: carotte 19 | port: 8090 20 | - name: tchouk 21 | port: 8089 22 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-value-in-backend-and-no-pod-replica_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | ports: 11 | - name: carotte 12 | port: 8090 13 | - name: tchouk 14 | port: 8089 15 | - addresses: 16 | - ip: 10.21.0.1 17 | ports: 18 | - name: carotte 19 | port: 8090 20 | - name: tchouk 21 | port: 8089 22 | -------------------------------------------------------------------------------- /integration/resources/compose/tracing.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | zipkin: 4 | image: openzipkin/zipkin:2.16.2 5 | environment: 6 | STORAGE_TYPE: mem 7 | JAVA_OPTS: -Dlogging.level.zipkin=DEBUG 8 | 9 | jaeger: 10 | image: jaegertracing/all-in-one:1.14 11 | environment: 12 | COLLECTOR_ZIPKIN_HTTP_PORT: 9411 13 | 14 | whoami: 15 | image: traefik/whoami 16 | 17 | networks: 18 | default: 19 | name: traefik-test-network 20 | external: true 21 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_options.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - foo 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | passHostHeader: false 19 | responseForwarding: 20 | flushInterval: 10s 21 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Double-Single-Service-Ingress_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | backend: 9 | serviceName: service1 10 | servicePort: 80 11 | 12 | --- 13 | kind: Ingress 14 | apiVersion: networking.k8s.io/v1beta1 15 | metadata: 16 | name: "" 17 | namespace: testing 18 | 19 | spec: 20 | backend: 21 | serviceName: service2 22 | servicePort: 80 23 | -------------------------------------------------------------------------------- /integration/fixtures/consul_catalog/connect.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.consulCatalog] 17 | exposedByDefault = false 18 | refreshInterval = "500ms" 19 | connectAware = true 20 | [providers.consulCatalog.endpoint] 21 | address = "{{ .ConsulAddress }}" 22 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-path_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /foo/bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | 16 | - path: /foo-bar 17 | backend: 18 | serviceName: service1 19 | servicePort: 80 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v18-Ingress-with-implementationSpecific-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | traefik.ingress.kubernetes.io/router.pathmatcher: Path 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | pathType: ImplementationSpecific 14 | backend: 15 | serviceName: service1 16 | servicePort: 80 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-empty-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | traefik.ingress.kubernetes.io/router.pathmatcher: Path 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | pathType: "" 14 | backend: 15 | service: 16 | name: service1 17 | port: 18 | number: 80 19 | -------------------------------------------------------------------------------- /integration/resources/compose/pebble.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | pebble: 4 | image: letsencrypt/pebble:v2.3.1 5 | command: pebble --dnsserver traefik:5053 6 | environment: 7 | # https://github.com/letsencrypt/pebble#testing-at-full-speed 8 | PEBBLE_VA_NOSLEEP: 1 9 | # https://github.com/letsencrypt/pebble#invalid-anti-replay-nonce-errors 10 | PEBBLE_WFE_NONCEREJECT: 0 11 | 12 | networks: 13 | default: 14 | name: traefik-test-network 15 | external: true 16 | -------------------------------------------------------------------------------- /pkg/provider/file/fixtures/toml/dir01_file02.toml: -------------------------------------------------------------------------------- 1 | [http.services] 2 | 3 | [http.services.application-1.loadBalancer] 4 | [[http.services.application-1.loadBalancer.servers]] 5 | url = "http://172.17.0.1:80" 6 | 7 | [http.services.application-2.loadBalancer] 8 | [[http.services.application-2.loadBalancer.servers]] 9 | url = "http://172.17.0.2:80" 10 | 11 | [http.services.application-3.loadBalancer] 12 | [[http.services.application-3.loadBalancer.servers]] 13 | url = "http://172.17.0.3:80" 14 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-port-invalid-for-one-service_service.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: http 10 | port: 8080 11 | protocol: TCP 12 | targetPort: http-api 13 | - name: http-admin 14 | port: 8079 15 | protocol: TCP 16 | targetPort: http-admin 17 | selector: 18 | app: foo 19 | sessionAffinity: None 20 | type: ClusterIP 21 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/TLS-support_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: example-com 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: http 10 | port: 80 11 | clusterIP: 10.0.0.1 12 | type: ClusterIP 13 | 14 | --- 15 | kind: Service 16 | apiVersion: v1 17 | metadata: 18 | name: example-org 19 | namespace: testing 20 | 21 | spec: 22 | ports: 23 | - name: http 24 | port: 80 25 | clusterIP: 10.0.0.2 26 | type: ClusterIP 27 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_two_services_weight.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - web 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/foo`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | weight: 10 19 | - name: whoami2 20 | port: 8080 21 | weight: 0 22 | 23 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/2-ingresses-in-different-namespace-with-same-service-name_service.yml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | spec: 8 | ports: 9 | - name: tchouk 10 | port: 80 11 | clusterIP: 10.0.0.1 12 | 13 | --- 14 | kind: Service 15 | apiVersion: v1 16 | metadata: 17 | name: service1 18 | namespace: toto 19 | 20 | spec: 21 | ports: 22 | - name: tchouk 23 | port: 80 24 | clusterIP: 10.0.0.1 25 | -------------------------------------------------------------------------------- /integration/fixtures/consul_catalog/connect_not_aware.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.consulCatalog] 17 | exposedByDefault = false 18 | refreshInterval = "500ms" 19 | connectAware = false 20 | [providers.consulCatalog.endpoint] 21 | address = "{{ .ConsulAddress }}" 22 | -------------------------------------------------------------------------------- /integration/fixtures/consul_catalog/simple.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.consulCatalog] 17 | exposedByDefault = true 18 | refreshInterval = "500ms" 19 | defaultRule = "{{ .DefaultRule }}" 20 | [providers.consulCatalog.endpoint] 21 | address = "{{ .ConsulAddress }}" 22 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/05-ingressroutetcp.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRouteTCP 3 | metadata: 4 | name: test3.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - footcp 10 | routes: 11 | - match: HostSNI(`*`) 12 | services: 13 | - name: whoamitcp 14 | namespace: default 15 | port: 8080 16 | - name: externalname-svc 17 | port: 9090 18 | tls: 19 | options: 20 | name: mytlsoption 21 | store: 22 | name: mytlsstore 23 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-one-rule-with-one-host-and-two-paths_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | - path: /foo 17 | backend: 18 | serviceName: service1 19 | servicePort: 80 20 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-IPv6-endpoints_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: example.com 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service-bar 14 | servicePort: 8080 15 | - path: /foo 16 | backend: 17 | serviceName: service-foo 18 | servicePort: 8080 19 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-a-named-port-matching-subset-of-service-pods_endpoint.yml: -------------------------------------------------------------------------------- 1 | kind: Endpoints 2 | apiVersion: v1 3 | metadata: 4 | name: service1 5 | namespace: testing 6 | 7 | subsets: 8 | - addresses: 9 | - ip: 10.10.0.1 10 | - ip: 10.10.0.2 11 | ports: 12 | - name: tchouk 13 | port: 8089 14 | - addresses: 15 | - ip: 10.10.0.1 16 | - ip: 10.10.0.2 17 | - ip: 10.10.0.3 18 | ports: 19 | - name: carotte 20 | port: 8090 21 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-different-rules-with-one-path_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - http: 10 | paths: 11 | - path: /bar 12 | backend: 13 | serviceName: service1 14 | servicePort: 80 15 | - http: 16 | paths: 17 | - path: /foo 18 | backend: 19 | serviceName: service1 20 | servicePort: 80 21 | -------------------------------------------------------------------------------- /integration/fixtures/acme/certificates.toml: -------------------------------------------------------------------------------- 1 | [http.services] 2 | [http.services.test.loadBalancer] 3 | [[http.services.test.loadBalancer.servers]] 4 | url = "http://127.0.0.1:9010" 5 | 6 | [http.routers] 7 | [http.routers.test] 8 | entryPoints = ["websecure"] 9 | rule = "Host(`traefik.acme.wtf`)" 10 | service = "test" 11 | [http.routers.test.tls] 12 | 13 | [[tls.certificates]] 14 | stores = ["default"] 15 | certFile = "fixtures/acme/ssl/wildcard.crt" 16 | keyFile = "fixtures/acme/ssl/wildcard.key" 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_plugin_read_array_of_secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: name 5 | namespace: default 6 | 7 | data: 8 | key1: c2VjcmV0X2RhdGEx 9 | key2: c2VjcmV0X2RhdGEy 10 | 11 | --- 12 | apiVersion: traefik.containo.us/v1alpha1 13 | kind: Middleware 14 | metadata: 15 | name: test-secret 16 | namespace: default 17 | 18 | spec: 19 | plugin: 20 | test-secret: 21 | secret: 22 | - urn:k8s:secret:name:key1 23 | - urn:k8s:secret:name:key2 24 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/v19-Ingress-with-implementationSpecific-pathType_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | annotations: 7 | traefik.ingress.kubernetes.io/router.pathmatcher: Path 8 | spec: 9 | rules: 10 | - http: 11 | paths: 12 | - path: /bar 13 | pathType: ImplementationSpecific 14 | backend: 15 | service: 16 | name: service1 17 | port: 18 | number: 80 -------------------------------------------------------------------------------- /pkg/tls/version.go: -------------------------------------------------------------------------------- 1 | package tls 2 | 3 | import "crypto/tls" 4 | 5 | // GetVersion returns the normalized TLS version. 6 | // Available TLS versions defined at https://pkg.go.dev/crypto/tls/#pkg-constants 7 | func GetVersion(connState *tls.ConnectionState) string { 8 | switch connState.Version { 9 | case tls.VersionTLS10: 10 | return "1.0" 11 | case tls.VersionTLS11: 12 | return "1.1" 13 | case tls.VersionTLS12: 14 | return "1.2" 15 | case tls.VersionTLS13: 16 | return "1.3" 17 | } 18 | 19 | return "unknown" 20 | } 21 | -------------------------------------------------------------------------------- /integration/fixtures/k8s/03-ingressroute.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | labels: 7 | app: traefik 8 | 9 | spec: 10 | entryPoints: 11 | - web 12 | 13 | routes: 14 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 15 | kind: Rule 16 | priority: 12 17 | services: 18 | - name: whoami 19 | port: 80 20 | 21 | tls: 22 | options: 23 | name: mytlsoption 24 | store: 25 | name: mytlsstore 26 | -------------------------------------------------------------------------------- /pkg/provider/rancher/label.go: -------------------------------------------------------------------------------- 1 | package rancher 2 | 3 | import ( 4 | "github.com/traefik/traefik/v2/pkg/config/label" 5 | ) 6 | 7 | type configuration struct { 8 | Enable bool 9 | } 10 | 11 | func (p *Provider) getConfiguration(service rancherData) (configuration, error) { 12 | conf := configuration{ 13 | Enable: p.ExposedByDefault, 14 | } 15 | 16 | err := label.Decode(service.Labels, &conf, "traefik.rancher.", "traefik.enable") 17 | if err != nil { 18 | return configuration{}, err 19 | } 20 | 21 | return conf, nil 22 | } 23 | -------------------------------------------------------------------------------- /pkg/collector/collector_test.go: -------------------------------------------------------------------------------- 1 | package collector 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | "github.com/stretchr/testify/require" 8 | "github.com/traefik/traefik/v2/pkg/config/static" 9 | ) 10 | 11 | func Test_createBody(t *testing.T) { 12 | var staticConfiguration static.Configuration 13 | 14 | err := hydrate(&staticConfiguration) 15 | require.NoError(t, err) 16 | 17 | buffer, err := createBody(&staticConfiguration) 18 | require.NoError(t, err) 19 | 20 | assert.NotEmpty(t, buffer) 21 | } 22 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Traefik Community Support 4 | url: https://community.traefik.io/ 5 | about: If you have a question, or are looking for advice, please post on our Discuss forum! The community loves to chime in to help. Happy Coding! 6 | - name: Traefik Helm Chart Issues 7 | url: https://github.com/traefik/traefik-helm-chart 8 | about: Are you submitting an issue or feature enhancement for the Traefik helm chart? Please post in the traefik-helm-chart GitHub Issues. 9 | -------------------------------------------------------------------------------- /integration/fixtures/consul_catalog/connect_by_default.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.consulCatalog] 17 | exposedByDefault = false 18 | refreshInterval = "500ms" 19 | connectAware = true 20 | connectByDefault = true 21 | [providers.consulCatalog.endpoint] 22 | address = "{{ .ConsulAddress }}" 23 | -------------------------------------------------------------------------------- /integration/fixtures/consul_catalog/simple_watch.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | 8 | [entryPoints] 9 | [entryPoints.web] 10 | address = ":8000" 11 | 12 | [api] 13 | insecure = true 14 | 15 | [providers] 16 | [providers.consulCatalog] 17 | exposedByDefault = true 18 | refreshInterval = "500ms" 19 | defaultRule = "{{ .DefaultRule }}" 20 | watch = true 21 | [providers.consulCatalog.endpoint] 22 | address = "{{ .ConsulAddress }}" 23 | -------------------------------------------------------------------------------- /integration/fixtures/traefik_log_config.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [log] 6 | level = "DEBUG" 7 | filePath = "traefik.log" 8 | 9 | [accessLog] 10 | filePath = "access.log" 11 | 12 | [entryPoints] 13 | [entryPoints.web] 14 | address = ":8000" 15 | 16 | [api] 17 | insecure = true 18 | dashboard = false 19 | 20 | [providers] 21 | [providers.docker] 22 | exposedByDefault = false 23 | defaultRule = "Host(`{{ normalize .Name }}.docker.local`)" 24 | watch = true 25 | -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/ecs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Traefik AWS ECS Configuration Documentation" 3 | description: "Learn how to do dynamic configuration in Traefik Proxy with AWS ECS. Read the technical documentation." 4 | --- 5 | 6 | # ECS Configuration Reference 7 | 8 | Dynamic configuration with ECS provider 9 | {: .subtitle } 10 | 11 | The labels are case insensitive. 12 | 13 | ```yaml 14 | --8<-- "content/reference/dynamic-configuration/ecs.yml" 15 | --8<-- "content/reference/dynamic-configuration/docker-labels.yml" 16 | ``` 17 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-paths-using-same-service-and-different-port-name_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: tchouk 16 | - path: /foo 17 | backend: 18 | serviceName: service1 19 | servicePort: carotte 20 | -------------------------------------------------------------------------------- /pkg/server/service/bufferpool.go: -------------------------------------------------------------------------------- 1 | package service 2 | 3 | import "sync" 4 | 5 | const bufferPoolSize = 32 * 1024 6 | 7 | func newBufferPool() *bufferPool { 8 | return &bufferPool{ 9 | pool: sync.Pool{ 10 | New: func() interface{} { 11 | return make([]byte, bufferPoolSize) 12 | }, 13 | }, 14 | } 15 | } 16 | 17 | type bufferPool struct { 18 | pool sync.Pool 19 | } 20 | 21 | func (b *bufferPool) Get() []byte { 22 | return b.pool.Get().([]byte) 23 | } 24 | 25 | func (b *bufferPool) Put(bytes []byte) { 26 | b.pool.Put(bytes) 27 | } 28 | -------------------------------------------------------------------------------- /integration/fixtures/simple_secure_api.toml: -------------------------------------------------------------------------------- 1 | [global] 2 | checkNewVersion = false 3 | sendAnonymousUsage = false 4 | 5 | [entryPoints] 6 | [entryPoints.web] 7 | address = ":8000" 8 | 9 | [entryPoints.traefik] 10 | address = ":8080" 11 | 12 | 13 | [api] 14 | 15 | [providers.file] 16 | filename = "{{ .SelfFilename }}" 17 | 18 | [http.routers.api] 19 | rule="PathPrefix(`/secure`)" 20 | service="api@internal" 21 | middlewares=["strip"] 22 | 23 | [http.middlewares.strip.stripPrefix] 24 | prefixes = [ "/secure" ] 25 | 26 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_two_rules.yml: -------------------------------------------------------------------------------- 1 | apiVersion: traefik.containo.us/v1alpha1 2 | kind: IngressRoute 3 | metadata: 4 | name: test.route 5 | namespace: default 6 | 7 | spec: 8 | entryPoints: 9 | - web 10 | 11 | routes: 12 | - match: Host(`foo.com`) && PathPrefix(`/foo`) 13 | kind: Rule 14 | priority: 12 15 | services: 16 | - name: whoami 17 | port: 80 18 | - match: Host(`foo.com`) && PathPrefix(`/bar`) 19 | kind: Rule 20 | priority: 14 21 | services: 22 | - name: whoami 23 | port: 80 24 | -------------------------------------------------------------------------------- /docs/content/reference/dynamic-configuration/file.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Traefik File Dynamic Configuration" 3 | description: "This guide will provide you with the YAML and TOML files for dynamic configuration in Traefik Proxy. Read the technical documentation." 4 | --- 5 | 6 | # File Configuration Reference 7 | 8 | Dynamic configuration with files 9 | {: .subtitle } 10 | 11 | ```yml tab="YAML" 12 | --8<-- "content/reference/dynamic-configuration/file.yaml" 13 | ``` 14 | 15 | ```toml tab="TOML" 16 | --8<-- "content/reference/dynamic-configuration/file.toml" 17 | ``` 18 | -------------------------------------------------------------------------------- /docs/content/user-guides/crd-acme/05-tlsoption.yml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: traefik.containo.us/v1alpha1 3 | kind: TLSOption 4 | metadata: 5 | name: default 6 | namespace: default 7 | spec: 8 | minVersion: VersionTLS12 9 | cipherSuites: 10 | - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 # TLS 1.2 11 | - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305 # TLS 1.2 12 | - TLS_AES_256_GCM_SHA384 # TLS 1.3 13 | - TLS_CHACHA20_POLY1305_SHA256 # TLS 1.3 14 | curvePreferences: 15 | - CurveP521 16 | - CurveP384 17 | sniStrict: true 18 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/crd/fixtures/with_plugin_deep_read_secret.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: name 5 | namespace: default 6 | 7 | data: 8 | key: dGhpc19pc190aGVfdmVyeV9kZWVwX3NlY3JldA== 9 | 10 | --- 11 | apiVersion: traefik.containo.us/v1alpha1 12 | kind: Middleware 13 | metadata: 14 | name: test-secret 15 | namespace: default 16 | 17 | spec: 18 | plugin: 19 | test-secret: 20 | secret_0: 21 | secret_1: 22 | secret_2: 23 | user: admin 24 | secret: urn:k8s:secret:name:key 25 | -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-conflicting-routers-on-host_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: "*.bar" 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | 17 | - host: "bar" 18 | http: 19 | paths: 20 | - path: /bar 21 | backend: 22 | serviceName: service1 23 | servicePort: 80 24 | -------------------------------------------------------------------------------- /pkg/api/testdata/middlewares-filtered-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "addPrefix": { 4 | "prefix": "/toto" 5 | }, 6 | "name": "addPrefixTest@anotherprovider", 7 | "provider": "anotherprovider", 8 | "status": "enabled", 9 | "type": "addprefix", 10 | "usedBy": [ 11 | "bar@myprovider" 12 | ] 13 | }, 14 | { 15 | "addPrefix": { 16 | "prefix": "/titi" 17 | }, 18 | "name": "addPrefixTest@myprovider", 19 | "provider": "myprovider", 20 | "status": "disabled", 21 | "type": "addprefix", 22 | "usedBy": [ 23 | "test@myprovider" 24 | ] 25 | } 26 | ] -------------------------------------------------------------------------------- /pkg/provider/kubernetes/ingress/fixtures/Ingress-with-two-services_ingress.yml: -------------------------------------------------------------------------------- 1 | kind: Ingress 2 | apiVersion: networking.k8s.io/v1beta1 3 | metadata: 4 | name: "" 5 | namespace: testing 6 | 7 | spec: 8 | rules: 9 | - host: traefik.tchouk 10 | http: 11 | paths: 12 | - path: /bar 13 | backend: 14 | serviceName: service1 15 | servicePort: 80 16 | - host: traefik.courgette 17 | http: 18 | paths: 19 | - path: /carotte 20 | backend: 21 | serviceName: service2 22 | servicePort: 8082 23 | -------------------------------------------------------------------------------- /pkg/provider/nomad/tag.go: -------------------------------------------------------------------------------- 1 | package nomad 2 | 3 | import ( 4 | "strings" 5 | ) 6 | 7 | func tagsToLabels(tags []string, prefix string) map[string]string { 8 | labels := make(map[string]string, len(tags)) 9 | for _, tag := range tags { 10 | if strings.HasPrefix(tag, prefix) { 11 | if parts := strings.SplitN(tag, "=", 2); len(parts) == 2 { 12 | left, right := strings.TrimSpace(parts[0]), strings.TrimSpace(parts[1]) 13 | key := "traefik." + strings.TrimPrefix(left, prefix+".") 14 | labels[key] = right 15 | } 16 | } 17 | } 18 | return labels 19 | } 20 | -------------------------------------------------------------------------------- /webui/src/components/_commons/TLSState.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 27 | --------------------------------------------------------------------------------