-
Notifications
You must be signed in to change notification settings - Fork 530
Labels
help wantedExtra attention is neededExtra attention is neededkind/bugSomething isn't workingSomething isn't working
Milestone
Description
Description:
Hi, we have an issue with backend object when trying to set the hostname with subdomain that has single character in it. For example if we set the hostname to this subdomain backend.s.collector.example.com
it will trigger this error
The Backend "backend" is invalid: spec.endpoints[0].fqdn.hostname: Invalid value: "backend.s.collector.example.com": spec.endpoints[0].fqdn.hostname in body should match '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*$'
However when we set it to backend.staging.collector.example.com
there's no issue
Is the regex is expected to not allow subdomain with single character?
gateway/api/v1alpha1/backend_types.go
Lines 97 to 98 in a383dd9
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9]))*$` | |
Hostname string `json:"hostname"` |
Example manifest
apiVersion: gateway.envoyproxy.io/v1alpha1
kind: Backend
metadata:
name: backend
namespace: envoy-gateway-system
spec:
endpoints:
- fqdn:
hostname: backend.s.collector.example.com
port: 80
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededkind/bugSomething isn't workingSomething isn't working