You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The information returned includes a list of node pools, referred to as agent pools. However it does not give details of each of these pools. This needs to be fetched separately. We should get the configuration of each node pool so we can make the checks performed in the AKS package more comprehensive.
These will both return separate JSON documents, in fact there will be a JSON document for each node pool. We need to work out how this will be handled in Preflight. We could put them all in a list in master JSON document to evaluate with Rego. Alternatively we could make an AKS node pool data gatherer separately, but this would require support for multiple instances of the same data gatherer type to fetch multiple node pools and seems like more work for users.
However when using HTTP GET requests, as the data gatherer does, some information is missing. This also occurs when doing the same thing manually with the curl command.
Reading though the docs a bit closer it looks like the agentPoolProfiles part of what we get from the cluster JSON should have what we need, so we don't need to get the agent pool JSON separately. However, in examples it seems to be missing some values... Specifically I want properties.agentPoolProfiles[_].type.
Confirmed the problem! I'm not sure why I was not getting full info previously with curl, but when that started to work I looked into our code again and noticed the JSON from the API is unmarshalled into a struct that is missing the type field.
Activity
wwwil commentedon Jan 10, 2020
Reading though the docs a bit closer it looks like the
agentPoolProfilespart of what we get from the cluster JSON should have what we need, so we don't need to get the agent pool JSON separately. However, in examples it seems to be missing some values... Specifically I wantproperties.agentPoolProfiles[_].type.[-]Expand AKS data-gatherer to get node information[/-][+]AKS data-gatherer missing some information[/+]wwwil commentedon Jan 10, 2020
I'm going to look into how the
azcommand gets it's information on Monday and try to work out what we need to change in Preflight. Going to start looking at this function that @j-fuentes found: https://github.com/Azure/azure-cli/blob/addbaf43b4618a500e5690a84096ddbef00df642/src/azure-cli/azure/cli/command_modules/acs/custom.py#L1902wwwil commentedon Jan 10, 2020
/assign @wwwil
wwwil commentedon Jan 15, 2020
I'm now finding
curlgets the info I want, but it is still not shown in the Preflight intermediate data.Gives:
However looking at the
aks_basic.intermediate.jsonfile it looks like this:wwwil commentedon Jan 15, 2020
Confirmed the problem! I'm not sure why I was not getting full info previously with
curl, but when that started to work I looked into our code again and noticed the JSON from the API is unmarshalled into a struct that is missing thetypefield.