Unable to add Host CRD hostname with * on Ambassador Edge Stack
See original GitHub issueIf 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:
- Created 4 years ago
- Reactions:5
- Comments:6 (3 by maintainers)
Top GitHub Comments
I’m sorry to confirm that this is definitely a bug in Ambassador. The
Host
CRD is designed to allow for aselector
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
to your wildcard
Host
CRDspec
(where really the label can be anything). Sorry for the confusion!!Glad to hear it! Closing this one. 🙂