-
Notifications
You must be signed in to change notification settings - Fork 170
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
SDK2: Update containerservice to v6 #3906
base: master
Are you sure you want to change the base?
Conversation
92e1bf3
to
c905ee2
Compare
Please rebase pull request. |
c905ee2
to
e231e69
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM; I'm just requesting for the AKS SDK client to be moved to the track 2 directory and pointed out that the TODO comments can probably be removed.
Also: how'd you test this?
pkg/util/azureclient/mgmt/containerservice/managedcluster_addons.go
Outdated
Show resolved
Hide resolved
pkg/util/azureclient/mgmt/containerservice/managedcluster_addons.go
Outdated
Show resolved
Hide resolved
Please rebase pull request. |
Thanks for the review @kimorris27. We're planning on doing an integration test when all the track 2 PRs are ready by recreating the australiaeast environment (which is already broken and blocked by the need to go to track 2). Apart from that, I haven't been able to come up with a good way to test it further. |
e304644
to
21e569d
Compare
dad3969
to
d0871e2
Compare
/azp run ci |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense! Since the PR touches pkg/env/core.go
though, I'd like to see a successful E2E run before approving.
/azp run e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
|
||
res, err := managedClustersClient.ListClusterAdminCredentials(ctx, aksResourceGroup, aksClusterName, "public") | ||
res, err := managedClustersClient.ListClusterAdminCredentials(ctx, aksResourceGroup, aksClusterName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to delete "public"
?
"github.com/Azure/go-autorest/autorest/to" | ||
"go.uber.org/mock/gomock" | ||
azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" | ||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a blocker for PR, but there's "k8s.io/utils/ptr" usages in other places.
We should discuss which we should use.
if resultPage == nil { | ||
t.Fatal(errors.New("result page is nil")) | ||
} | ||
|
||
hasMore := resultPage.More() | ||
if !hasMore { | ||
t.Fatal(errors.New("result page has no results")) | ||
} | ||
|
||
results, err := resultPage.NextPage(ctx) | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
if len(results.Value) != len(managedClustersList) { | ||
t.Fatal(errors.New("results page has an invalid number of results")) | ||
} | ||
|
||
if *results.Value[0].Name != *managedClustersList[0].Name { | ||
t.Logf("expected %s to match %s", *results.Value[0].Name, *managedClustersList[0].Name) | ||
t.Fatal(errors.New("expected name of first managed clusters list to match first page results")) | ||
} | ||
|
||
adminCredsResult, err := mcc.ListClusterAdminCredentials(ctx, "rp-eastus", "aro-ak-cluster-001") | ||
if err != nil { | ||
t.Fatal(err) | ||
} | ||
|
||
if len(adminCredsResult.CredentialResults.Kubeconfigs) != 1 { | ||
t.Fatal(errors.New("invalid number of credentials returned")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Do we want to exit the test when it fails? or just t.Fail
or t.Error
will do?
https://pkg.go.dev/testing#T.Fail
https://pkg.go.dev/testing#T.Fatal
@@ -75,12 +75,15 @@ func (c *core) Logger() *logrus.Entry { | |||
} | |||
|
|||
func (c *core) NewLiveConfigManager(ctx context.Context) (liveconfig.Manager, error) { | |||
msiAuthorizer, err := c.NewMSIAuthorizer(c.Environment().ResourceManagerScope) | |||
tokenizer, err := c.NewMSITokenCredential() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: Should it be tokenizer
or token
? I guess token
is better.
Which issue this PR addresses:
Currently a shared rp deployment fails because the azure sdk's in use are out of support. This brings us back up to the latest version.