/
Provider.cs
157 lines (140 loc) · 7.26 KB
/
Provider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
// *** WARNING: this file was generated by pulumigen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;
namespace Pulumi.Kubernetes
{
/// <summary>
/// The provider type for the kubernetes package.
/// </summary>
[KubernetesResourceType("pulumi:providers:kubernetes")]
public partial class Provider : global::Pulumi.ProviderResource
{
/// <summary>
/// Create a Provider resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null)
: base("kubernetes", name, args ?? new ProviderArgs(), MakeResourceOptions(options, ""))
{
}
internal Provider(string name, ImmutableDictionary<string, object?> dictionary, CustomResourceOptions? options = null)
: base("kubernetes", name, new DictionaryResourceArgs(dictionary), MakeResourceOptions(options, ""))
{
}
private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
}
public sealed class ProviderArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// If present, the name of the kubeconfig cluster to use.
/// </summary>
[Input("cluster")]
public Input<string>? Cluster { get; set; }
/// <summary>
/// If present, the name of the kubeconfig context to use.
/// </summary>
[Input("context")]
public Input<string>? Context { get; set; }
/// <summary>
/// If present and set to true, the provider will delete resources associated with an unreachable Kubernetes cluster from Pulumi state
/// </summary>
[Input("deleteUnreachable", json: true)]
public Input<bool>? DeleteUnreachable { get; set; }
/// <summary>
/// BETA FEATURE - If present and set to true, allow ConfigMaps to be mutated.
/// This feature is in developer preview, and is disabled by default.
///
/// This config can be specified in the following ways using this precedence:
/// 1. This `enableConfigMapMutable` parameter.
/// 2. The `PULUMI_K8S_ENABLE_CONFIGMAP_MUTABLE` environment variable.
/// </summary>
[Input("enableConfigMapMutable", json: true)]
public Input<bool>? EnableConfigMapMutable { get; set; }
/// <summary>
/// If present and set to false, disable Server-Side Apply mode.
/// See https://github.com/pulumi/pulumi-kubernetes/issues/2011 for additional details.
/// </summary>
[Input("enableServerSideApply", json: true)]
public Input<bool>? EnableServerSideApply { get; set; }
/// <summary>
/// Options to configure the Helm Release resource.
/// </summary>
[Input("helmReleaseSettings", json: true)]
public Input<Pulumi.Kubernetes.Types.Inputs.Provider.HelmReleaseSettingsArgs>? HelmReleaseSettings { get; set; }
/// <summary>
/// Options for tuning the Kubernetes client used by a Provider.
/// </summary>
[Input("kubeClientSettings", json: true)]
public Input<Pulumi.Kubernetes.Types.Inputs.Provider.KubeClientSettingsArgs>? KubeClientSettings { get; set; }
/// <summary>
/// The contents of a kubeconfig file or the path to a kubeconfig file.
/// </summary>
[Input("kubeconfig")]
public Input<string>? KubeConfig { get; set; }
/// <summary>
/// If present, the default namespace to use. This flag is ignored for cluster-scoped resources.
///
/// A namespace can be specified in multiple places, and the precedence is as follows:
/// 1. `.metadata.namespace` set on the resource.
/// 2. This `namespace` parameter.
/// 3. `namespace` set for the active context in the kubeconfig.
/// </summary>
[Input("namespace")]
public Input<string>? Namespace { get; set; }
/// <summary>
/// BETA FEATURE - If present, render resource manifests to this directory. In this mode, resources will not
/// be created on a Kubernetes cluster, but the rendered manifests will be kept in sync with changes
/// to the Pulumi program. This feature is in developer preview, and is disabled by default.
///
/// Note that some computed Outputs such as status fields will not be populated
/// since the resources are not created on a Kubernetes cluster. These Output values will remain undefined,
/// and may result in an error if they are referenced by other resources. Also note that any secret values
/// used in these resources will be rendered in plaintext to the resulting YAML.
/// </summary>
[Input("renderYamlToDirectory")]
public Input<string>? RenderYamlToDirectory { get; set; }
/// <summary>
/// If present and set to true, the provider will skip resources update associated with an unreachable Kubernetes cluster from Pulumi state
/// </summary>
[Input("skipUpdateUnreachable", json: true)]
public Input<bool>? SkipUpdateUnreachable { get; set; }
/// <summary>
/// If present and set to true, suppress apiVersion deprecation warnings from the CLI.
/// </summary>
[Input("suppressDeprecationWarnings", json: true)]
public Input<bool>? SuppressDeprecationWarnings { get; set; }
/// <summary>
/// If present and set to true, suppress unsupported Helm hook warnings from the CLI.
/// </summary>
[Input("suppressHelmHookWarnings", json: true)]
public Input<bool>? SuppressHelmHookWarnings { get; set; }
public ProviderArgs()
{
DeleteUnreachable = Utilities.GetEnvBoolean("PULUMI_K8S_DELETE_UNREACHABLE");
EnableConfigMapMutable = Utilities.GetEnvBoolean("PULUMI_K8S_ENABLE_CONFIGMAP_MUTABLE");
EnableServerSideApply = Utilities.GetEnvBoolean("PULUMI_K8S_ENABLE_SERVER_SIDE_APPLY");
KubeConfig = Utilities.GetEnv("KUBECONFIG");
SkipUpdateUnreachable = Utilities.GetEnvBoolean("PULUMI_K8S_SKIP_UPDATE_UNREACHABLE");
SuppressDeprecationWarnings = Utilities.GetEnvBoolean("PULUMI_K8S_SUPPRESS_DEPRECATION_WARNINGS");
SuppressHelmHookWarnings = Utilities.GetEnvBoolean("PULUMI_K8S_SUPPRESS_HELM_HOOK_WARNINGS");
}
public static new ProviderArgs Empty => new ProviderArgs();
}
}