import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../../types/input"; import * as outputs from "../../types/output"; /** * A `Release` is an instance of a chart running in a Kubernetes cluster. A `Chart` is a Helm package. It contains all the * resource definitions necessary to run an application, tool, or service inside a Kubernetes cluster. * * This resource models a Helm Release as if it were created by the Helm CLI. The underlying implementation embeds Helm as * a library to perform the orchestration of the resources. As a result, the full spectrum of Helm features are supported * natively. * * You may also want to consider the `Chart` resource as an alternative method for managing helm charts. For more information about the trade-offs between these options see: [Choosing the right Helm resource for your use case](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/choosing-the-right-helm-resource-for-your-use-case) * * ## Example Usage * ### Local Chart Directory * * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const nginxIngress = new k8s.helm.v3.Release("nginx-ingress", { * chart: "./nginx-ingress", * }); * ``` * ### Remote Chart * * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const nginxIngress = new k8s.helm.v3.Release("nginx-ingress", { * chart: "nginx-ingress", * version: "1.24.4", * repositoryOpts: { * repo: "https://charts.helm.sh/stable", * }, * }); * ``` * ### Set Chart Values * * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const nginxIngress = new k8s.helm.v3.Release("nginx-ingress", { * chart: "nginx-ingress", * version: "1.24.4", * repositoryOpts: { * repo: "https://charts.helm.sh/stable", * }, * values: { * controller: { * metrics: { * enabled: true, * } * } * }, * }); * ``` * ### Deploy Chart into Namespace * * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const nginxIngress = new k8s.helm.v3.Release("nginx-ingress", { * chart: "nginx-ingress", * version: "1.24.4", * namespace: "test-namespace", * repositoryOpts: { * repo: "https://charts.helm.sh/stable", * }, * }); * ``` * * ### Depend on a Chart resource * * ```typescript * import * as k8s from "@pulumi/kubernetes"; * * const nginxIngress = new k8s.helm.v3.Release("nginx-ingress", { * chart: "nginx-ingress", * version: "1.24.4", * namespace: "test-namespace", * repositoryOpts: { * repo: "https://charts.helm.sh/stable", * }, * skipAwait: false, * }); * * // Create a ConfigMap depending on the Chart. The ConfigMap will not be created until after all of the Chart * // resources are ready. Notice skipAwait is set to false above. This is the default and will cause Helm * // to await the underlying resources to be available. Setting it to true will make the ConfigMap available right away. * new k8s.core.v1.ConfigMap("foo", { * metadata: {namespace: namespaceName}, * data: {foo: "bar"} * }, {dependsOn: nginxIngress}) * ``` * ### Specify Helm Chart Values in File and Code * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as k8s from "@pulumi/kubernetes"; * import {FileAsset} from "@pulumi/pulumi/asset"; * * const release = new k8s.helm.v3.Release("redis", { * chart: "redis", * repositoryOpts: { * repo: "https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami", * }, * valueYamlFiles: [new FileAsset("./metrics.yml")], * values: { * cluster: { * enabled: true, * }, * rbac: { * create: true, * } * }, * }); * * // -- Contents of metrics.yml -- * // metrics: * // enabled: true * ``` * ### Query Kubernetes Resource Installed By Helm Chart * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as k8s from "@pulumi/kubernetes"; * import {FileAsset} from "@pulumi/pulumi/asset"; * * const redis = new k8s.helm.v3.Release("redis", { * chart: "redis", * repositoryOpts: { * repo: "https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami", * }, * values: { * cluster: { * enabled: true, * }, * rbac: { * create: true, * } * }, * }); * * // srv will only resolve after the redis chart is installed. * const srv = k8s.core.v1.Service.get("redis-master-svc", pulumi.interpolate`${redis.status.namespace}/${redis.status.name}-master`); * export const redisMasterClusterIP = srv.spec.clusterIP; * ``` * * ## Import * * An existing Helm Release resource can be imported using its `type token`, `name` and identifier, e.g. * * ```sh * $ pulumi import kubernetes:helm.sh/v3:Release myRelease / * ``` */ export declare class Release extends pulumi.CustomResource { /** * Get an existing Release resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Release; /** * Returns true if the given object is an instance of Release. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Release; /** * Whether to allow Null values in helm chart configs. */ readonly allowNullValues: pulumi.Output; /** * If set, installation process purges chart on fail. `skipAwait` will be disabled automatically if atomic is used. */ readonly atomic: pulumi.Output; /** * Chart name to be installed. A path may be used. */ readonly chart: pulumi.Output; /** * Allow deletion of new resources created in this upgrade when upgrade fails. */ readonly cleanupOnFail: pulumi.Output; /** * Create the namespace if it does not exist. */ readonly createNamespace: pulumi.Output; /** * Run helm dependency update before installing the chart. */ readonly dependencyUpdate: pulumi.Output; /** * Add a custom description */ readonly description: pulumi.Output; /** * Use chart development versions, too. Equivalent to version '>0.0.0-0'. If `version` is set, this is ignored. */ readonly devel: pulumi.Output; /** * Prevent CRD hooks from running, but run other hooks. See helm install --no-crd-hook */ readonly disableCRDHooks: pulumi.Output; /** * If set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema */ readonly disableOpenapiValidation: pulumi.Output; /** * Prevent hooks from running. */ readonly disableWebhooks: pulumi.Output; /** * Force resource update through delete/recreate if needed. */ readonly forceUpdate: pulumi.Output; /** * Location of public keys used for verification. Used only if `verify` is true */ readonly keyring: pulumi.Output; /** * Run helm lint when planning. */ readonly lint: pulumi.Output; /** * The rendered manifests as JSON. Not yet supported. */ readonly manifest: pulumi.Output<{ [key: string]: any; }>; /** * Limit the maximum number of revisions saved per release. Use 0 for no limit. */ readonly maxHistory: pulumi.Output; /** * Release name. */ readonly name: pulumi.Output; /** * Namespace to install the release into. */ readonly namespace: pulumi.Output; /** * Postrender command to run. */ readonly postrender: pulumi.Output; /** * Perform pods restart during upgrade/rollback. */ readonly recreatePods: pulumi.Output; /** * If set, render subchart notes along with the parent. */ readonly renderSubchartNotes: pulumi.Output; /** * Re-use the given name, even if that name is already used. This is unsafe in production */ readonly replace: pulumi.Output; /** * Specification defining the Helm chart repository to use. */ readonly repositoryOpts: pulumi.Output; /** * When upgrading, reset the values to the ones built into the chart. */ readonly resetValues: pulumi.Output; /** * Names of resources created by the release grouped by "kind/version". */ readonly resourceNames: pulumi.Output<{ [key: string]: string[]; }>; /** * When upgrading, reuse the last release's values and merge in any overrides. If 'resetValues' is specified, this is ignored */ readonly reuseValues: pulumi.Output; /** * By default, the provider waits until all resources are in a ready state before marking the release as successful. Setting this to true will skip such await logic. */ readonly skipAwait: pulumi.Output; /** * If set, no CRDs will be installed. By default, CRDs are installed if not already present. */ readonly skipCrds: pulumi.Output; /** * Status of the deployed release. */ readonly status: pulumi.Output; /** * Time in seconds to wait for any individual kubernetes operation. */ readonly timeout: pulumi.Output; /** * List of assets (raw yaml files). Content is read and merged with values (with values taking precedence). */ readonly valueYamlFiles: pulumi.Output<(pulumi.asset.Asset | pulumi.asset.Archive)[]>; /** * Custom values set for the release. */ readonly values: pulumi.Output<{ [key: string]: any; }>; /** * Verify the package before installing it. */ readonly verify: pulumi.Output; /** * Specify the exact chart version to install. If this is not specified, the latest version is installed. */ readonly version: pulumi.Output; /** * Will wait until all Jobs have been completed before marking the release as successful. This is ignored if `skipAwait` is enabled. */ readonly waitForJobs: pulumi.Output; /** * Create a Release resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ReleaseArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a Release resource. */ export interface ReleaseArgs { /** * Whether to allow Null values in helm chart configs. */ allowNullValues?: pulumi.Input; /** * If set, installation process purges chart on fail. `skipAwait` will be disabled automatically if atomic is used. */ atomic?: pulumi.Input; /** * Chart name to be installed. A path may be used. */ chart: pulumi.Input; /** * Allow deletion of new resources created in this upgrade when upgrade fails. */ cleanupOnFail?: pulumi.Input; compat?: pulumi.Input<"true">; /** * Create the namespace if it does not exist. */ createNamespace?: pulumi.Input; /** * Run helm dependency update before installing the chart. */ dependencyUpdate?: pulumi.Input; /** * Add a custom description */ description?: pulumi.Input; /** * Use chart development versions, too. Equivalent to version '>0.0.0-0'. If `version` is set, this is ignored. */ devel?: pulumi.Input; /** * Prevent CRD hooks from running, but run other hooks. See helm install --no-crd-hook */ disableCRDHooks?: pulumi.Input; /** * If set, the installation process will not validate rendered templates against the Kubernetes OpenAPI Schema */ disableOpenapiValidation?: pulumi.Input; /** * Prevent hooks from running. */ disableWebhooks?: pulumi.Input; /** * Force resource update through delete/recreate if needed. */ forceUpdate?: pulumi.Input; /** * Location of public keys used for verification. Used only if `verify` is true */ keyring?: pulumi.Input; /** * Run helm lint when planning. */ lint?: pulumi.Input; /** * The rendered manifests as JSON. Not yet supported. */ manifest?: pulumi.Input<{ [key: string]: any; }>; /** * Limit the maximum number of revisions saved per release. Use 0 for no limit. */ maxHistory?: pulumi.Input; /** * Release name. */ name?: pulumi.Input; /** * Namespace to install the release into. */ namespace?: pulumi.Input; /** * Postrender command to run. */ postrender?: pulumi.Input; /** * Perform pods restart during upgrade/rollback. */ recreatePods?: pulumi.Input; /** * If set, render subchart notes along with the parent. */ renderSubchartNotes?: pulumi.Input; /** * Re-use the given name, even if that name is already used. This is unsafe in production */ replace?: pulumi.Input; /** * Specification defining the Helm chart repository to use. */ repositoryOpts?: pulumi.Input; /** * When upgrading, reset the values to the ones built into the chart. */ resetValues?: pulumi.Input; /** * Names of resources created by the release grouped by "kind/version". */ resourceNames?: pulumi.Input<{ [key: string]: pulumi.Input[]>; }>; /** * When upgrading, reuse the last release's values and merge in any overrides. If 'resetValues' is specified, this is ignored */ reuseValues?: pulumi.Input; /** * By default, the provider waits until all resources are in a ready state before marking the release as successful. Setting this to true will skip such await logic. */ skipAwait?: pulumi.Input; /** * If set, no CRDs will be installed. By default, CRDs are installed if not already present. */ skipCrds?: pulumi.Input; /** * Time in seconds to wait for any individual kubernetes operation. */ timeout?: pulumi.Input; /** * List of assets (raw yaml files). Content is read and merged with values. */ valueYamlFiles?: pulumi.Input[]>; /** * Custom values set for the release. */ values?: pulumi.Input<{ [key: string]: any; }>; /** * Verify the package before installing it. */ verify?: pulumi.Input; /** * Specify the exact chart version to install. If this is not specified, the latest version is installed. */ version?: pulumi.Input; /** * Will wait until all Jobs have been completed before marking the release as successful. This is ignored if `skipAwait` is enabled. */ waitForJobs?: pulumi.Input; }