Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

fix: Update client-go library to allow upgrade & scale operations to succeed in AAD scenarios#506

Closed
skinny wants to merge 1 commit intoAzure:masterfrom
skinny:upgrade-client-go-aad
Closed

fix: Update client-go library to allow upgrade & scale operations to succeed in AAD scenarios#506
skinny wants to merge 1 commit intoAzure:masterfrom
skinny:upgrade-client-go-aad

Conversation

@skinny
Copy link
Contributor

@skinny skinny commented Feb 14, 2019

Reason for Change:
While deploy commands work with an aadProfile in the API model, upgrade and scale commands fail with the following error message:

FATA[0377] Error upgrading cluster: No Auth Provider found for name "azure"

I have tried to include the azure plugin in the current 7.0.0 version (in engine.go) but that fails too :


# github.com/Azure/aks-engine/vendor/k8s.io/client-go/plugin/pkg/client/auth/azure
vendor\k8s.io\client-go\plugin\pkg\client\auth\azure\azure.go:246:4: cannot use expiresIn (type string) as type json.Number in field value
vendor\k8s.io\client-go\plugin\pkg\client\auth\azure\azure.go:247:4: cannot use expiresOn (type string) as type json.Number in field value
vendor\k8s.io\client-go\plugin\pkg\client\auth\azure\azure.go:248:4: cannot use expiresOn (type string) as type json.Number in field value
vendor\k8s.io\client-go\plugin\pkg\client\auth\azure\azure.go:265:23: cannot use token.token.ExpiresIn (type json.Number) as type string in assignment
vendor\k8s.io\client-go\plugin\pkg\client\auth\azure\azure.go:266:23: cannot use token.token.ExpiresOn (type json.Number) as type string in assignment
vendor\k8s.io\client-go\plugin\pkg\client\auth\azure\azure.go:300:3: cannot use spt.Token (type func() adal.Token) as type adal.Token in field value
exit status 2

So this PR upgrades the client-go to the latest 10.0 version and includes the azure plugin in engine.go. Now the upgrade and scale commands work as expected.

I could not find any specific reason why the update to v9 was reverted in december (#85) but as a user of the AAD functionality in aks-engine I would really like to upgrade my clusters too ;-)

@mboersma
Copy link
Member

@skinny after #546 merged to master, this needs to be rebased and force-pushed. It's no longer necessary to commit the generated files. Sorry about that!

@skinny skinny force-pushed the upgrade-client-go-aad branch from 4ac7f1e to 39a988e Compare February 21, 2019 17:50
@skinny
Copy link
Contributor Author

skinny commented Feb 21, 2019

@mboersma done !

@skinny skinny force-pushed the upgrade-client-go-aad branch from 39a988e to d7f54cb Compare March 21, 2019 08:47
@skinny
Copy link
Contributor Author

skinny commented Mar 21, 2019

@mboersma any chance this can get merged any time soon? Let me know if it needs any changes

@mboersma
Copy link
Member

mboersma commented Apr 9, 2019

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@acs-bot
Copy link

acs-bot commented Apr 9, 2019

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: skinny

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mboersma
Copy link
Member

mboersma commented Apr 9, 2019

@skinny is it possible to update client-go without updating k8s.io/api or k8s.io/apimachinery? Changing the k8s API version has significant ripple effects for us into Azure's AKS and OpenShift services, so if it needs to change we'll have more communication and testing to do before this could be merged.

@skinny
Copy link
Contributor Author

skinny commented Apr 9, 2019

@mboersma Unfortunately the 'scale' operation starts to fail again if I only upgrade the client-go dependency in Gopkg.toml. Running dep ensure results in multiple errors like :

Solving failure: No versions of k8s.io/api met constraints:
        kubernetes-1.10.0: Could not introduce k8s.io/api@kubernetes-1.10.0 due to multiple problematic subpackages:
        Subpackage k8s.io/api/auditregistration/v1alpha1 is missing. (Package is required by k8s.io/client-go@v10.0.0.) Subpackage k8s.io/api/autoscaling/v2beta2 is missing. (Package is required by k8s.io/client-go@v10.0.0.)      Subpackage k8s.io/api/coordination/v1beta1 is missing. (Package is required by k8s.io/client-go@v10.0.0.)     Subpackage k8s.io/api/scheduling/v1beta1 is missing. (Package is required by k8s.io/client-go@v10.0.0.)
        master: Could not introduce k8s.io/api@master, as it is not allowed by constraint kubernetes-1.10.0 from project github.com/Azure/aks-engine.
        release-1.10: Could not introduce k8s.io/api@release-1.10, as it is not allowed by constraint kubernetes-1.10.0 from project github.com/Azure/aks-engine.
        release-1.11: Could not introduce k8s.io/api@release-1.11, as it is not allowed by constraint kubernetes-1.10.0 from project github.com/Azure/aks-engine.

I will try to narrow this down tomorrow but it looks like we need to upgrade the other packages too.

@mboersma
Copy link
Member

mboersma commented Apr 9, 2019

it looks like we need to upgrade the other packages too.

Ok, thanks for trying! I'll just need to check to make sure that updating the API to k8s 1.13 won't cause problems for the big projects that vendor in aks-engine.

@stale
Copy link

stale bot commented May 9, 2019

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants