Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Helm/Release] Add import docs #1893

Merged
merged 2 commits into from
Feb 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions provider/cmd/pulumi-resource-kubernetes/schema.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions provider/pkg/gen/examples/overlays/helmRelease.md
Original file line number Diff line number Diff line change
Expand Up @@ -744,3 +744,10 @@ func main() {
{{% /example %}}
{{% /examples %}}

## 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 <namespace>/<releaseName>
```
2 changes: 1 addition & 1 deletion provider/pkg/gen/overlays.go
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ var helmV3ReleaseResource = pschema.ResourceSpec{
Ref: "pulumi.json#/Asset",
},
},
Description: "List of assets (raw yaml files). Content is read and merged with values. Not yet supported.",
Description: "List of assets (raw yaml files). Content is read and merged with values.",
},
"values": {
TypeSpec: pschema.TypeSpec{
Expand Down
10 changes: 9 additions & 1 deletion sdk/dotnet/Helm/V3/Release.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,14 @@ namespace Pulumi.Kubernetes.Helm.V3
/// public Output&lt;string&gt; RedisMasterClusterIP { get; set; }
/// }
/// ```
///
/// ## 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 &lt;namespace&gt;/&lt;releaseName&gt;
/// ```
/// </summary>
[KubernetesResourceType("kubernetes:helm.sh/v3:Release")]
public partial class Release : KubernetesResource
Expand Down Expand Up @@ -695,7 +703,7 @@ public InputMap<ImmutableArray<string>> ResourceNames
private InputList<AssetOrArchive>? _valueYamlFiles;

/// <summary>
/// List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
/// List of assets (raw yaml files). Content is read and merged with values.
/// </summary>
public InputList<AssetOrArchive> ValueYamlFiles
{
Expand Down
12 changes: 10 additions & 2 deletions sdk/go/kubernetes/helm/v3/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ import (
// })
// }
// ```
//
// ## 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 <namespace>/<releaseName>
// ```
type Release struct {
pulumi.CustomResourceState

Expand Down Expand Up @@ -436,7 +444,7 @@ type releaseArgs struct {
SkipCrds *bool `pulumi:"skipCrds"`
// Time in seconds to wait for any individual kubernetes operation.
Timeout *int `pulumi:"timeout"`
// List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
// List of assets (raw yaml files). Content is read and merged with values.
ValueYamlFiles []pulumi.AssetOrArchive `pulumi:"valueYamlFiles"`
// Custom values set for the release.
Values map[string]interface{} `pulumi:"values"`
Expand Down Expand Up @@ -507,7 +515,7 @@ type ReleaseArgs struct {
SkipCrds pulumi.BoolPtrInput
// Time in seconds to wait for any individual kubernetes operation.
Timeout pulumi.IntPtrInput
// List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
// List of assets (raw yaml files). Content is read and merged with values.
ValueYamlFiles pulumi.AssetOrArchiveArrayInput
// Custom values set for the release.
Values pulumi.MapInput
Expand Down
10 changes: 9 additions & 1 deletion sdk/nodejs/helm/v3/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ import * as utilities from "../../utilities";
* 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 <namespace>/<releaseName>
* ```
*/
export class Release extends pulumi.CustomResource {
/**
Expand Down Expand Up @@ -520,7 +528,7 @@ export interface ReleaseArgs {
*/
timeout?: pulumi.Input<number>;
/**
* List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
* List of assets (raw yaml files). Content is read and merged with values.
*/
valueYamlFiles?: pulumi.Input<pulumi.Input<pulumi.asset.Asset | pulumi.asset.Archive>[]>;
/**
Expand Down
22 changes: 19 additions & 3 deletions sdk/python/pulumi_kubernetes/helm/v3/Release.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(__self__, *,
:param pulumi.Input[bool] skip_await: 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.
:param pulumi.Input[bool] skip_crds: If set, no CRDs will be installed. By default, CRDs are installed if not already present.
:param pulumi.Input[int] timeout: Time in seconds to wait for any individual kubernetes operation.
:param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]]] value_yaml_files: List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
:param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]]] value_yaml_files: List of assets (raw yaml files). Content is read and merged with values.
:param pulumi.Input[Mapping[str, Any]] values: Custom values set for the release.
:param pulumi.Input[bool] verify: Verify the package before installing it.
:param pulumi.Input[str] version: Specify the exact chart version to install. If this is not specified, the latest version is installed.
Expand Down Expand Up @@ -502,7 +502,7 @@ def timeout(self, value: Optional[pulumi.Input[int]]):
@pulumi.getter(name="valueYamlFiles")
def value_yaml_files(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]]]]:
"""
List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
List of assets (raw yaml files). Content is read and merged with values.
"""
return pulumi.get(self, "value_yaml_files")

Expand Down Expand Up @@ -754,6 +754,14 @@ def __init__(__self__,
pulumi.export("redisMasterClusterIP", srv.spec.cluster_ip)
```

## 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 <namespace>/<releaseName>
```

:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[bool] atomic: If set, installation process purges chart on fail. `skipAwait` will be disabled automatically if atomic is used.
Expand Down Expand Up @@ -784,7 +792,7 @@ def __init__(__self__,
:param pulumi.Input[bool] skip_await: 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.
:param pulumi.Input[bool] skip_crds: If set, no CRDs will be installed. By default, CRDs are installed if not already present.
:param pulumi.Input[int] timeout: Time in seconds to wait for any individual kubernetes operation.
:param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]]] value_yaml_files: List of assets (raw yaml files). Content is read and merged with values. Not yet supported.
:param pulumi.Input[Sequence[pulumi.Input[Union[pulumi.Asset, pulumi.Archive]]]] value_yaml_files: List of assets (raw yaml files). Content is read and merged with values.
:param pulumi.Input[Mapping[str, Any]] values: Custom values set for the release.
:param pulumi.Input[bool] verify: Verify the package before installing it.
:param pulumi.Input[str] version: Specify the exact chart version to install. If this is not specified, the latest version is installed.
Expand Down Expand Up @@ -951,6 +959,14 @@ def __init__(__self__,
pulumi.export("redisMasterClusterIP", srv.spec.cluster_ip)
```

## 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 <namespace>/<releaseName>
```

:param str resource_name: The name of the resource.
:param ReleaseArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
Expand Down