question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to add Host CRD hostname with * on Ambassador Edge Stack

See original GitHub issue

If you need to support multiple subdomains on Ambassador Edge Stack, you should be able to specify an * for the hostname as shown below.

---
apiVersion: getambassador.io/v2
kind: Host
metadata:
  name: ambassador
spec:
  hostname: '*.example.com'
  acmeProvider:
    authority: none
  ambassador_id:
  - 'ambassador-internal'
  - 'ambassador-external'

This works fine when ambassador is already fully started. Ambassador will pick up the host config and applies it. However when pods are being restarted they are unable to start with the following error

ambassador-external-jh4v6 ambassador 2020/02/06 14:47:51 kubernetes:service\|ambassador\|*\|hostname=*.example.com: ERROR: WORKER PANICKED: unable to parse requirement: invalid label value: "*.example.com": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')

I’m using following versions:

  • Ambassador Edge Stack helm chart v6.1.1
  • Ambassador Edge Stack image v1.1.0
  • AWS EKS with Kubernetes v1.14.8

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kflynncommented, Feb 28, 2020

I’m sorry to confirm that this is definitely a bug in Ambassador. The Host CRD is designed to allow for a selector that Ambassador can use later to find additional resources, and the default selector code is… uh… wrong. 😢

For the moment, you can work around this by adding

selector:
  matchLabels:
    unusedHostname=workaround

to your wildcard Host CRD spec (where really the label can be anything). Sorry for the confusion!!

0reactions
kflynncommented, Jun 14, 2020

Glad to hear it! Closing this one. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to add Host CRD hostname with * on Ambassador ...
This works fine when ambassador is already fully started. Ambassador will pick up the host config and applies it.
Read more >
The Host CRD | Edge Stack
The Host CRD The custom Host resource defines how Ambassador Edge Stack will be visible to the outside world. It collects all the...
Read more >
Upgrade Ambassador Edge Stack 1.14.2 to Ambassador ...
This guide covers migrating from Ambassador Edge Stack 1.14.2 to Ambassador Edge Stack 2.1.1. If this is not your exact situation, see the...
Read more >
Clean Ambassador Edge Stack install on GKE fails with DNS ...
Ambassador is using the hostname emissary-apiext.emissary-system.svc:443 (without the cluster.local) which should resolve fine. Doing a lookup ...
Read more >
Ingress Configuration - Declarative GitOps CD for Kubernetes
The Ambassador Edge Stack can be used as a Kubernetes ingress controller with ... Edit the argocd-server deployment to add the --rootpath=/argo-cd flag...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found