Class Namespace
Provides a Rancher v2 Namespace resource. This can be used to create namespaces for Rancher v2 environments and retrieve their information.
Example Usage
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
class MyStack : Stack
{
public MyStack()
{
// Create a new rancher2 Namespace
var foo = new Rancher2.Namespace("foo", new Rancher2.NamespaceArgs
{
ContainerResourceLimit = new Rancher2.Inputs.NamespaceContainerResourceLimitArgs
{
LimitsCpu = "20m",
LimitsMemory = "20Mi",
RequestsCpu = "1m",
RequestsMemory = "1Mi",
},
Description = "foo namespace",
ProjectId = "<PROJECT_ID>",
ResourceQuota = new Rancher2.Inputs.NamespaceResourceQuotaArgs
{
Limit = new Rancher2.Inputs.NamespaceResourceQuotaLimitArgs
{
LimitsCpu = "100m",
LimitsMemory = "100Mi",
RequestsStorage = "1Gi",
},
},
});
}
}
Inherited Members
Namespace: Pulumi.Rancher2
Assembly: Pulumi.Rancher2.dll
Syntax
public class Namespace : CustomResource
Constructors
View SourceNamespace(String, NamespaceArgs, CustomResourceOptions)
Create a Namespace resource with the given unique name, arguments, and options.
Declaration
public Namespace(string name, NamespaceArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| NamespaceArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAnnotations
Annotations for Node Pool object (map)
Declaration
public Output<ImmutableDictionary<string, object>> Annotations { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
ContainerResourceLimit
Default containers resource limits on namespace (List maxitem:1)
Declaration
public Output<NamespaceContainerResourceLimit> ContainerResourceLimit { get; }
Property Value
| Type | Description |
|---|---|
| Output<NamespaceContainerResourceLimit> |
Description
A namespace description (string)
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Labels
Labels for Node Pool object (map)
Declaration
public Output<ImmutableDictionary<string, object>> Labels { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Name
The name of the namespace (string)
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ProjectId
The project id where assign namespace. It's on the form project_id=<cluster_id>:<id>. Updating <id> part on same <cluster_id> namespace will be moved between projects (string)
Declaration
public Output<string> ProjectId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ResourceQuota
Resource quota for namespace. Rancher v2.1.x or higher (list maxitems:1)
Declaration
public Output<NamespaceResourceQuota> ResourceQuota { get; }
Property Value
| Type | Description |
|---|---|
| Output<NamespaceResourceQuota> |
WaitForCluster
Wait for cluster becomes active. Default false (bool)
Declaration
public Output<bool?> WaitForCluster { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Methods
View SourceGet(String, Input<String>, NamespaceState, CustomResourceOptions)
Get an existing Namespace resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Namespace Get(string name, Input<string> id, NamespaceState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| NamespaceState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Namespace |