Hey guys,Is there an easy way to continue to overr...
# golang
a
Hey guys,Is there an easy way to continue to override values.yaml with infra.yaml in pulumi?
helm install "$infra" --values inf.yaml
Can only use the "value" function?
Copy code
package main

import (
	"<http://github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/helm/v3|github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/helm/v3>"
	"<http://github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/yaml|github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/yaml>"
	"<http://github.com/pulumi/pulumi/sdk/v3/go/pulumi|github.com/pulumi/pulumi/sdk/v3/go/pulumi>"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
         _, err = helm.NewChart(ctx, "sql-data", helm.ChartArgs{
            Chart:       pulumi.String("sql-data"),
            APIVersions: nil,
            // The optional namespace to install chart resources into.
            Namespace: pulumi.String("eshop"),

            // Overrides for chart values.
            Values: pulumi.Map{
                 ".Values.inf.sql.host": pulumi.String("sql-data-eshop"),
            },
}
b
The helm.Release resource has a values YAML input property
a
This is very useful, I'll look into it
Thanks you,@ jaxxstorm [he/him]
Copy code
fileAsset := pulumi.NewFileAsset("../k8s/helm/inf.yaml")
        _, err = helm.NewRelease(ctx, "sql-data", &helm.ReleaseArgs{
            Chart: pulumi.String("../k8s/helm/sql-data"),
            // ValueYamlFiles pulumi.AssetOrArchiveArrayOutput `pulumi:"valueYamlFiles"`
            ValueYamlFiles: pulumi.AssetOrArchiveArray{fileAsset},
            // Name:      nil,
            // Namespace: nil,
            // Values: nil,
            // Version: nil,

        })
It's worked.