# Configuring Agents with the connectware-agent Helm Chart

## Prerequisites

* Helm V3 installed ([Helm | Installing Helm](https://helm.sh/docs/intro/install/)).
* `kubectl` installed ([Install Tools](https://kubernetes.io/docs/tasks/tools/)).
* `kubectl` configured with the current context pointing to your target cluster ([Configure Access to Multiple Clusters](https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/)).

You can configure your Connectware agents deployed through the `connectware-agent` Helm chart by adjusting Helm values in your `values.yaml` file and re-applying it using a Helm upgrade.

**Example**

{% code lineNumbers="true" %}

```yaml
helm upgrade -i connectware-agent cybus/connectware-agent -f values.yaml -n <namespace>
```

{% endcode %}

If you need help starting out with a `values.yaml` file, the [Installing Connectware agents using the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/installing-connectware-agents-using-the-connectware-agent-helm-chart).

In our examples we will explain the parameters in the `protocolMapperAgents` Helm context, but unless otherwise noted they are also available to configure through `protocolMapperAgentDefaults` as mentioned in [Configuration principles for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuration-principle-for-the-connectware-agent-helm-chart).

Connectware’s agents are part of a Kubernetes StatefulSet. If any of them are not in the state “running” when you execute `helm upgrade`, you will need to manually delete the pod afterwards, for an updated pod to be scheduled.

## Available Helm Values

### Root-Level Helm Values

These values are on the root level of your `values.yaml` file.

| Helm value                  | Description                                                                                                                 | Discussed in                                                                                                                                                                                                                                                                                      |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| licenseKey                  | A valid license for Connectware                                                                                             | [Installing Connectware agents using the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/installing-connectware-agents-using-the-connectware-agent-helm-chart)                                                                                |
| protocolMapperAgentDefaults | This set of configuration values is applied to all agents, unless they override specific values                             | [Configuration principles for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuration-principle-for-the-connectware-agent-helm-chart)                                                                                               |
| protocolMapperAgents        | A collection of Connectware agents to be deployed. Each collection entry can contain configuration to override the defaults | [Configuration principles for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuration-principle-for-the-connectware-agent-helm-chart)                                                                                               |
| fullnameOverride            | Override the full name of this installation, which is used as a name prefix. Use „“ to remove prefixing                     | [Controlling the name of Kubernetes objects for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/controlling-the-name-of-kubernetes-objects-for-the-connectware-agent-helm-chart) |
| nameOverride                | Override the chart name of this installation, which is used as part of the name prefix                                      | [Controlling the name of Kubernetes objects for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/controlling-the-name-of-kubernetes-objects-for-the-connectware-agent-helm-chart) |

### protocolMapperAgentDefaults Helm Values

These values are within the `protocolMapperAgentDefaults` section and control the behavior of all deployed agents.

| Helm value                   | Description                                                                                                            | Discussed in                                                                                                                                                                                                                                                                                                                |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| connectwareHost              | DNS name under which the Connectware installation is available to the agent                                            | [Configuring target Connectware for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-target-connectware-for-the-connectware-agent-helm-chart)                                                   |
| image.name                   | The name of the container image used for the agent                                                                     | [Configuring image name and version for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-image-name-and-version-for-the-connectware-agent-helm-chart)                                           |
| image.version                | Container version or tag used for the agent                                                                            | [Configuring image name and version for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-image-name-and-version-for-the-connectware-agent-helm-chart)                                           |
| image.registry               | Container image registry to be used for the agent. Set to „“ to not specify a registry                                 | [Using a custom image registry for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-a-custom-image-registry-for-the-connectware-agent-helm-chart)                                                     |
| image.pullPolicy             | Kubernetes imagePullPolicy used for the agent. One of: Always, Never, IfNotPresent                                     | [Configuring image pull policy for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-image-pull-policy-for-the-connectware-agent-helm-chart)                                                     |
| image.pullSecrets            | A collection of objects containing Kubernetes imagePullSecrets with a `name` attribute, to be used by the agent        | [Using a custom image registry for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-a-custom-image-registry-for-the-connectware-agent-helm-chart)                                                     |
| tls.ca.certChain             | The Certificate Authority certificate chain as a literal PEM encoded string                                            | [Using Mutual Transport Layer Security (mTLS) for agents with the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-mutual-transport-layer-security-mtls-for-agents-with-the-connectware-agent-helm-chart) |
| tls.ca.existingConfigMap     | An existing Kubernetes ConfigMap containing the Certificate Authority certificate chain in a file named ca-chain.pem   | [Using Mutual Transport Layer Security (mTLS) for agents with the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-mutual-transport-layer-security-mtls-for-agents-with-the-connectware-agent-helm-chart) |
| mTLS.enabled                 | Define if mTLS (Certificate Authentication) is enabled                                                                 | [Using Mutual Transport Layer Security (mTLS) for agents with the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-mutual-transport-layer-security-mtls-for-agents-with-the-connectware-agent-helm-chart) |
| dataPlane.tls                | Define if TLS (Transport Encryption) is enabled for the data plane                                                     | [Configuring target Connectware for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-target-connectware-for-the-connectware-agent-helm-chart)                                                   |
| dataPlane.host               | Override the default host for the data MQTT connection                                                                 | [Configuring target Connectware for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-target-connectware-for-the-connectware-agent-helm-chart)                                                   |
| dataPlane.port               | Override the default port for the data MQTT connection                                                                 | [Configuring target Connectware for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-target-connectware-for-the-connectware-agent-helm-chart)                                                   |
| streamServer.host            | Override the default host for the control-plane MQTT connection                                                        | [Configuring target Connectware for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-target-connectware-for-the-connectware-agent-helm-chart)                                                   |
| streamServer.port            | Override the default port for the control-plane MQTT connection                                                        | [Configuring target Connectware for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-target-connectware-for-the-connectware-agent-helm-chart)                                                   |
| persistence.accessMode       | The Kubernetes AccessMode to request for the persistent volume. One of: ReadWriteOnce, ReadWriteMany, ReadWriteOncePod | [Configuring agent persistence for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-agent-persistence-for-the-connectware-agent-helm-chart)                                                     |
| persistence.size             | A Kubernetes Quantity to request as size for the persistent volume                                                     | [Configuring agent persistence for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-agent-persistence-for-the-connectware-agent-helm-chart)                                                     |
| persistence.storageClassName | The name of the Kubernetes StorageClass to request for the persistent volume                                           | [Configuring agent persistence for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-agent-persistence-for-the-connectware-agent-helm-chart)                                                     |
| podAntiAffinity              | Define what type of podAntiAffinity to use for the agent. One of: none, soft, hard                                     | [Configuring podAntiAffinity for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-podantiaffinity-for-the-connectware-agent-helm-chart)                                                         |
| podAntiAffinityOptions       | Define configuration values specific to podAntiAffinity                                                                | [Configuring podAntiAffinity for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-podantiaffinity-for-the-connectware-agent-helm-chart)                                                         |
| resources.requests.cpu       | Kubernetes Quantity that describes the agents CPU requests                                                             | [Configuring compute resources for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-compute-resources-for-the-connectware-agent-helm-chart)                                                     |
| resources.requests.memory    | Kubernetes Quantity that describes the agents memory requests                                                          | [Configuring compute resources for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-compute-resources-for-the-connectware-agent-helm-chart)                                                     |
| resources.limits.cpu         | Kubernetes Quantity that describes the agents CPU limits                                                               | [Configuring compute resources for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-compute-resources-for-the-connectware-agent-helm-chart)                                                     |
| resources.limits.memory      | Kubernetes Quantity that describes the agents memory limits                                                            | [Configuring compute resources for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-compute-resources-for-the-connectware-agent-helm-chart)                                                     |
| env                          | A collection of objects with `name` and `value` describing environment variables passed to the agent                   | [Configuring environment variables for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-environment-variables-for-the-connectware-agent-helm-chart)                                             |
| annotations                  | A set of Kubernetes annotations to be added to all agent resources                                                     | [Configuring environment variables for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-environment-variables-for-the-connectware-agent-helm-chart)                                             |
| labels                       | A set of Kubernetes labels to be added to all agent resources                                                          | [Configuring labels and annotations for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-labels-and-annotations-for-the-connectware-agent-helm-chart)                                           |
| podAnnotations               | A set of Kubernetes annotations to be added to the agent pod only                                                      | [Configuring labels and annotations for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-labels-and-annotations-for-the-connectware-agent-helm-chart)                                           |
| podLabels                    | A set of Kubernetes labels to be added to the agent pod only                                                           | [Configuring labels and annotations for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-labels-and-annotations-for-the-connectware-agent-helm-chart)                                           |
| nodeSelector                 | A set of Kubernetes labels a node must have for the agent to be scheduled on it                                        | [Assigning agents to Kubernetes nodes for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/assigning-agents-to-kubernetes-nodes-for-the-connectware-agent-helm-chart)                                       |
| securityContext              | Define the Kubernetes SecurityContext for the agent                                                                    | [Configuring security context for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-security-context-for-the-connectware-agent-helm-chart)                                                       |
| podSecurityContext           | Define the Kubernetes SecurityContext for the agents pod                                                               | [Configuring security context for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-security-context-for-the-connectware-agent-helm-chart)                                                       |
| service.annotations          | A set of Kubernetes annotations to be added to the agents service only                                                 | [Configuring labels and annotations for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-labels-and-annotations-for-the-connectware-agent-helm-chart)                                           |
| service.labels               | A set of Kubernetes labels to be added to the agents service only                                                      | [Configuring labels and annotations for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/configuring-labels-and-annotations-for-the-connectware-agent-helm-chart)                                           |

### protocolMapperAgents Helm Values

These values are within the `protocolMapperAgents` section, which is a list of agents you want to deploy and are configured per entry for an agent. See [Configuration principles for the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuration-principle-for-the-connectware-agent-helm-chart) for details. Additionally to the values listed here, all values under `protocolMapperAgentDefaults` are available per-agent.

| Helm value          | Description                                                                                              | Discussed in                                                                                                                                                                                                                                                                                                                |
| ------------------- | -------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                | The name of the Connectware agent. If you use mTLS this must match the certificates CN/SAN               | [Installing Connectware agents using the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/installing-connectware-agents-using-the-connectware-agent-helm-chart)                                                                                                          |
| mTLS.keyPair.cert   | The mTLS certificate chain as a literal PEM encoded string                                               | [Using Mutual Transport Layer Security (mTLS) for agents with the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-mutual-transport-layer-security-mtls-for-agents-with-the-connectware-agent-helm-chart) |
| mTLS.keyPair.key    | The mTLS private key as a literal PEM encoded string                                                     | [Using Mutual Transport Layer Security (mTLS) for agents with the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-mutual-transport-layer-security-mtls-for-agents-with-the-connectware-agent-helm-chart) |
| mTLS.existingSecret | An existing Kubernetes Secret containing the mTLS certificate and key in files named tls.crt and tls.key | [Using Mutual Transport Layer Security (mTLS) for agents with the connectware-agent Helm chart](https://docs.cybus.io/2-0-6/documentation/agents/agents-in-kubernetes/configuring-agents-with-the-connectware-agent-helm-chart/using-mutual-transport-layer-security-mtls-for-agents-with-the-connectware-agent-helm-chart) |
