Skip to content

Fix/improve documentation regarding infrastructure config #1217

@vpnachev

Description

@vpnachev

How to categorize this issue?

/area dev-productivity documentation ops-productivity usability
/kind bug
/platform azure

What happened:
Documentation and code around infrastructure config needs various fixes/improvements


vnet: # specify either 'name' and 'resourceGroup' or 'cidr'
# name: my-vnet
# resourceGroup: my-vnet-resource-group
cidr: 10.250.0.0/16
# ddosProtectionPlanID: /subscriptions/test/resourceGroups/test/providers/Microsoft.Network/ddosProtectionPlans/test-ddos-protection-plan
workers: 10.250.0.0/19
states that either cidr or name and resourceGroup must be set, however it turns out none of them can be uset, in that case networks.workersis re-used ascidr`, this needs to be documented.

Should be fixed also at

* If `networks.vnet.cidr` is given then you have to specify the VNet CIDR of a new VNet that will be created during shoot creation.
You can freely choose a private CIDR range.
* Either `networks.vnet.name` and `neworks.vnet.resourceGroup` or `networks.vnet.cidr` must be present, but not both at the same time.


// Validate that just vnet name or vnet resource group is specified.
if (networkConfig.VNet.Name != nil && vnetConfig.ResourceGroup == nil) || (vnetConfig.Name == nil && vnetConfig.ResourceGroup != nil) {
return append(allErrs, field.Invalid(vNetPath, vnetConfig, "a vnet cidr or vnet name and resource group need to be specified"))
}

Comment and the error message does not correspond to the actual check, both of them must be fixed especially the error message because it is user facing.


What you expected to happen:
Documentation, end-user documentation in in-code comments, to reflect what the code is actually doing.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Gardener version (if relevant):
  • Extension version:
  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • Others:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/dev-productivityDeveloper productivity related (how to improve development)area/documentationDocumentation relatedarea/ops-productivityOperator productivity related (how to improve operations)area/usabilityUsability relatedkind/bugBugplatform/azureMicrosoft Azure platform/infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions