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

Ingress no longer functions #5451

Open
darkn3rd opened this issue Nov 21, 2023 · 2 comments
Open

Ingress no longer functions #5451

darkn3rd opened this issue Nov 21, 2023 · 2 comments
Labels
a:docs Issue relates to documentation t:bug Something isn't working

Comments

@darkn3rd
Copy link

Describe the bug

The ingress resource is not functional it seems, emissary-ingress does not capture any changes needed. If there are any other requirements outside of the ingress, it is not documented at https://www.getambassador.io/docs/emissary/latest/topics/running/ingress-controller#when-and-how-to-use-the-ingress-resource

To Reproduce
Steps to reproduce the behavior:

  1. Install an ingress resource for a service that supports HTTP, e.g.
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: dg-dgraph-ingress
      annotations:
        kubernetes.io/ingress.class: ambassador
    spec:
      ingressClassName: ambassador
      rules:
        - http:
            paths:
              - backend:
                  service:
                    name:  dg-dgraph-alpha
                    port:
                      number: 8080
                pathType: ImplementationSpecific
                path: /
          host: dgraph.local
  2. Either update DNS record or /etc/hosts with emissary-ingress LB address
    export DGRAPH_HOSTNAME_HTTP="dgraph.local"
    export SERVICE_IP=$(kubectl get svc emissary-ingress \
      --namespace emissary \
      --output jsonpath='{.status.loadBalancer.ingress[0].ip}'
    )
    
    sudo sh -c "echo ${SERVICE_IP} ${DGRAPH_HOSTNAME_HTTP} >> /etc/hosts"
  3. Attempt to reach the address
    curl -siv dgraph.local/state

Expected behavior

I would expect when accessing the endpoint using the hostname, e.g. dgraph.local, that I would get a response from the server. This means that emissary-ingress would scan for the ingress resource, make the appropriate configurations, and communicate this in the logs. But not of these seems to be happening.

When I try to configure something similar using Listerner, Host, and Mapping, this works fine.

Versions (please complete the following information):

  • Ambassador: 3.9.1
  • Kubernetes environment GKE v1.27.3-gke.100

Additional context

export DGRAPH_ALLOW_LIST="0.0.0.0/0" 
export DGRAPH_RELEASE_NAME="dg"
helm repo add dgraph https://charts.dgraph.io
helm update
helm install $DGRAPH_RELEASE_NAME dgraph/dgraph \
  --namespace dgraph \
  --create-namespace \
  --values -  <<EOF
zero:
  persistence:
    storageClass: premium-rwo
    size: 10Gi
alpha:
  configFile:
    config.yaml: |
      security:
        whitelist: ${DGRAPH_ALLOW_LIST}
  persistence:
    storageClass: premium-rwo
    size: 30Gi
EOF
@darkn3rd
Copy link
Author

darkn3rd commented Nov 21, 2023

This is also minimal steps using Apache HTTPd

# deploy application 
kubectl create namespace "ingress-test"
kubectl create deployment httpd \
  --image "httpd" \
  --replicas 3 \
  --port 80 \
  --namespace "ingress-test"

# create proxy to deployment
kubectl expose deployment httpd \
  --port 80 \
  --target-port 80 \
  --type ClusterIP \
  --namespace "ingress-test"

# provision application load balancer
kubectl create ingress httpd-ingress \
  --rule "ingress.test/=httpd:80" \
  --annotation "kubernetes.io/ingress.class=ambassador" \
  --class "ambassador" \
  --namespace "ingress-test"

export SERVICE_IP=$(kubectl get svc emissary-ingress \
  --namespace emissary \
  --output jsonpath='{.status.loadBalancer.ingress[0].ip}'
)

sudo sh -c "echo ${SERVICE_IP} ingress.test >> /etc/hosts"

curl ingress.test

@cindymullins-dw cindymullins-dw added a:docs Issue relates to documentation t:bug Something isn't working labels Dec 1, 2023
@darkn3rd
Copy link
Author

darkn3rd commented Apr 6, 2024

I hope someone can look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:docs Issue relates to documentation t:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants