Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid K8s configs in Traefik 1.x->2.x migration docs #7130

Closed
PCM2 opened this issue Jul 31, 2020 · 1 comment
Closed

Invalid K8s configs in Traefik 1.x->2.x migration docs #7130

PCM2 opened this issue Jul 31, 2020 · 1 comment

Comments

@PCM2
Copy link
Contributor

PCM2 commented Jul 31, 2020

Do you want to request a feature or report a bug?

Bug

What did you expect to see?

https://docs.traefik.io/migration/v1-to-v2/#http-to-https-redirection-is-now-configured-on-routers

The documentation on migrating from Traefik 1.x to 2.x should include valid example configuration files for demonstration purposes.

What did you see instead?

On https://docs.traefik.io/migration/v1-to-v2/#http-to-https-redirection-is-now-configured-on-routers , several objects in the K8s IngressRoute configs have names that include underscores (_). This goes against K8s naming convention, in which names for most resource types must follow RFC 1123.

Sample output (truncated):

% kubectl apply -f test.yaml      
Error from server (Invalid): error when creating "test.yaml": IngressRoute.traefik.containo.us "http_catchall" is 
invalid: metadata.name: Invalid value: "http_catchall": a DNS-1123 subdomain must consist of lower case 
alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', 
regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Notes

  • One fix might be to change from an underscore (_) to a hyphen (-)
  • Presumably, the names in the K8s examples should match the ones in the Docker examples and the TOML and YAML static config files
  • This issue appears to exist in docs versions 2.1 and later
  • The same issue may affect other docs
@ldez ldez added this to issues in v2 via automation Aug 1, 2020
@traefiker traefiker added this to the 2.2 milestone Aug 3, 2020
@traefiker
Copy link
Contributor

Closed by #7131.

v2 automation moved this from issues to Done Aug 3, 2020
@traefik traefik locked and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
v2
Done
Development

No branches or pull requests

3 participants