Class HypervisorNodeOptions
Specifies common node options for on-premise hypervisor based hosting environments such as Hyper-V and XenServer.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class HypervisorNodeOptions
Constructors
HypervisorNodeOptions()
Default constructor.
Declaration
public HypervisorNodeOptions()
Properties
Host
Identifies the hypervisor instance where this node is to be provisioned for Hyper-V or XenServer based clusters. This name must map to the name of one of the Hosts when set.
Declaration
[JsonProperty(PropertyName = "Host", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "host", ApplyNamingConventions = false)]
public string Host { get; set; }
Property Value
Type | Description |
---|---|
string |
Memory
Specifies the amount of memory to allocate to this node when provisioned on a hypervisor. This is specified as a string that can be a byte count or a number with units like 512MB, 0.5GB, 2GB, or 1TB. This defaults to the value specified by Memory.
note
NEONKUBE requires that each control-plane and worker node have at least 4GiB of RAM.
Declaration
[JsonProperty(PropertyName = "Memory", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "memory", ApplyNamingConventions = false)]
public string Memory { get; set; }
Property Value
Type | Description |
---|---|
string |
OpenEbsDisk
Specifies the size of the second block device to be created for this node when it is enabled for OpenEBS. This is specified as a string that can be a byte count or a number with units like 512MiB, 0.5GiB, 2iGB, or 1TiB. This defaults to the value specified by OpenEbsDisk.
Declaration
[JsonProperty(PropertyName = "OpenEbsDisk", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "openEbsDisk", ApplyNamingConventions = false)]
public string OpenEbsDisk { get; set; }
Property Value
Type | Description |
---|---|
string |
OsDisk
The size of operating system disk for this node when when provisioned on a hypervisor. This is specified as a string that can be a byte count or a number with units like 512MB, 0.5GB, 2GB, or 1TB. This defaults to the value specified by OsDisk.
Declaration
[JsonProperty(PropertyName = "OsDisk", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "osDisk", ApplyNamingConventions = false)]
public string OsDisk { get; set; }
Property Value
Type | Description |
---|---|
string |
VCpus
Specifies the number of processors to assigned to this node when provisioned on a hypervisor. This defaults to the value specified by VCpus.
note
NEONKUBE requires that each control-plane and worker node have at least 4 CPUs.
Declaration
[JsonProperty(PropertyName = "VCpus", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "vcpus", ApplyNamingConventions = false)]
public int VCpus { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
GetMemory(ClusterDefinition)
Returns the maximum number of bytes of memory allocate to for this node when hosted on a hypervisor.
Declaration
public long GetMemory(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
Returns
Type | Description |
---|---|
long | The size in bytes. |
GetOpenEbsDiskSizeBytes(ClusterDefinition)
Returns the size of the OpenEBS cStor disk to be created for this node when hosted on a hypervisor.
Declaration
public long GetOpenEbsDiskSizeBytes(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
Returns
Type | Description |
---|---|
long | The size in bytes. |
GetOsDisk(ClusterDefinition)
Returns the size of the operating system disk to be created for this node when hosted on a hypervisor.
Declaration
public long GetOsDisk(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
Returns
Type | Description |
---|---|
long | The size in bytes. |
GetVCpus(ClusterDefinition)
Returns the maximum number CPU cores to allocate for this node when hosted on a hypervisor.
Declaration
public int GetVCpus(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
Returns
Type | Description |
---|---|
int | The number of cores. |
Validate(ClusterDefinition, string)
Validates the node definition.
Declaration
public void Validate(ClusterDefinition clusterDefinition, string nodeName)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
string | nodeName | The node name. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown if the definition is not valid. |