-
Notifications
You must be signed in to change notification settings - Fork 88
Description
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
gardener-extension-provider-azure/docs/usage/usage.md
Lines 151 to 156 in 25b3283
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 |
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 as
cidr`, this needs to be documented.
Should be fixed also at
gardener-extension-provider-azure/docs/usage/usage.md
Lines 193 to 195 in 25b3283
* 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. |
gardener-extension-provider-azure/pkg/apis/azure/validation/infrastructure.go
Lines 190 to 193 in 25b3283
// 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: