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

Unable to Create Duplicate HTTP Trigger Names Across Different Namespaces #2911

Open
thoma01 opened this issue Jan 31, 2024 · 1 comment
Open

Comments

@thoma01
Copy link

thoma01 commented Jan 31, 2024

Fission/Kubernetes version

$ fission version client: fission/core: BuildDate: "2023-11-30T15:47:54Z" GitCommit: 9b57f1f Version: v1.20.0 server: fission/core: BuildDate: "2023-11-30T15:47:54Z" GitCommit: 9b57f1f Version: v1.20.0 $ kubectl version Client Version: v1.28.3 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.27.4

Kubernetes platform (e.g. Google Kubernetes Engine)

minikube version: v1.31.2
commit: fd7ecd9c4599bef9f04c0986c4a0187f98a4396e

Describe the bug

When attempting to create an HTTP trigger (route) with the same name and URL in a different namespace using the Fission CLI, an error is encountered stating that a route with the same host, URL, and method already exists. This suggests that the uniqueness check is not considering the namespace, which should allow for the same route names to be used in different namespaces.

To Reproduce

  1. Create a function and a route in the default namespace:
    fission function create --name myfunction --env nodejs --code hello.js
    fission route create --name myroute --function myfunction --url /myfunction --method GET
    
  2. Create another function with the same name in a different namespace (mynamespace):
    fission function create --name myfunction --env nodejs --code hello.js --namespace mynamespace
    
  3. Attempt to create a route with the same name as the one in the default namespace for the function in mynamespace:
    fission route create --name myroute --function myfunction --url /myfunction --method GET --namespace mynamespace
    
  4. The error message is displayed:
    Error: Error while creating HTTP Trigger: HTTPTrigger with same Host, URL & method already exists (hello)
    

Expected result

Routes with the same name and URL should be creatable in different namespaces without conflict, following Kubernetes' namespace isolation principles.

Actual result

The attempt to create a route with the same name in a different namespace results in the following error message:
Error: Error while creating HTTP Trigger: HTTPTrigger with same Host, URL & method already exists (hello)

This issue hinders the management of multi-tenant environments within a Kubernetes cluster, where namespace isolation is critical for different tenants to use the same function names and routes.

@soharab-ic
Copy link
Contributor

soharab-ic commented May 14, 2024

@thoma01
Creating routes with same name across different namespaces are allowed. However, creating routes with same URL across different namespaces are not supported.

$ fission route list
NAME  METHOD URL     FUNCTION(s) INGRESS HOST PATH    TLS ANNOTATIONS NAMESPACE
hello [GET]  /hello1 hello-go    false   *    /hello1                 default
$ fission route list -n hello
NAME  METHOD URL    FUNCTION(s) INGRESS HOST PATH   TLS ANNOTATIONS NAMESPACE
hello [GET]  /hello hello-go    false   *    /hello                 hello

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants