p

    polite-napkin-90098

    6 months ago
    Hello, I'm struggling to get Values into my helm charts. I'm following the example here:https://www.pulumi.com/registry/packages/kubernetes/api-docs/helm/v3/chart/#set-chart-values My code looks like:
    _, err = helm.NewChart(ctx, "influx", helm.ChartArgs{
    			Repo: pulumi.String("influxdata"),
    			Chart: pulumi.String("influxdb2"),
    			Values: pulumi.Map{
    				"storageClass": pulumi.String("efs-stor"),
    			},
    		},
    		pulumi.ProviderMap(map[string]pulumi.ProviderResource{
    			"kubernetes": eksProvider,
    		}),)
    		if err != nil {
    			return err
    		}
    But when I run pulumi up, there is no StorageClassName set in the PVC spec:
    + kubernetes:core/v1:PersistentVolumeClaim: (create)
                [urn=urn:pulumi:influx-test::influx::kubernetes:<http://helm.sh/v3:Chart$kubernetes:core/v1:PersistentVolumeClaim::influx-influxdb2|helm.sh/v3:Chart$kubernetes:core/v1:PersistentVolumeClaim::influx-influxdb2>]
                [provider=urn:pulumi:influx-test::influx::pulumi:providers:kubernetes::eksprov::04da6b54-80e4-46f7-96ec-b56ff0331ba9]
                apiVersion: "v1"
                kind      : "PersistentVolumeClaim"
                metadata  : {
                    annotations: {
                        <http://helm.sh/resource-policy|helm.sh/resource-policy>: "keep"
                    }
                    labels     : {
                        <http://app.kubernetes.io/instance|app.kubernetes.io/instance>  : "influx"
                        <http://app.kubernetes.io/managed-by|app.kubernetes.io/managed-by>: "pulumi"
                        <http://app.kubernetes.io/name|app.kubernetes.io/name>      : "influxdb2"
                        <http://app.kubernetes.io/version|app.kubernetes.io/version>   : "2.1.1"
                        <http://helm.sh/chart|helm.sh/chart>               : "influxdb2-2.0.10"
                    }
                    name       : "influx-influxdb2"
                    namespace  : "default"
                }
                spec      : {
                    accessModes: [
                        [0]: "ReadWriteOnce"
                    ]
                    resources  : {
                        requests: {
                            storage: "50Gi"
                        }
                    }
                }
    Can anyone see what I'm doing wrong? Or is this the wrong channel for this? Should I go and speak to influx or helm?
    I wasn't making the Values map of maps correctly:
    _, err = helm.NewChart(ctx, "influx", helm.ChartArgs{
                            Repo: pulumi.String("influxdata"),
                            Chart: pulumi.String("influxdb2"),
                            Values: pulumi.Map{
                                    "persistence": pulumi.Map{
                                            "storageClass": pulumi.String("efs-stor"),
                                            "size": pulumi.String("52Gi"),
                                    },
                            },
                    },
    Works. Sorry for the SPAM