Class HyperVHostingOptions
Specifies hosting settings for the local Microsoft Hyper-V hypervisor.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class HyperVHostingOptions
Constructors
HyperVHostingOptions()
Default constructor.
Declaration
public HyperVHostingOptions()
Fields
NeonDesktopNodeAddress
INTERNAL USE ONLY: Returns the internal IP address reserved for the NEONDESKTOP cluster.
Declaration
[JsonIgnore]
[YamlIgnore]
public readonly IPAddress NeonDesktopNodeAddress
Field Value
| Type | Description |
|---|---|
| IPAddress |
NeonKubeInternalGateway
Returns the gateway address for the NeonKubeInternalSubnet.
Declaration
[JsonIgnore]
[YamlIgnore]
public readonly IPAddress NeonKubeInternalGateway
Field Value
| Type | Description |
|---|---|
| IPAddress |
NeonKubeInternalSubnet
Returns the subnet to be used for the internal neonkube Hyper-V switch.
Declaration
[JsonIgnore]
[YamlIgnore]
public readonly NetworkCidr NeonKubeInternalSubnet
Field Value
| Type | Description |
|---|---|
| NetworkCidr |
Properties
NeonDesktopBuiltIn
INTERNAL USE ONLY: Indicates whether this is the special NEONDESKTOP built-in
single-node cluster and the node's private address will be overridden by NeonDesktopNodeAddress
when this is true.
note
Setting this to true implies setting UseInternalSwitch=true.
This defaults to false.
Declaration
[JsonProperty(PropertyName = "NeonDesktopBuiltIn", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "neonDesktopBuiltIn", ApplyNamingConventions = false)]
public bool NeonDesktopBuiltIn { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
UseInternalSwitch
Controls whether the cluster will be deployed on the internal neonkube Hyper-V switch
within the NeonKubeInternalSubnet. Note that any PremiseSubnet
must be already set to NeonKubeInternalSubnet and Gateway must be
set to NeonKubeInternalGateway when this is true.
This defaults to false.
Declaration
[JsonProperty(PropertyName = "UseInternalSwitch", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "useInternalSwitch", ApplyNamingConventions = false)]
public bool UseInternalSwitch { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Note that NEONKUBE creates only a single internal Hyper-V switch for the HyperV hosting environment for the NeonKubeInternalSubnet (100.64.0.0/24). The first and last two addresses of the subnet are reserved:
| 100.64.0.0 | Reserved. |
| 100.64.0.1 | The subnet's default gateway providing external access. |
| 100.64.0.2 ... 253 | Available for user cluster nodes. |
| 100.64.0.254 | Reserved for the NEONDESKTOP single node cluster. |
| 100.64.0.255 | Reserved as the subnet UDP broadcast address. |
Methods
ClearSecrets()
Clears all hosting related secrets.
Declaration
public void ClearSecrets()
Validate(ClusterDefinition)
Validates the options and also ensures that all null properties are
initialized to their default values.
Declaration
public void Validate(ClusterDefinition clusterDefinition)
Parameters
| Type | Name | Description |
|---|---|---|
| ClusterDefinition | clusterDefinition | The cluster definition. |
Exceptions
| Type | Condition |
|---|---|
| ClusterDefinitionException | Thrown if the definition is not valid. |