Open ericfuxealth opened 1 year ago
Additionally, "hostname" in Host doesn't work.
The following configuration fails to work:
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: emissary-ingress-listener-8443
namespace: emissary
spec:
port: 8443
protocol: HTTPS
securityModel: SECURE
hostBinding:
namespace:
from: ALL
selector:
matchLabels:
external-hosts: "true"
---
apiVersion: getambassador.io/v3alpha1
kind: Host
metadata:
name: host-external
namespace: emissary
labels:
external-hosts: "true"
spec:
hostname: "server.example.com" <<<<<<<<< Removing this line it will work.
acmeProvider:
authority: none
tlsSecret:
name: emissary-selfsigned-cert
namespace: emissary
selector:
matchLabels:
external-mapping: "true"
---
apiVersion: getambassador.io/v2
kind: Mapping
metadata:
name: server
namespace: emissary
labels:
external-mapping: "true"
spec:
# host: "server.example.com"
prefix: /
service: server:3002
When "hostname" is removed from Host and "host" is enabled in Mapping it will start working.
Update: once I started using "apiVersion: getambassador.io/v3alpha1" for Mapping, the "hostname" field does work.
However, "hostname" field in Host still does not work.
This is the updated code:
apiVersion: getambassador.io/v3alpha1
kind: Listener
metadata:
name: emissary-ingress-listener-8443
namespace: emissary
spec:
port: 8443
protocol: HTTPS
securityModel: SECURE
hostBinding:
namespace:
from: ALL
selector:
matchLabels:
external-hosts: "true"
---
apiVersion: getambassador.io/v3alpha1
kind: Host
metadata:
name: host-external
namespace: emissary
labels:
external-hosts: "true"
spec:
hostname: "server.example.com" <<<<<<<<< Removing this line it will work.
acmeProvider:
authority: none
tlsSecret:
name: emissary-selfsigned-cert
namespace: emissary
selector:
matchLabels:
external-mapping: "true"
---
apiVersion: getambassador.io/v3alpha1
kind: Mapping
metadata:
name: server
namespace: emissary
labels:
external-mapping: "true"
spec:
hostname: "server.example.com" <<<<<<<<< This works after removing hostname from Host
prefix: /
service: server:3002
Describe the bug Using "hostname" in mapping does not work, but "host" works.
To Reproduce Steps to reproduce the behavior:
helm install -n emissary --create-namespace \ emissary-ingress datawire/emissary-ingress && \ kubectl rollout status -n emissary deployment/emissary-ingress -w
apiVersion: apps/v1 kind: Deployment metadata: name: emissary-ingress-agent namespace: default labels: app.kubernetes.io/name: emissary-ingress-agent helm.sh/chart: emissary-ingress-8.3.0 app.kubernetes.io/instance: emissary-ingress app.kubernetes.io/part-of: emissary-ingress app.kubernetes.io/managed-by: Helm product: aes spec: ... spec: serviceAccountName: emissary-ingress-agent containers:
name: agent image: docker.io/emissaryingress/emissary:3.1.0 ... apiVersion: apps/v1 kind: Deployment metadata: name: emissary-ingress namespace: default labels: app.kubernetes.io/name: emissary-ingress helm.sh/chart: emissary-ingress-8.3.0 app.kubernetes.io/instance: emissary-ingress app.kubernetes.io/part-of: emissary-ingress app.kubernetes.io/managed-by: Helm product: aes spec: replicas: 3 selector: matchLabels: app.kubernetes.io/name: emissary-ingress app.kubernetes.io/instance: emissary-ingress strategy: type: RollingUpdate
progressDeadlineSeconds: 600 template: metadata: labels: app.kubernetes.io/name: emissary-ingress helm.sh/chart: emissary-ingress-8.3.0 app.kubernetes.io/instance: emissary-ingress app.kubernetes.io/part-of: emissary-ingress app.kubernetes.io/managed-by: Helm product: aes profile: main ... containers:
Expected behavior Routing using the mapping should work.
Versions (please complete the following information):
Additional context Add any other context about the problem here.