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

Support functions deployed to other namespaces than openfass-fn #69

Conversation

nitishkumar71
Copy link
Member

@nitishkumar71 nitishkumar71 commented Oct 25, 2023

Description

Support redirect functions deployed in different namespace

Motivation and Context

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Impact to existing users

  1. follow documentation to install openfaas and ingress-operator with pro version
    https://docs.openfaas.com/reference/ssl/kubernetes-with-cert-manager/
    https://docs.openfaas.com/deployment/pro/
  2. Deploy FunctionIngress Defined below
apiVersion: openfaas.com/v1
kind: FunctionIngress
metadata:
  name: nodeinfo
  namespace: openfaas
spec:
  domain: "8761-103-178-143-208.ngrok-free.app"
  function: "nodeinfo"
  functionNamespace: "staging-fn"
  ingressType: "nginx"
  path: "/(.*)"
  1. A new ingress should be created with annotation nginx.ingress.kubernetes.io/rewrite-target: /function/nodeinfo.staging-fn/$1

image

  1. Any request sent to https://<domain>/v1/nodeinfo/ should work correctly.

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@nitishkumar71 nitishkumar71 changed the title support redirect to function deployed to other services support redirect to function deployed to other namespace excluding openfass-fn Oct 25, 2023
@nitishkumar71 nitishkumar71 changed the title support redirect to function deployed to other namespace excluding openfass-fn support redirect to function deployed to other namespace excluding openfass-fn Oct 25, 2023
@nitishkumar71 nitishkumar71 force-pushed the support_function_in_different_namespace branch from 60328a6 to 3640b79 Compare November 4, 2023 10:54
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
@nitishkumar71 nitishkumar71 force-pushed the support_function_in_different_namespace branch from 3640b79 to 3dc8da8 Compare November 5, 2023 16:29
@nitishkumar71 nitishkumar71 marked this pull request as ready for review November 5, 2023 16:38
@alexellis alexellis merged commit 315ea5b into openfaas:master Nov 20, 2023
1 check passed
@alexellis alexellis changed the title support redirect to function deployed to other namespace excluding openfass-fn Support redirect to function deployed to other namespace excluding openfass-fn Nov 20, 2023
@alexellis alexellis changed the title Support redirect to function deployed to other namespace excluding openfass-fn Support functions deployed to other namespaces than openfass-fn Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "namespace" to FunctionIngress spec
2 participants