Git Product home page Git Product logo

Comments (5)

wwwil avatar wwwil commented on May 23, 2024

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.

from jetstack-secure.

wwwil avatar wwwil commented on May 23, 2024

I'm going to look into how the az command 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#L1902

from jetstack-secure.

wwwil avatar wwwil commented on May 23, 2024

/assign @wwwil

from jetstack-secure.

wwwil avatar wwwil commented on May 23, 2024

I'm now finding curl gets the info I want, but it is still not shown in the Preflight intermediate data.

$ curl -i -H "Authorization: Bearer $(jq -r .accessToken /tmp/credentials.json)" https://management.azure.com/subscriptions/4b4cdf50-7109-4d7a-9866-bbbb3d34acf9/resourceGroups/preflight/providers/Microsoft.ContainerService/managedClusters/preflight-test-wil\?api-version\=2019-08-01

Gives:

...
   "agentPoolProfiles": [
    {
     "name": "agentpool",
     "count": 3,
     "vmSize": "Standard_DS2_v2",
     "osDiskSizeGB": 100,
     "maxPods": 110,
     "type": "VirtualMachineScaleSets",
     "provisioningState": "Succeeded",
     "orchestratorVersion": "1.14.8",
     "osType": "Linux"
    }
  ]
...

However looking at the aks_basic.intermediate.json file it looks like this:

...
        "agentPoolProfiles": [
          {
            "name": "agentpool",
            "count": 3,
            "vmSize": "Standard_DS2_v2",
            "osDiskSizeGB": 100,
            "storageProfile": "ManagedDisks",
            "maxPods": 110,
            "osType": "Linux"
          }
        ],
...

from jetstack-secure.

wwwil avatar wwwil commented on May 23, 2024

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.

from jetstack-secure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.