Cybus::IngressRoute

Create secure entry points from outside Connectware to your service containers.

The Cybus::IngressRoute resource defines an external entry point (HTTPS address or TCP port) that Connectware forwards to a specific port and path in a service container (HTTP address or TCP port).

When to Use

Use Cybus::IngressRoute when your container must be reachable from outside Connectware (for example, for web dashboards, APIs, or TCP-based protocols).

Creating an IngressRoute

Properties

Property
Type
Required
Default

string

Required

string

Required (http)

object

Optional

enum

Optional

"http"

integer

Required (tcp)

integer

Required (tcp)

array

Optional

container

Reference to an already declared Cybus::Container. Use !ref <resourceID>

  • Tequired (when using http)

  • Type: string

slug

Last part of the ingress route.

  • Optional

  • Type: string

    • maximum length: 20 characters

    • All instances must conform to the following regular expression (we recommend using online validators for regular expressions such as regexr.com).

^[a-z-]+

Connectware creates a private, isolated virtual network for each installed service and assigns all its containers to this network.

  • Optional

  • Type: object

    • All items must be of the type: object with the following properties:

    Property
    Type
    Required
    Default

    path

    string

    Optional

    port

    integer

    Optional

    80

path

If specified, the proxy will rewrite the path. Use this if the base path of the target http server cannot be modified.

  • Optional

  • Type: string

port

The port of the container the proxy should point to. This must be a Docker exposed port.

  • Optional

  • Type: integer

  • Default: 80

type

Whether to forward HTTP or TCP traffic

  • Optional

  • Type: enum

  • Default: http

    • The value of this property must be equal to one of the below.

      • http

      • tcp

containerPort

The internal TCP port on the service container.

  • Required (when using tcp)

  • Type: integer

connectwarePort

The externally reachable port when establishing a TCP connection.

  • Required (when using tcp)

  • Type: integer

headers

An array of strings representing headers to be forwarded to the target container. The format of each string must be <header name>:<header value>.

Example

myServiceRoute:
  type: Cybus::IngressRoute
  properties:
    container: !ref dashboardContainer # Reference to an existing container
    slug: web # External URL will end with /web
    type: http # Can be http or tcp
    target:
      port: 80 # Container port to forward to
      path: / # Path inside the container
    headers: # Optional headers forwarded to the container
      - 'x-agent-id:welder001'
      - 'x-factory:Hamburg'

Result (HTTP)

  • If Connectware runs at 1.2.3.4 and the serviceId is abc123, then:

https://1.2.3.4/services/abc123/web/some/path
  • ...is forwarded to:

http://dashboardContainer:80/some/path
  • ...with the specified headers added to the request.

TCP Example

myTcpRoute:
  type: Cybus::IngressRoute
  properties:
    container: !ref plcContainer # Reference to an existing container
    type: tcp
    containerPort: 502 # Modbus TCP inside the container
    connectwarePort: 40001 # External port clients connect to

Result (TCP)

  • If Connectware runs at 1.2.3.4:

tcp://1.2.3.4:40001
  • ...is forwarded to:

tcp://plcContainer:502

Properties

The following table describes the properties available for Cybus::IngressRoute. Some properties are required only for HTTP or TCP routes.

Property
Type
Required
Default

string

Required

string

Required (http)

object

Optional

enum

Optional

"http"

integer

Required (tcp)

integer

Required (tcp)

array

Optional

container

Reference to an already declared Cybus::Container. Use !ref <resourceID>.

  • Required

  • Type: string

slug

The last part of the ingress route URL (HTTP only).

  • Required for HTTP routes

  • Omit for TCP routes: This parameter is ignored for TCP forwarding.

  • Type: string

    • Maximum length: 20 characters

    • Must match the following regular expression (see regexr.com for validation):

^[a-z-]+

target

  • Optional

  • Type: object

    • Properties:

Property
Type
Required
Default

path

string

Optional

port

integer

Optional

80

path

If specified, the proxy will rewrite the path. Use this if the base path of the target HTTP server cannot be changed.

  • Optional

  • Type: string

port

The port of the container the proxy should point to. This must be a Docker-exposed port.

  • Optional

  • Type: integer

  • Default: 80

type

Specifies whether to forward HTTP or TCP traffic.

  • Optional

  • Type: enum

  • Default: http

    • Allowed values:

      • http

      • tcp

containerPort

The internal TCP port on the service container.

  • Required for TCP routes

  • Type: integer

connectwarePort

The externally reachable port for TCP connections.

  • Required for TCP routes

  • Type: integer

headers

An array of strings representing headers to be forwarded to the target container. The format of each string must be <header name>:<header value>.

Last updated

Was this helpful?