Hi, I’m installing the linkerd helm chart which re...
# kubernetes
m
Hi, I’m installing the linkerd helm chart which requires one of the values to be a multiline string, but I can’t see how to do that using Pulumi. I’m using TypeScript. What is the proper way to do this?
b
can you link me to the chart?
you should be able to use a string literal:
Copy code
foo = `a
multiline
string
`
Copy code
values = {
  bar: foo
}
but if it uses YAML anchors there's another trick
a
@mysterious-portugal-46322 When it comes to helm and/or kubernetes manifests, I find that this tool can help. https://www.pulumi.com/blog/introducing-kube2pulumi/ If you can find the kubernetes yaml configmap example, it can help you craft the correct TS.
Copy code
apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns-custom
  namespace: kube-system
data:
  log.override: |
        log
  test.server: |
    <http://example.com:53|example.com:53> {
        errors
        cache 30
        rewrite stop name exact <http://example.com|example.com> example-svc.default.svc.cluster.local
        forward .  10.0.0.10
    }
becomes this
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as kubernetes from "@pulumi/kubernetes";

const kube_systemCoredns_customConfigMap = new kubernetes.core.v1.ConfigMap("kube_systemCoredns_customConfigMap", {
    apiVersion: "v1",
    kind: "ConfigMap",
    metadata: {
        name: "coredns-custom",
        namespace: "kube-system",
    },
    data: {
        "log.override": "log\n",
        "test.server": `<http://example.com:53|example.com:53> {
        errors
        cache 30
        rewrite stop name exact <http://example.com|example.com> example-svc.default.svc.cluster.local
        forward .  10.0.0.10
    }
`,
    },
});
👍 1
Notice the mult-line yaml string that is the
test.server
data
m
thks for the help