openfaas / faas

OpenFaaS - Serverless Functions Made Simple
https://www.openfaas.com
MIT License
25.17k stars 1.94k forks source link

Istio support request #1554

Closed kpiyush17 closed 4 years ago

kpiyush17 commented 4 years ago

My actions before raising this issue

Hi, I have deployed openfaas in Kubernetes with istio enabled. I have deployed the gateways and virtualservice also.

Openfaas deploy command:

helm upgrade openfaas --install openfaas/openfaas \
    --namespace openfaas  \
    --set functionNamespace=openfaas-fn \
    --set generateBasicAuth=true \
    --set gateway.replicas=2 \
    --set faasIdler.dryRun=false \
    --set async=false

I have exposed the gateway using istio-ingressgateway. However, I am getting 404 errors while accessing /system/function/<function-name> endpoint. I checked another endpoint /system/functions and it is working fine.

Is the 404 expected? Do, I have to add some other route?

Virtualservice:

---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: openfaasgw
spec:
  hosts:
  - "openfaas.example.com"
  - "gateway.openfaas.svc.cluster.local"
  - "prometheus.openfaas.svc.cluster.local"
  gateways:
  - openfaas-gateway
  http:
  - match:
    - uri:
        prefix: /metrics
    route:
    - destination:
        host: prometheus.openfaas.svc.cluster.local
        port:
          number: 9090
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        host: gateway.openfaas.svc.cluster.local
        port:
          number: 8080

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

If using Swarm, run the following and include the output:

curl -sLS https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh | bash

Next steps

You may join Slack for community support.

alexellis commented 4 years ago

Hi I believe that OpenFaaS is still working as expected due to the end to end tests, so if that's the case then you'll need to work on your Istio config and seek help from their community or an Istio expert.

If you can demonstrate an issue without Istio then we can look at that straight away.

Alex

alexellis commented 4 years ago

/set title: Istio support request

kpiyush17 commented 4 years ago

@alexellis Thanks for the response. Found the issue. I was checking it wrong.

However, I had one more issue related to invocation count always showing 0 both in UI and the /system/function/<function-name> and /system/functions endpoint. Can you help me with this?

alexellis commented 4 years ago

What happens when you append ".openfaas-fn" to the URL?

kpiyush17 commented 4 years ago

@alexellis Which URL? Are you referring to invocation count issue?

alexellis commented 4 years ago

I'm going to close this issue. The invocation count is an edge case with the UI. I'll link you to the issue and PR for that. I'd also recommend you join Slack for support.

alexellis commented 4 years ago

/msg: slack

derek[bot] commented 4 years ago

-- Join Slack to connect with the community https://docs.openfaas.com/community