Skip to content

Conversation

@alpeb
Copy link
Member

@alpeb alpeb commented Mar 17, 2025

This fixes a bug recently introduced by #13770, where installing the multicluster extension with more than one controller would result in invalid yaml:

$ bin/helm-build
$ helm template linkerd-multicluster multicluster/charts/linkerd-multicluster \
  --set controllers[0].link.ref.name=target1 --set controllers[1].link.ref.name=target2 | \
  sed -n '27,32p'

subjects:
  - kind: ServiceAccount
    name: controller-target1
    namespace: default---
kind: ServiceAccount
apiVersion: v1

The fix consists on properly tunning the whitespace handling in the rbac.yaml template.

…ller

This fixes a bug recently introduced by #13770, where installing the multicluster extension with more than one controller would result in invalid yaml:

```
$ bin/helm-build
$ helm template linkerd-multicluster multicluster/charts/linkerd-multicluster \
  --set controllers[0].link.ref.name=target1 --set controllers[1].link.ref.name=target2 | \
  sed -n '27,32p'

subjects:
  - kind: ServiceAccount
    name: controller-target1
    namespace: default---
kind: ServiceAccount
apiVersion: v1
```

The fix consists on properly tunning the whitespace handling in the rbac.yaml template.
@alpeb alpeb requested a review from a team as a code owner March 17, 2025 21:52
@olix0r
Copy link
Member

olix0r commented Mar 17, 2025

nit: subject be a 'fix', e.g.: fix(multicluster): correct Helm manifest whitespacing

@alpeb alpeb changed the title bug(multicluster): fix multicluster template for more than one controller fix(multicluster): fix multicluster template for more than one controller Mar 18, 2025
@alpeb alpeb changed the title fix(multicluster): fix multicluster template for more than one controller fix(multicluster): correct Helm manifest whitespacing Mar 18, 2025
@alpeb alpeb merged commit c7d6d1a into main Mar 18, 2025
20 checks passed
@alpeb alpeb deleted the alpeb/mc-bug-multiple-controllers branch March 18, 2025 18:59
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