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

Virtual host exceeds allowed maximum length #25

Closed
ValFadeev opened this issue Nov 1, 2017 · 4 comments
Closed

Virtual host exceeds allowed maximum length #25

ValFadeev opened this issue Nov 1, 2017 · 4 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@ValFadeev
Copy link

Hi,
I am trying to use contour in conjunction with ingress objects for host-based routing to backend services. Here is an example of the spec section from the ingress definition:

  "spec": {
    "rules": [
      {
        "host": "my-very-very-long-service-host-name.my.domainname",
        "http": {
          "paths": [
            {
              "backend": {
                "serviceName": "my-service-name",
                "servicePort": 8088
              }
            }
          ]
        }
      }
    ]
  }

Contour picks it up but throws an error because the generated virtual host name turns out to be too long:

[2017-11-01 14:22:54.787][1][warning][upstream] source/common/router/rds_subscription.cc:65] rds: fetch failure: Invalid virtual host name: Length of default/my-service-name/my-very-very-long-service-host-name.my.domainname (73) exceeds allowed maximum length (60)

Unfortunately, I am unable to change the enforced naming convention to shorten the host names very quickly. Is there a workaround or a plan to make this configurable? What would the considerations be if the virtual host could be overridden through an annotation? Thanks!

@davecheney
Copy link
Contributor

Thanks for raising this issue; I knew that at some point I would have to hash the names of the various elements going into a container name; namespace, ingress name, vhost. Look's like I'll have to raise the priority on this.

@davecheney davecheney added kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Nov 1, 2017
@davecheney davecheney added this to the 0.2.0 milestone Nov 1, 2017
@davecheney
Copy link
Contributor

Marking as 0.2, but it might be possible to get this backported to 0.1.1. I'll see

@davecheney davecheney self-assigned this Nov 1, 2017
davecheney added a commit to davecheney/contour that referenced this issue Nov 2, 2017
Fixes projectcontour#25

Envoy requires Name fields to be 60 characters or less. Rather than
doing the simple thing and using hashes as UUIDs everywhere, this PR
tries hard to preserve as much of the original name as possible, while
progressively truncating the longest fields to stay under the 60 char
limit.

Signed-off-by: Dave Cheney <dave@cheney.net>
davecheney added a commit to davecheney/contour that referenced this issue Nov 2, 2017
Fixes projectcontour#25

Envoy requires Name fields to be 60 characters or less. Rather than
doing the simple thing and using hashes as UUIDs everywhere, this PR
tries hard to preserve as much of the original name as possible, while
progressively truncating the longest fields to stay under the 60 char
limit.

Signed-off-by: Dave Cheney <dave@cheney.net>
davecheney added a commit to davecheney/contour that referenced this issue Nov 2, 2017
Fixes projectcontour#25

Envoy requires Name fields to be 60 characters or less. Rather than
doing the simple thing and using hashes as UUIDs everywhere, this PR
tries hard to preserve as much of the original name as possible, while
progressively truncating the longest fields to stay under the 60 char
limit.

Signed-off-by: Dave Cheney <dave@cheney.net>
davecheney added a commit to davecheney/contour that referenced this issue Nov 2, 2017
Fixes projectcontour#25

Envoy requires Name fields to be 60 characters or less. Rather than
doing the simple thing and using hashes as UUIDs everywhere, this PR
tries hard to preserve as much of the original name as possible, while
progressively truncating the longest fields to stay under the 60 char
limit.

Signed-off-by: Dave Cheney <dave@cheney.net>
@davecheney
Copy link
Contributor

@ValFadeev Hello. I think I've fixed this issue and this fix will be available in the :master tag in a few minutes. If you're using the quickstart examples from the README you can bounce your Contour pods and they will upgrade to the :master image (if you've deployed with :v0.1.0 or :latest you'll need to change to :master).

You can do this simply with

kubectl -n heptio-contour delete po -l app=contour

If this hasn't fixed the problem, please reopen the issue and I'll have another shot.

Thanks

Dave

@ValFadeev
Copy link
Author

Thanks for your quick response, really appreciated! Moved on to the next problem :)

lrouquette pushed a commit to lrouquette/contour that referenced this issue Apr 10, 2020
timeout validation; configurable SO_PRIORITY
sunjayBhatia pushed a commit that referenced this issue Jan 30, 2023
Signed-off-by: Daneyon Hansen <daneyonhansen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

2 participants