Module helm/v2
This page documents the language specification for the kubernetes package. If you're looking for help working with the inputs, outputs, or functions of kubernetes resources in a Pulumi program, please see the resource documentation for examples and API reference.
APIs
APIs
class Chart
class Chart extends CollectionComponentResourceChart is a component representing a collection of resources described by an arbitrary Helm
Chart. The Chart can be fetched from any source that is accessible to the helm command
line. Values in the values.yml file can be overridden using ChartOpts.values (equivalent
to --set or having multiple values.yml files). Objects can be transformed arbitrarily by
supplying callbacks to ChartOpts.transformations.
Chart does not use Tiller. The Chart specified is copied and expanded locally; the semantics
are equivalent to running helm template and then using Pulumi to manage the resulting YAML
manifests. Any values that would be retrieved in-cluster are assigned fake values, and
none of Tiller’s server-side validity testing is executed.
constructor
new Chart(releaseName: string, config: ChartOpts | LocalChartOpts, opts?: pulumi.ComponentResourceOptions)Create an instance of the specified Helm chart.
releaseNameName of the Chart (e.g., nginx-ingress).configConfiguration options for the Chart.optsA bag of options that control this resource's behavior.
method getCustomResource
public getCustomResource<T>(groupVersionKind: string, namespace: string): pulumi.Output<T>getCustomResource returns a resource defined by a CRD with the given group/version/kind and name.
For example: getCustomResource(“monitoring.coreos.com/v1/ServiceMonitor”, “kube-prometheus-exporter-kubernetes”)
public getCustomResource<T>(groupVersionKind: string, namespace: string, name: string): pulumi.Output<T>method getData
protected getData(): Promise<TData>Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...) call to ComponentResource.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod getResource
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>getResource returns a resource defined by a built-in Kubernetes group/version/kind and name.
For example: getResource(“apps/v1/Deployment”, “nginx”)
public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", name: string): pulumi.Output<MutatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<MutatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", name: string): pulumi.Output<MutatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/MutatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<MutatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", name: string): pulumi.Output<ValidatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfiguration", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfiguration>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", name: string): pulumi.Output<ValidatingWebhookConfigurationList>public getResource(groupVersionKind: "admissionregistration.k8s.io/v1beta1/ValidatingWebhookConfigurationList", namespace: string, name: string): pulumi.Output<ValidatingWebhookConfigurationList>public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", name: string): pulumi.Output<CustomResourceDefinition>public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinition", namespace: string, name: string): pulumi.Output<CustomResourceDefinition>public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", name: string): pulumi.Output<CustomResourceDefinitionList>public getResource(groupVersionKind: "apiextensions.k8s.io/v1/CustomResourceDefinitionList", namespace: string, name: string): pulumi.Output<CustomResourceDefinitionList>+ 362 additional overloadsmethod getResourceProperty
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">getResourceProperty returns a single property of a resource defined by a built-in Kubernetes group/version/kind and name.
For example: getResourceProperty(“v1/Service”, “nginx”, “spec”)
public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfiguration">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "metadata"): pulumi.Output<ObjectMeta>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "metadata"): pulumi.Output<ObjectMeta>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfiguration", namespace: string, name: string, property: "webhooks"): pulumi.Output<MutatingWebhook[]>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "items"): pulumi.Output<MutatingWebhookConfiguration[]>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "kind"): pulumi.Output<"MutatingWebhookConfigurationList">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", name: string, property: "metadata"): pulumi.Output<ListMeta>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/MutatingWebhookConfigurationList", namespace: string, name: string, property: "metadata"): pulumi.Output<ListMeta>public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "apiVersion"): pulumi.Output<"admissionregistration.k8s.io/v1">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">public getResourceProperty(groupVersionKind: "admissionregistration.k8s.io/v1/ValidatingWebhookConfiguration", namespace: string, name: string, property: "kind"): pulumi.Output<"ValidatingWebhookConfiguration">+ 1758 additional overloadsmethod initialize
protected initialize(args: Inputs): Promise<TData>Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData.
method isInstance
static isInstance(obj: any): obj is ComponentResourceReturns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method parseTemplate
parseTemplate(text: string, transformations: (o: any, opts: CustomResourceOptions) => void[] | undefined, resourcePrefix: string | undefined, dependsOn: Resource[], defaultNamespace: string | undefined): pulumi.Output<{[key: string]: CustomResource}>method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): voidregisterOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize method completes.
property resources
resources: pulumi.Output<{[key: string]: CustomResource}>;property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
interface ChartOpts
interface ChartOpts extends BaseChartOptsproperty apiVersions
apiVersions?: pulumi.Input<pulumi.Input<string>[]>;The optional kubernetes api versions used for Capabilities.APIVersions.
property chart
chart: pulumi.Input<string>;The name of the chart to deploy. If [repo] is provided, this chart name will be prefixed by the repo name. Example: repo: “stable”, chart: “nginx-ingress” -> “stable/nginx-ingress” Example: chart: “stable/nginx-ingress” -> “stable/nginx-ingress”
property fetchOpts
fetchOpts?: pulumi.Input<FetchOpts>;Additional options to customize the fetching of the Helm chart.
property namespace
namespace?: pulumi.Input<string>;The optional namespace to install chart resources into.
property repo
repo?: pulumi.Input<string>;The repository name of the chart to deploy. Example: “stable”
property resourcePrefix
resourcePrefix?: undefined | string;An optional prefix for the auto-generated resource names. Example: A resource created with resourcePrefix=“foo” would produce a resource named “foo-resourceName”.
property transformations
transformations?: (o: any, opts: CustomResourceOptions) => void[];Optional array of transformations to apply to resources that will be created by this chart prior to creation. Allows customization of the chart behaviour without directly modifying the chart itself.
property values
values?: pulumi.Inputs;Overrides for chart values.
property version
version?: pulumi.Input<string>;The version of the chart to deploy. If not provided, the latest version will be deployed.
function fetch
fetch(chart: string, opts?: ResolvedFetchOpts): voidRetrieve a package from a package repository, and download it locally.
This is useful for fetching packages to inspect, modify, or repackage. It can also be used to perform cryptographic verification of a chart without installing the chart.
There are options for unpacking the chart after download. This will create a directory for the chart and uncompress into that directory.
If the verify option is specified, the requested chart MUST have a provenance file, and MUST
pass the verification process. Failure in any part of this will result in an error, and the chart
will not be saved locally.
interface FetchOpts
interface FetchOptsAdditional options to customize the fetching of the Helm chart.
property caFile
caFile?: pulumi.Input<string>;Verify certificates of HTTPS-enabled servers using this CA bundle.
property certFile
certFile?: pulumi.Input<string>;Identify HTTPS client using this SSL certificate file.
property destination
destination?: pulumi.Input<string>;Location to write the chart. If this and tardir are specified, tardir is appended to this (default “.”).
property devel
devel?: pulumi.Input<boolean>;Use development versions, too. Equivalent to version ‘>0.0.0-0’. If –version is set, this is ignored.
property home
home?: pulumi.Input<string>;Location of your Helm config. Overrides $HELM_HOME (default “/Users/alex/.helm”).
property keyFile
keyFile?: pulumi.Input<string>;Identify HTTPS client using this SSL key file.
property keyring
keyring?: pulumi.Input<string>;Keyring containing public keys (default “/Users/alex/.gnupg/pubring.gpg”).
property password
password?: pulumi.Input<string>;Chart repository password.
property prov
prov?: pulumi.Input<boolean>;Fetch the provenance file, but don’t perform verification.
property repo
repo?: pulumi.Input<string>;Chart repository url where to locate the requested chart.
property untar
untar?: pulumi.Input<boolean>;If set to false, will leave the chart as a tarball after downloading.
property untardir
untardir?: pulumi.Input<string>;If untar is specified, this flag specifies the name of the directory into which the chart is expanded (default “.”).
property username
username?: pulumi.Input<string>;Chart repository username.
property verify
verify?: pulumi.Input<boolean>;Verify the package against its signature.
property version
version?: pulumi.Input<string>;Specific version of a chart. Without this, the latest version is fetched.
interface LocalChartOpts
interface LocalChartOpts extends BaseChartOptsproperty apiVersions
apiVersions?: pulumi.Input<pulumi.Input<string>[]>;The optional kubernetes api versions used for Capabilities.APIVersions.
property namespace
namespace?: pulumi.Input<string>;The optional namespace to install chart resources into.
property path
path: string;The path to the chart directory which contains the Chart.yaml file.
property resourcePrefix
resourcePrefix?: undefined | string;An optional prefix for the auto-generated resource names. Example: A resource created with resourcePrefix=“foo” would produce a resource named “foo-resourceName”.
property transformations
transformations?: (o: any, opts: CustomResourceOptions) => void[];Optional array of transformations to apply to resources that will be created by this chart prior to creation. Allows customization of the chart behaviour without directly modifying the chart itself.
property values
values?: pulumi.Inputs;Overrides for chart values.