Class CloudOptions
Describes cloud related cluster settings.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class CloudOptions
Properties
PrefixResourceNames
Specifies that cloud resources created for the cluster have their names prefixed
by the cluster name. This is a tri-state value that may be Default,
True or False. Default
indicates that
cloud hosting manager will decide whether it makes sense to prefix resource names by default
(see the remarks for details), otherwise you can explicitly control this by specifying
True
or False
.
This defaults to null
.
Declaration
[JsonProperty(PropertyName = "PrefixResourceNames", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "prefixResourceNames", ApplyNamingConventions = false)]
public TriState PrefixResourceNames { get; set; }
Property Value
Type | Description |
---|---|
TriState |
Remarks
When this property is null
(the default), the hosting manager for the target
cloud decides whether or not to prefix resource names with the cluster name.
AWS | Resource names are always prefixed for AWS deployments. This makes sense because AWS resource names are globally scoped and also because load balancer names are required to be unique within an AWS account and region. |
Azure | Resource names are not prefixed by default. NEONKUBE clusters deployed to Azure are always created in a resource group and Azure scopes resource names to the group. This means that the prefix really isn't necessary. |
Google Cloud | $todo(jefflill): Update this once we've implemented the Google hosting manager. |
note
It is possible though to deploy a cluster into an existing resource group, along
with other already existing resources (perhaps another NEONKUBE cluster). You'll
need to take care in this situation to avoid resource name conflicts. To handle this,
set this property to true
such that every cluster resource created will
include the cluster name in the resource name prefix.
Methods
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. |