8000 linkerd-multicluster helm chart and linkerd mc install fails evaluate cliVersion · Issue #14008 · linkerd/linkerd2 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

linkerd-multicluster helm chart and linkerd mc install fails evaluate cliVersion #14008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rbyt opened this issue May 9, 2025 · 0 comments · May be fixed by #14028
Open

linkerd-multicluster helm chart and linkerd mc install fails evaluate cliVersion #14008

rbyt opened this issue May 9, 2025 · 0 comments · May be fixed by #14028
Assignees
Labels

Comments

@rbyt
Copy link
rbyt commented May 9, 2025

What is the issue?

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?

  1. git checkout version-2.18 or edge-25.4.4 or edge-25.5.1
  2. change values.yaml:
enablePodAntiAffinity: true

and list some links:

controllers:
- link:
    ref:
      name: target1
  logLevel: debug
- link:
    ref:
      name: target2
  gateway:
    enabled: false
  replicas: 2
  1. Test helm template:

helm template test-ld-mc -f values.yaml .

  1. Helm outputs error message instead of manifests.

Same error is produced when tested with:

linkerd mc install --ignore-cluster -f values.yaml

Logs, error output, etc

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

output of linkerd check -o short

No kubernetes cluster used yet.

Environment

  • Host OS: macOS
  • Linkerd version:
Client version: edge-25.4.4
Server version: unavailable
  • Helm version:
version.BuildInfo{Version:"v3.17.3", GitCommit:"e4da49785aa6e6ee2b86efd5dd9e43400318262b", GitTreeState:"clean", GoVersion:"go1.23.7"}

Possible solution

No response

Additional context

No response

Would you like to work on fixing this bug?

None

@rbyt rbyt added the bug label May 9, 2025
@alpeb alpeb self-assigned this May 15, 2025
alpeb added a commit that referenced this issue May 15, 2025
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 alpeb 7D54 linked a pull request May 15, 2025 that will close this issue
alpeb added a commit that referenced this issue May 15, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0