Skip to content

feat(connect): add tpl evaluation for extraVolumes and extraVolumeMounts#1719

Merged
josephwoodward merged 2 commits intoredpanda-data:mainfrom
pallotron:tpl_evaluation
Feb 19, 2026
Merged

feat(connect): add tpl evaluation for extraVolumes and extraVolumeMounts#1719
josephwoodward merged 2 commits intoredpanda-data:mainfrom
pallotron:tpl_evaluation

Conversation

@pallotron
Copy link
Contributor

When using the connect chart as a subchart dependency, users often need to reference ConfigMaps created by the parent chart. These ConfigMaps typically use the parent chart's fullname helper to ensure proper namespacing with the release name.

Currently, extraVolumes and extraVolumeMounts use toYaml directly, which renders values as literal strings. This forces users to hardcode ConfigMap names, creating a mismatch when the parent chart uses dynamic naming (e.g., {{ include "myapp.fullname" . }}-config).

This change wraps toYaml with tpl() to evaluate any Helm template expressions in the values before rendering. This is a common pattern used in other Helm charts for user-provided values that may contain template expressions.

Example use case - parent chart values.yaml:

  connect:
    extraVolumes:
      - name: my-config
        configMap:
          name: '{{ include "myapp.fullname" . }}-config'

The tpl function safely handles values without template expressions, so this change is backward compatible.

@CLAassistant
Copy link

CLAassistant commented Feb 3, 2026

CLA assistant check
All committers have signed the CLA.

@pallotron
Copy link
Contributor Author

@RafalKorepta @chrisseto @andrewstucki hey folks, it's been 8 days since I put this up. Is it possible to get it merged? I need this in the place I work and currently have to fork this...
Thanks! :)

Copy link
Contributor

@RafalKorepta RafalKorepta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my side it looks good. It would be good to add test.

I asked connect team to review and approve.

When using the connect chart as a subchart dependency, users often need
to reference ConfigMaps created by the parent chart. These ConfigMaps
typically use the parent chart's fullname helper to ensure proper
namespacing with the release name.

Currently, extraVolumes and extraVolumeMounts use toYaml directly,
which renders values as literal strings. This forces users to hardcode
ConfigMap names, creating a mismatch when the parent chart uses dynamic
naming (e.g., {{ include "myapp.fullname" . }}-config).

This change wraps toYaml with tpl() to evaluate any Helm template
expressions in the values before rendering. This is a common pattern
used in other Helm charts for user-provided values that may contain
template expressions.

Example use case - parent chart values.yaml:

```
  connect:
    extraVolumes:
      - name: my-config
        configMap:
          name: '{{ include "myapp.fullname" . }}-config'
```

The tpl function safely handles values without template expressions,
so this change is backward compatible.
@pallotron
Copy link
Contributor Author

From my side it looks good. It would be good to add test.

I asked connect team to review and approve.

thanks @RafalKorepta let me add something...

@pallotron
Copy link
Contributor Author

I added tests:

❯  helm unittest charts/connect

### Chart [ connect ] charts/connect

 PASS  configuration tests	charts/connect/tests/configuration_test.yaml
 PASS  deployment tests	charts/connect/tests/deployment_test.yaml
 PASS  hpa tests	charts/connect/tests/hpa_test.yaml
 PASS  ingress tests	charts/connect/tests/ingress_test.yaml
 PASS  service monitor tests	charts/connect/tests/service_monitor_test.yaml
 PASS  service tests	charts/connect/tests/service_test.yaml

@pallotron
Copy link
Contributor Author

image

@pallotron
Copy link
Contributor Author

@chrisseto @andrewstucki ping! can you review this?

@josephwoodward
Copy link
Contributor

Thank you for your contribution @pallotron, sorry it took so long for us to get around to reviewing/merging this.

@josephwoodward josephwoodward merged commit 7eb4fe8 into redpanda-data:main Feb 19, 2026
8 checks passed
@pallotron pallotron deleted the tpl_evaluation branch February 19, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants