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

# Locking Helm Chart Version in values.yaml

Lock your values file to a specific Helm chart version to prevent accidental upgrades or version mismatches.

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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cybus.io/2-6-1/cybus-helm-charts/working-with-cybus-helm-charts/locking-chart-version.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
