Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new module to get available upgrade versions for an AKS cluster #405

Merged

Conversation

ewsct
Copy link
Contributor

@ewsct ewsct commented Jan 25, 2021

SUMMARY

Get the upgrade versions available for a managed Azure Container Service (AKS) instance.
Essentially it has similar information in its output as command az aks get-upgrades.

Fixes #377

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME
  • module: azure_rm_aksupgrade_info
ADDITIONAL INFORMATION

When you upgrade an AKS cluster, Kubernetes minor versions cannot be skipped. For example, upgrades between 1.12.x -> 1.13.x or 1.13.x -> 1.14.x are allowed, however 1.12.x -> 1.14.x is not. So you can not simply take the latest available version for new AKS instance. And that is why we need az aks get-upgrades command, which gets cluster name and its resource group as parameters.
This is a separate module (and not part of an existing one) because it is separate both in Azure SDK and az cli tool. So it would be wise to follow the same approach here, taking into account it generates the same information in its output.

Example:

"available_upgrades": {
        "agent_pool_profiles": [
            {
                "kubernetes_version": "1.18.1",
                "name": null,
                "os_type": "Linux",
                "upgrades": [
                    {
                        "is_preview": null,
                        "kubernetes_version": "1.19.3"
                    }
                ]
            }
        ],
        "control_plane_profile": {
            "kubernetes_version": "1.18.1",
            "name": null,
            "os_type": "Linux",
            "upgrades": [
                {
                    "is_preview": null,
                    "kubernetes_version": "1.19.3"
                }
            ]
        }
    },

@Fred-sun
Copy link
Collaborator

@ewscat Please add these two lines to file tests/sanity/ignore-2.10.txt. Thank you very much!

@Fred-sun Fred-sun added medium_priority Medium priority new_module_pr Add new modules work in In trying to solve, or in working with contributors labels Jan 29, 2021
@ewsct ewsct force-pushed the feature/module_aksupgrade_info branch from 4660f0e to 622517b Compare January 31, 2021 01:22
@ewsct
Copy link
Contributor Author

ewsct commented Jan 31, 2021

@ewscat Please add these two lines to file tests/sanity/ignore-2.10.txt. Thank you very much!

@Fred-sun it's done 😎

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Feb 1, 2021
@Fred-sun
Copy link
Collaborator

Fred-sun commented Feb 1, 2021

@ewscat Please add these two lines to file tests/sanity/ignore-2.10.txt. Thank you very much!

@Fred-sun it's done 😎

@ewscat Thanks for your update! I will push for merged!

@haiyuazhang haiyuazhang merged commit 81048c9 into ansible-collections:dev Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority new_module_pr Add new modules ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get the upgrade versions available for an AKS cluster
3 participants