-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
Description
The linter flags fields that look like this as having no title or description:
"ManagedClusterAgentPoolProfileProperties": {
"properties": {
"osDiskSizeGB": {
"$ref": "#/definitions/ContainerServiceOSDisk"
},
"osDiskType": {
"$ref": "#/definitions/OSDiskType"
}
In reality, if you look at the definition of these refs:
"OSDiskType": {
"type": "string",
"enum": [
"Managed",
"Ephemeral"
],
"x-ms-enum": {
"name": "OSDiskType",
"modelAsString": true,
"values": [
{
"value": "Managed",
"description": "Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data loss should the VM need to be relocated to another host. Since containers aren't designed to have local state persisted, this behavior offers limited value while providing some drawbacks, including slower node provisioning and higher read/write latency."
},
{
"value": "Ephemeral",
"description": "Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This provides lower read/write latency, along with faster node scaling and cluster upgrades."
}
]
},
"title": "The OS disk type to be used for machines in the agent pool.",
"description": "The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os)."
},
and
"ContainerServiceOSDisk": {
"type": "integer",
"format": "int32",
"maximum": 2048,
"minimum": 0,
"description": "OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified."
},
They have a title and description.
I do understand that many times the title or description of a complex type is not appropriate to put on the property where that type is used. But in the case of fields like ContainerServiceOSDisk, the ref seems more for "code reuse" in the Swagger and less about definition a new type (since the type in question is a primitive type and AFAIK will be rendered as such everywhere).
Thoughts on not flagging this with the linter?