11/12/2020, 5:42 PM
Hi all, I am fighting with the right format to pass in a config setting for a Helm Chart I am deploying using Pulumi and I hope someone can help me out. We use Pulumi to bootstrap all core components which includes ArgoCD which will then deploy services developed by our teams. ArgoCD allows the configuration of private Gitrepos via Helm Values. You can find an example of the expected syntax here:
repositories: |
      - url:
          name: secret-name
          key: sshPrivateKey
In Pulumi I use the following code to deploy the ArgoCD chart and try to pass in the relevant configuration for the repositories as part of the values. The values are defined in Javascript Object notation and I don't know how I can define the configration in the expected literal YAML block scalar format...
const argocdChart = new k8s.helm.v3.Chart(
    chart: 'argo-cd',
    namespace: 'argocd',
    version: '2.9.3',
    fetchOpts: {
      repo: '<>'
    values: {
      configs: {
        secret: {
          argocdServerAdminPassword: config.argocd.passwordHash
      server: {
        config: {
          'application.instanceLabelKey': '<|>', 
          repositories: `
            - url: "<>"
                name: "${argocdGitHubTokenSecretName}", 
                key: "password"
                name: "${argocdGitHubTokenSecretName}", 
                key: "username"`,
    provider: cluster.provider,
    dependsOn: [certmanager]
I tried different solutions (e.g. Raw string
as you see above or just using js object notation), but somehow nothing so far worked and I am stuck right now 😞 I know this is basically more a Typescript / Javascript question, but I hope someone of you has the right tip. Thanks, Andreas


11/12/2020, 5:45 PM
It's because you're trying to get around the YAML anchors, luckily, JSON is also valid YAML, so I do this create an object: use
to encode that object:


11/12/2020, 7:48 PM
wow, thx @billowy-army-68599 this was exactly what I was looking for 😉
anf thinking about it, pretty straight forward 😉 cool