red-area-47037
11/12/2020, 5:42 PMrepositories: |
- url: git@github.com:group/repo.git
sshPrivateKeySecret:
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(
'argocd',
{
chart: 'argo-cd',
namespace: 'argocd',
version: '2.9.3',
fetchOpts: {
repo: '<https://argoproj.github.io/argo-helm>'
},
values: {
configs: {
secret: {
argocdServerAdminPassword: config.argocd.passwordHash
}
},
server: {
config: {
'application.instanceLabelKey': '<http://argocd.argoproj.io/instance|argocd.argoproj.io/instance>',
repositories: `
- url: "<https://github.com/mycorp/myprivaterepo>"
passwordSecret:
name: "${argocdGitHubTokenSecretName}",
key: "password"
usernameSecret:
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,
Andreasbillowy-army-68599
11/12/2020, 5:45 PMJSON.stringify
to encode that object: https://github.com/lbrlabs/pulumi-homelab/blob/master/argocd/index.ts#L55red-area-47037
11/12/2020, 7:48 PM