Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!--Thanks for your contribution. See [CONTRIBUTING](CONTRIBUTING.md) for Pulumi's contribution guidelines. Help us merge your changes more quickly by adding more details such as labels, milestones, and reviewers.--> ### Proposed changes <!--Give us a brief description of what you've done and what it solves. --> This PR implements an MLC-based `Chart` resource as per [design doc](https://docs.google.com/document/d/1_DZlsAyG4-3BxrAkJBj8R6wIVuzhAkxRDyq8k_Zcst4/edit?usp=sharing). Notable improvements over v3:Chart: - Input schema more closely resembles v3:Release. - Performs templating in an online mode. - More control over resource ordering via annotation: `config.kubernetes.io/depends-on` - Uses [Pulumi Assets](https://www.pulumi.com/docs/concepts/assets-archives/) for supplemental files (keyring, repository opts). - Use assets as values files (`--values`) and as individual values (`--set-file`). - Use multiple values files. - Support for post-rendering w/ arguments. - OCI registry support. Detailed changes: - [pkg/helm] introduce a reusable Helm tool wrapper - [pkg/gen] define `helm.sh/v4:Chart` resource plus `v4:PostRenderer,v4:RepositoryOpts` - [provider] initialize the Helm EnvSettings based on provider configuration - [provider/helmv4] implement Chart resource provider - [provider/yamlv2] add `PreRegisterF` hook to be able to mutate child resource options, specifically `RetainOnDelete` - [provider/yamlv2] new gomega matcher: `HaveSkipAwaitAnnotation()` - [tests/testdata] new 'reference' chart for testing purposes - [misc] bugfix for kube client settings Tests: - New suite for Chart provider w/ coverage of all in-scope features - Extended tests for provider Construct RPC to cover namespacing, kube client settings, helm release settings ### Examples See the examples in the API docs: https://github.com/pulumi/pulumi-kubernetes/blob/47a6ae4fceb8339c49d4f13b5f765af798c0308b/provider/pkg/gen/examples/overlays/chartV4.md#example-usage Local Chart: ```yaml type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: ./cert-manager ``` Repository Chart: ```yaml # helm repo add bitnami https://charts.bitnami.com/bitnami type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: bitnami/cert-manager version: "1.1.0" ``` Remote Chart: ```yaml type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: cert-manager version: "1.1.0" repositoryOpts: repo: https://charts.bitnami.com/bitnami ``` OCI Chart: ```yaml type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: oci://registry-1.docker.io/bitnamicharts/cert-manager version: "1.1.0" ``` Custom Values: ```yaml type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: oci://registry-1.docker.io/bitnamicharts/cert-manager version: "1.1.0" values: installCRDs: false notes: fn::fileAsset: notes.txt valueYamlFiles: - fn::fileAsset: values.yaml ``` Chart Verification w/ Keyring: ```yaml type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: oci://registry-1.docker.io/eronwrightpulumi/cert-manager version: "1.1.0" verify: true keyring: fn::fileAsset: "public.pgp" ``` Post-Rendering: ```yaml type: kubernetes:helm.sh/v4:Chart properties: namespace: cert-manager chart: oci://registry-1.docker.io/bitnamicharts/cert-manager version: "1.1.0" postRenderer: command: ./kustomize args: [] ``` ### Related issues (optional) <!--Refer to related PRs or issues: #1234, or 'Fixes #1234' or 'Closes #1234'. Or link to full URLs to issues or pull requests in other GitHub repositories. --> Fixes #2847
- Loading branch information