Kubernetes | 05 Dezember 2023
Upgrading the connectware-agent Helm chart
- Helm V3 installed (Helm | Installing Helm).
- kubectl installed (K8s Install Tools).
- kubectl configured with the current context pointing to your target cluster (Configure Access to Multiple Clusters).
Upgrading the connectware-agent Helm chart
Upgrading the connectware-agent Helm chart consists of the following steps:
- Picking a compatible version
- Determining the name of your connectware-agent installation
- Obtaining your values.yaml file
- Reviewing changes and adjusting Helm values
- Starting the upgrade
- Verifying the upgrade
Picking a compatible version
Agents installed using the connectware-agent Helm chart are installed in a Connectware version coupled with the Helm chart. When upgrading the Helm chart, there may be a change in the agents version.
Connectware agents need to run the same version as Connectware itself, meaning you have to update the agents version in tandem with your Connectware.
The orchestration information provided by the Helm chart is tuned towards specific versions of Connectware’s protocol-mapper agent image. You can view the correct version of the Helm chart to pick for the version of the Connectware agent by executing a Helm search for the connectware-agent Helm chart, and viewing the “APP VERSION” column.
helm search repo connectware-agent -l
If you want to make sure you don’t accidentally update to a Connectware agent version, which is incompatible with your Connectware version, we recommend you lock the version of the agents protocol-mapper image in your connectware-agent values.yaml file using the Helm value protocolMapperAgentDefaults.image.version.
Determining the name of your connectware-agent installation
To upgrade your connectware-agent installation, you need to know the name you chose upon installation. If you followed our docs, this is most likely connectware-agent, but to make sure, you can use the helm list command on your target namespace.
helm list -n <namespace>
If you are unsure, in what namespace you deployed your connectware-agent installation, you can use the helm list -A command to display all Helm installations cluster wide.
helm list -A
Once you determined the name and namespace of your installation, you can upgrade it.
Obtaining your values.yaml file
Your values.yaml file acts as a configuration file for your connectware-agent Helm installation. Ideally you should have it in a safe, versioned spot and available for operations, however, should you not have it at hand, you can also extract it from your connectware-agent Helm installation using the helm get values command.
helm get values -o yaml -n connectware-agent connectware-agent > values.yaml
Reviewing changes and adjusting Helm values
In this step you will review the Helm charts README file to review all changes noted there, that might need adjustments in your settings. You can use the helm show readme command to view them.
helm show readme cybus/connectware-agent
If nothing is mentioned for the version you are upgrading to, then there are no configuration adjustments for you to do.
Review anything you find and adjustment your configuration accordingly.
If you locked the version for the agent’s protocol-mapper image using the value protocolMapperAgentDefaults.image.version or any agent specific configuration under protocolMapperAgents, make sure to update this to the target version of your upgrade.
Starting the upgrade
To start the upgrade of your connectware-agent Helm installation, you use the command helm upgrade on it, while specifying the target version with the –version parameter and providing your values.yaml file.
helm upgrade --namespace <namespace> <installation-name> <cybus-repository>/connectware-ag
You can find additional details to this command in the Helm documentation.
Verifying the upgrade
Next, verify that all pods are restarting with the new image version. Using the command kubectl get pod, look at their AGE, verify they are in STATE Running, and report as READY.
kubectl get pod -n <namespace>
Next, head to the Connectware Admin UI and verify your agents are connected in the correct version as described in the Connectware Documentation.
Should any pods not become READY, continue with Troubleshooting agents installed with the connectware-agent Helm chart