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

[AKS][aks-preview] az aks nodepool upgrade: Add new parameter --aks-custom-headers #3658

Merged

Conversation

mainred
Copy link
Member

@mainred mainred commented Jul 15, 2021


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

set the env and add new test

  • setup the local environment following:
    azdev setup --cli /home/azureuser/go/src/github.com/Azure/azure-cli --repo /home/azureuser/go/src/github.com/Azure/azure-cli-extensions

reference: https://github.com/Azure/azure-cli-dev-tools#style-linter-check-and-testing

  • created generated recording files as it's not necessary to run the newly added test by talking to Azure.

azdev test aks-preview

test with the self-built aks-preview

  • build and publish the extention

azdev extension publish aks-preview --storage-account $STORAGEACCOUNT --storage-subscription $STORAGESUB --storage-container azure-cli-extension --update-index

  • add extension

az extension add --source $python-wheel-blob-url

  • run aks-preview with newly added extension

az aks nodepool upgrade --resource-group $rg --cluster-name k8s --name dr2 --kubernetes-version 1.21.1 --aks-custom-headers WindowsContainerRuntime=containerd --debug

returns successfully and the header value can ben seen below:

cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': 'b7eaadd7-e556-11eb-9394-000d3ac57d3d'
cli.azure.cli.core.sdk.policies:     'CommandName': 'aks nodepool upgrade'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--resource-group --cluster-name --name --kubernetes-version --aks-custom-headers --debug'
cli.azure.cli.core.sdk.policies:     'WindowsContainerRuntime': 'containerd'

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 15, 2021

aks

@mainred
Copy link
Member Author

mainred commented Jul 15, 2021

This is to support upgrading Windows nodepools from docker to containerd during the Windows containerd public preview.

cc @keikhara @AbelHu @palma21

@mainred mainred changed the title Add --aks-custom-headers for az aks nodepool upgrade [AKS][aks-preview] Add --aks-custom-headers for az aks nodepool upgrade Jul 19, 2021
@mainred
Copy link
Member Author

mainred commented Jul 19, 2021

@zhoxing-ms , could you please take a look? Thanks.

@zhoxing-ms zhoxing-ms changed the title [AKS][aks-preview] Add --aks-custom-headers for az aks nodepool upgrade [AKS][aks-preview] az aks nodepool upgrade: Add new parameter --aks-custom-headers Jul 19, 2021
@zhoxing-ms
Copy link
Contributor

@mainred Could you add some test cases for this new parameter?

@mainred mainred force-pushed the support-http-header-for-aks-nodepool-upgrade branch 3 times, most recently from 10a8133 to decbf80 Compare July 20, 2021 03:15
@mainred mainred force-pushed the support-http-header-for-aks-nodepool-upgrade branch from b852f87 to 77a644f Compare July 20, 2021 07:54
Copy link
Member

@FumingZhang FumingZhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to add a space to separate options

@mainred mainred requested a review from FumingZhang July 20, 2021 14:20
@zhoxing-ms zhoxing-ms merged commit 3065663 into Azure:main Jul 22, 2021
@mainred mainred deleted the support-http-header-for-aks-nodepool-upgrade branch July 22, 2021 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants