> 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/working-with-cybus-helm-charts/locking-chart-version.md).

# Locking Helm Chart Version in values.yaml

All Cybus Helm charts support an optional `validVersion` value that ties your `values.yaml` file to a specific chart version. When set, Helm refuses to render templates if the chart version does not match the specified value.

This prevents accidental deployments with mismatched chart versions, such as when upgrading the chart without updating your values file accordingly.

{% hint style="info" %}
The `validVersion` check is opt-in. If not set, no version validation is performed.
{% endhint %}

## How Version Locking Works

During template rendering, the chart compares `validVersion` against the chart's version. If they differ, Helm fails immediately with an error message. This provides an early signal that your values file was written for a different chart version and may need review before proceeding.

**Error message**

{% code lineNumbers="true" %}

```
Error: INSTALLATION FAILED: execution error at (...):
validVersion="3.0.0" does not match chart version 3.1.0
```

{% endcode %}

## Configuring Version Locking

* Add `validVersion` as a top-level key in your `values.yaml` file and set it to the chart version you are targeting.

**Example: connectware Helm chart**

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

```yaml
validVersion: 3.0.0

global:
  existingLicenseKeySecret: my-connectware-license
```

{% endcode %}

**Example: connectware-agent Helm chart**

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

```yaml
validVersion: 3.0.0

protocolMapperAgents:
  - name: my-agent
    connectwareHost: connectware.cybus
```

{% endcode %}

## When to Use Version Locking

Version locking is especially useful when:

* **Version control**: You maintain values files in Git and want to ensure they are updated together with chart upgrades.
* **Multi-environment deployments**: Multiple teams or environments share a common values file and you need to prevent version drift.
* **GitOps workflows**: Values files are applied automatically and an early failure is preferable to silent misconfiguration.


---

# 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/working-with-cybus-helm-charts/locking-chart-version.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.
