Skip to content

Commit abf7609

Browse files
author
Andreas Fuchs
committed
Re-instate the config buffer
In my zeal to "simplify" the bytes.Buffer creation, I mistakenly replaced this use of NewBuffer with actual data. It needs to be there, so add it back.
1 parent c18ec94 commit abf7609

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/pulumi-resource-linkerd-link/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ func (k *linkerdLinkProvider) linkOtherCluster(ctx context.Context, urn resource
327327

328328
clusterName := inputs["from_cluster_name"].StringValue()
329329
linkerdVersion := inputs["control_plane_image_version"].StringValue()
330-
_, err = k.runMulticluster(ctx, urn, []string{
330+
config, err := k.runMulticluster(ctx, urn, []string{
331331
"--kubeconfig",
332332
f.Name(),
333333
"link",
@@ -348,7 +348,7 @@ func (k *linkerdLinkProvider) linkOtherCluster(ctx context.Context, urn resource
348348
defer os.Remove(to.Name())
349349

350350
kc := exec.Command("kubectl", "--kubeconfig", to.Name(), "apply", "-f", "-")
351-
kc.Stdin = &bytes.Buffer{}
351+
kc.Stdin = bytes.NewBuffer([]byte(config))
352352
kc.Stdout = &logWriter{ctx, k.host, urn, diag.Info}
353353
kc.Stderr = &logWriter{ctx, k.host, urn, diag.Warning}
354354
err = kc.Run()

0 commit comments

Comments
 (0)