> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/2-4-1/cybus-helm-charts/connectware-agent-helm-chart/connectware-target.md).

# Targeting Connectware for the connectware-agent Helm Chart

Agents deployed with the `connectware-agent` Helm chart connect to a Connectware installation. By default, agents are configured to connect to Connectware in the same Kubernetes namespace. Override this behavior by setting the `connectwareHost` parameter.

Follow the instructions in this guide to configure the target Connectware hostname, enable TLS for the MQTT data plane, and override advanced network parameters if needed.

## Configuring the Target Connectware Hostname

If your Connectware installation is in a different namespace or cluster, configure the `connectwareHost` parameter.

Add the following to your `values.yaml` file. Replace `${CONNECTWARE_HOSTNAME}` with the actual hostname.

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  connectwareHost: ${CONNECTWARE_HOSTNAME}
```

{% endcode %}

**Hostname formats:**

* **Different namespace in the same cluster**: Use `connectware.${NAMESPACE}` (for example, `connectware.production`).
* **Outside the Kubernetes cluster**: Use the full hostname or IP address where Connectware is reachable.

**Network access:**

In the default configuration, the following network ports on Connectware must be reachable for the agent:

* TCP/443
* TCP/1883
* TCP/4223

For detailed network requirements, see [System Requirements](/2-4-1/getting-started/system-requirements.md#connectware-agents-on-kubernetes).

For TLS verification, the exact name used in `connectwareHost` must be a Subject Alternative Names (SAN) entry in the `cybus_server.crt`, see [Server Certificates](/2-4-1/documentation/security/tls-certificates/server-certificates.md).

To override this setting for specific agents, see [Configuration Principles for the connectware-agent Helm Chart](/2-4-1/cybus-helm-charts/connectware-agent-helm-chart.md#configuration-principles-for-the-connectware-agent-helm-chart).

## Enabling TLS for the MQTT Data Plane

To enable Transport Layer Security encryption for the MQTT data plane, set the parameter `dataPlane.tls` to `true` in your `values.yaml` file:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  dataPlane:
    tls: true
```

{% endcode %}

{% hint style="warning" %}
Enabling TLS changes the MQTT data plane port and adds TCP/8883 to the required ports. Ensure this port is reachable on your Connectware installation.
{% endhint %}

## Overriding MQTT Data Plane Parameters (Advanced)

The `connectware-agent` Helm chart automatically configures MQTT data plane connection parameters based on your settings. Override these values for advanced network configurations.

### Override MQTT Data Plane Host

To override the hostname that the agent uses to connect via MQTT for data transfer, set the parameter `dataPlane.host` in your `values.yaml` file:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  dataPlane:
    host: ${MQTT_HOST}
```

{% endcode %}

Replace `${MQTT_HOST}` with the hostname on which the Connectware MQTT data plane is reachable. Within the same namespace, use `broker`.

{% hint style="warning" %}
By default, `broker` is not included in the default `cybus_server.crt` certificate. If you set a custom `dataPlane.host`, ensure that you replace the certificate and add the hostname you are setting to the certificate's Subject Alternative Names (SAN).
{% endhint %}

### Override MQTT Data Plane Port

To override the TCP port that the agent uses to connect via MQTT for data transfer, set the parameter `dataPlane.port` in your `values.yaml` file:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  dataPlane:
    port: 10883
```

{% endcode %}

## Overriding Control Streaming Server Parameters (Advanced)

### Override Control Streaming Server Host

To override the hostname that an agent uses when connecting to the Control Streaming Server, set the parameter `streamServer.host` in your `values.yaml` file:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  streamServer:
    host: ${STREAM_SERVER_HOST}
```

{% endcode %}

Replace `${STREAM_SERVER_HOST}` with the hostname on which the Control Streaming Server is reachable. Within the same namespace, use `nats`.

### Override Control Streaming Server Port

To override the TCP port that the agent uses to connect to the Control Streaming Server, set the parameter `streamServer.port` in your `values.yaml` file:

{% code title="values.yaml" lineNumbers="true" %}

```yaml
protocolMapperAgentDefaults:
  streamServer:
    port: 14222
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cybus.io/2-4-1/cybus-helm-charts/connectware-agent-helm-chart/connectware-target.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
