Open topic with navigation

TIBCO® Control Plane 1.2.0

# Exposing Apps with Ingress Controller

You must do the following configurations to expose BWCE and Flogo apps with Ingress Controller.

## Nginx Ingress Controller

For application public endpoints to work, add `use-forwarded-headers: "true"` in the nginx configmap `ingress-nginx-controller` under namespace `ingress-nginx`.

In the `values.yaml` of `nginx-ingress` chart, add the following:

    controller:
     allowSnippetAnnotations: true

## Kong Ingress Controller

For application public endpoints to work with the Kong ingress controller, perform the following steps:

## Setting x_forwarded_prefix Header

For BWCE and Flogo, the header `x_forwarded_prefix` is needed.

To add this header, there is no direct annotation available in Kong, but you can use a plugin to add it.

Procedure

1. Update the name, namespace, and prefix path value in the plugin file.

   Sample plugin file:

       apiVersion: configuration.konghq.com/v1
       kind: KongPlugin
       metadata:
         name: x-forwarded-prefix-flgoapp-cmgoj6kbej6joak8cmmg
         namespace: dp-ns-1
       plugin: post-function
       config:
         access:
         - |
           ngx.var.upstream_x_forwarded_prefix='/tibco/apps/cmgoj6kbej6joak8cmmg/ReceiveHTTPMessageGetSharedData'

2. Create the plugin by using the following command:

       kubectl apply -f <pluginfile>

3. After the plugin is created, annotate the ingress with the plugin name. Ensure that the plugin is in the same namespace of ingress.

       annotations:
            konghq.com/plugins: x-forwarded-prefix-flgoapp-cmgoj6kbej6joak8cmmg

## Setting x_forwarded_proto and x_forwarded_port Headers

BWCE Swagger requires `x_forwarded_proto` and `x_forwarded_port` headers to have the value of the load balancer protocol and port (HTTPS and 443). The post-function plugin can be used to set these values.

Sample plugin file:

    apiVersion: configuration.konghq.com/v1
    kind: KongPlugin
    metadata:
      name: set-forwarded-header-echo
      namespace: test-kong-echo
    plugin: post-function
    config:
      access:
        - |
          ngx.var.upstream_x_forwarded_prefix='/echo/cmfg1k4gptjvfnmg6hfg'
          ngx.var.upstream_x_forwarded_proto='https'
          ngx.var.upstream_x_forwarded_port='443'

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Control Plane

Copyright © 2023-2024. Cloud Software Group, Inc. All Rights Reserved.