linkerd-multicluster helm chart and linkerd mc install fails evaluate cliVersion · Issue #14008 · linkerd/linkerd2 · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
helm template or linkerd multicluster install fails to produce manifests in case enabledPodAntiaffinity is set to true and controllers is not empty list of links.
How can it be reproduced?
git checkout version-2.18 or edge-25.4.4 or edge-25.5.1
Fixes#14008
In the linkerd-multicluster chart (or via `linkerd mc install|upgrade`),
setting `enablePodAntiAffinity: true` for specific multicluster
controllers or globally was causing the following error:
```
Error: template: linkerd-multicluster/templates/controller/pdb.yaml:12:7: executing "linkerd-multicluster/templates/controller/pdb.yaml" at <include "partials.annotations.created-by" .>: error calling include: template: linkerd-multicluster/charts/partials/templates/_metadata.tpl:2:33: executing "partials.annotations.created-by" at <.Values.cliVersion>: nil pointer evaluating interface {}.cliVersion
```
The problem was with the PodDisruptionBudget manifest not passing the
proper context to the `annotations.created-by` partials.
Also, the `nodeAffinity` setting wasn't being taken into account for
such controllers.
The output can be tested with `bin/linkerd mc install -f values.yaml`,
using this as `values.yaml` (put something that makes sense for
nodeAffinity, if you want to apply this to the cluster):
```yaml
controllers:
- link:
ref:
name: target1
enablePodAntiAffinity: true
nodeAffinity:
foo: bar
```
alpeb
7D54
linked a pull request
May 15, 2025
that will
close
this issue
Fixes#14008
In the linkerd-multicluster chart (or via `linkerd mc install|upgrade`),
setting `enablePodAntiAffinity: true` for specific multicluster
controllers or globally was causing the following error:
```
Error: template: linkerd-multicluster/templates/controller/pdb.yaml:12:7: executing "linkerd-multicluster/templates/controller/pdb.yaml" at <include "partials.annotations.created-by" .>: error calling include: template: linkerd-multicluster/charts/partials/templates/_metadata.tpl:2:33: executing "partials.annotations.created-by" at <.Values.cliVersion>: nil pointer evaluating interface {}.cliVersion
```
The problem was with the PodDisruptionBudget manifest not passing the
proper context to the `annotations.created-by` partials.
Also, the `nodeAffinity` setting wasn't being taken into account for
such controllers.
The output can be tested with `bin/linkerd mc install -f values.yaml`,
using this as `values.yaml` (put something that makes sense for
nodeAffinity, if you want to apply this to the cluster):
```yaml
controllers:
- link:
ref:
name: target1
enablePodAntiAffinity: true
nodeAffinity:
foo: bar
```
Note: Also added `multicluster/charts/**` to the changed-files actions
list, for the multicluster tests to be triggered whenever a multicluster
manifest changes.
What is the issue?
helm template
orlinkerd multicluster install
fails to produce manifests in caseenabledPodAntiaffinity
is set totrue
andcontrollers
is not empty list of links.How can it be reproduced?
and list some links:
helm template test-ld-mc -f values.yaml .
Same error is produced when tested with:
Logs, error output, etc
output of
linkerd check -o short
No kubernetes cluster used yet.
Environment
Possible solution
No response
Additional context
No response
Would you like to work on fixing this bug?
None
The text was updated successfully, but these errors were encountered: