pulumi-kubernetes icon indicating copy to clipboard operation
pulumi-kubernetes copied to clipboard

Helm v3 Chart does not convert input properties to output properties

Open covik opened this issue 3 years ago • 1 comments

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

The documentation for helm.v3.Chart states all input properties are converted to output properties but that's not the case. At least in NodeJS version.

The helm.d.ts does not have any public members:

export declare class Chart extends yaml.CollectionComponentResource {
    /**
     * Create an instance of the specified Helm chart.
     * @param releaseName Name of the Chart (e.g., nginx-ingress).
     * @param config Configuration options for the Chart.
     * @param opts A bag of options that control this resource's behavior.
     */
    constructor(releaseName: string, config: ChartOpts | LocalChartOpts, opts?: pulumi.ComponentResourceOptions);
    parseChart(config: ChartOpts | LocalChartOpts, releaseName: string): pulumi.Output<{
        [key: string]: pulumi.CustomResource;
    }>;
}

I thought maybe inputs are converted at runtime but are lacking in the .d.ts file but that's not the case either.

Steps to reproduce

import * as k8s from '@pulumi/kubernetes'

const traefik = new k8s.helm.v3.Chart('ingress-controller', {
    chart: 'traefik',
    version: '10.6.2',
    fetchOpts: {
      repo: 'https://helm.traefik.io/traefik'
    }
})

console.assert(traefik.chart === 'traefik') // Assertion failed

Expected: traefik.chart to be 'traefik' Actual: traefik.chart is undefined

covik avatar Mar 09 '22 09:03 covik

The wording comes from pulumi/pulumi's docs codegen template. It does make sense to add the parameters in the outputs though.

viveklak avatar Mar 16 '22 04:03 viveklak