-
Notifications
You must be signed in to change notification settings - Fork 88
test: add e2e test for provided credentials #730
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
Conversation
Hi @cvvz. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
/ok-to-test
/retest |
pod.Volumes[n].ContainerName = containerName | ||
var secreteData map[string]string | ||
|
||
var run = func() { |
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.
run()
only provisions different secret, I think we need to add a new e2e test case for sas token stored in k8s secret scanerio
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.
run()
will generate different secret, pvc, pv and pod and also create and clean them up in k8s each time. Also per the name of this test case: pre_provisioned_provided_credentials_tester
,I think this test case is used to test the scenario of provided credentials, which includes access key, sas token, service principal and managed identity. I think it would be more reasonable and convenient to put them all in this test case.
/retest |
1 similar comment
/retest |
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.
pls squash all commits, and also add more details in PR description what e2e tests this PR has added, thanks.
@@ -52,8 +52,7 @@ | |||
} | |||
}, | |||
"servicePrincipalProfile": { | |||
"clientID": "{clientID}", | |||
"secret": "{secret}" | |||
"clientID": "msi" |
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.
let's keep the sp test
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 modification is to solve the problem that blobfuse mount failed when authenticate by MSI. The root cause is MSI generated by aks-engine is not assigned to VMSS.
BTW, considering sp is already tested by the most of jobs using the arm template linux.json, which set useManagedIdentity: false
and
"servicePrincipalProfile": {
"clientID": "{clientID}",
"secret": "{secret}"
}
And only job pull-blob-csi-driver-e2e-vmss
uses template linux-vmss.json which set useManagedIdentity: true
. Maybe we should have set
"servicePrincipalProfile": {
"clientID": "msi",
}
to test msi scenario?
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.
per the logs, pull-blob-csi-driver-e2e
is using sp
[pod/csi-blob-controller-84cf49dc6d-zs47k/blob] I0812 03:13:38.637448 1 azure.go:104] read cloud config from file: /etc/kubernetes/azure.json successfully
[pod/csi-blob-controller-84cf49dc6d-zs47k/blob] I0812 03:13:38.638028 1 azure_auth.go:245] Using AzurePublicCloud environment
[pod/csi-blob-controller-84cf49dc6d-zs47k/blob] I0812 03:13:38.638061 1 azure_auth.go:130] azure: using client_id+client_secret to retrieve access token
pull-blob-csi-driver-e2e-vmss
is using msi:
https://storage.googleapis.com/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_blob-csi-driver/730/pull-blob-csi-driver-e2e-vmss/1557924587390373888/build-log.txt
[pod/csi-blob-node-8trh8/blob] I0812 03:15:51.934107 1 azure_auth.go:245] Using AzurePublicCloud environment
[pod/csi-blob-node-8trh8/blob] I0812 03:15:51.934127 1 azure_auth.go:96] azure: using managed identity extension to retrieve access token
[pod/csi-blob-node-8trh8/blob] I0812 03:15:51.934131 1 azure_auth.go:102] azure: using User Assigned MSI ID to retrieve access token
[pod/csi-blob-node-8trh8/blob] I0812 03:15:51.934162 1 azure_auth.go:113] azure: User Assigned MSI ID is client ID. Resource ID parsing error: %+vparsing failed for 82e9bd91-c283-4b2d-8708-6d11b07d630d. Invalid resource Id format
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.
looks like you are right.
refactor e2e for volumeAttributes fix volumeAttribute e2e test for provided credential: msi and sp fix fix add role assignment print authEnv use 2020-10-01 api for authorization use 2018-01-01-preview api for authorization fix try to use msi fix e2e test remove debug log delete unnecessary code
c7409cf
to
791d631
Compare
/retest |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, cvvz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind test
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Requirements:
Special notes for your reviewer:
Add e2e test for provided credentials stored in k8s secret, including:
Release note: