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

Make auth check interval configurable. #462

Merged
merged 1 commit into from Oct 27, 2020

Conversation

lipingxue
Copy link
Contributor

This change is to make the auth check interval configurable.
What this PR does / why we need it:
With this change, user can configure the auth check iterval.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:
Test Setup:
In vsphere.conf file, set the auth check interval to 2 minutes

[Global]
 
cluster-id = "unique-kubernetes-cluster-id"
 
csi-auth-check-intervalinmin = "2"
...

Use this vsphere.conf to deploy CSI.
Check the CSI log, the auth check is triggered at 2 minutes interval

2020-10-16T23:49:05.838Z        DEBUG   common/authmanager.go:99        auth manager: datastoreIgnoreMapForBlockVolumes is updated to map[ds:///vmfs/volumes/f31142bc-65e6524d/:Datastore: Datastore:datastore-31, datastore URL: ds:///vmfs/volumes/f31142bc-65e6524d/]        {"TraceId": "97f5471b-1b06-4b9e-bd71-66180b351382"}


2020-10-16T23:51:05.866Z        DEBUG   common/authmanager.go:99        auth manager: datastoreIgnoreMapForBlockVolumes is updated to map[ds:///vmfs/volumes/f31142bc-65e6524d/:Datastore: Datastore:datastore-31, datastore URL: ds:///vmfs/volumes/f31142bc-65e6524d/]        {"TraceId": "0f13c5b2-faed-4071-80f5-6e9c95b192e1"}

2020-10-16T23:53:06.805Z        DEBUG   common/authmanager.go:99        auth manager: datastoreIgnoreMapForBlockVolumes is updated to map[ds:///vmfs/volumes/f31142bc-65e6524d/:Datastore: Datastore:datastore-31, datastore URL: ds:///vmfs/volumes/f31142bc-65e6524d/]        {"TraceId": "7623f98d-f0de-4ce0-af67-6f2ed905f3f4"}

Create a PVC, and PVC create succeed.

root@k8s-master:~# kubectl create -f pvc1.yaml
persistentvolumeclaim/example-vanilla-block-pvc1 created

root@k8s-master:~# kubectl get pvc
NAME                         STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS               AGE
example-vanilla-block-pvc    Bound    pvc-896cb635-cd45-4090-a0ed-6d8f833577f0   200Mi      RWO            example-vanilla-block-sc   7d1h
example-vanilla-block-pvc1   Bound    pvc-1bcc4c31-37bb-45b7-aabe-d2896993f42c   200Mi      RWO            example-vanilla-block-sc   50s

Release note:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 23, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @lipingxue. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 23, 2020
Copy link
Contributor

@SandeepPissay SandeepPissay left a comment

Choose a reason for hiding this comment

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

/ok-to-test

pkg/common/config/types.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 23, 2020
@lipingxue
Copy link
Contributor Author

/retest

Copy link
Contributor

@SandeepPissay SandeepPissay left a comment

Choose a reason for hiding this comment

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

Looks good. Just one comment.

example/vanilla-k8s-block-driver/vsphere.conf Outdated Show resolved Hide resolved
@chethanv28
Copy link
Collaborator

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chethanv28, lipingxue

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 23, 2020
@SandeepPissay
Copy link
Contributor

@lipingxue does this code affect CSI E2E tests for vanilla k8s? I'm asking since I do not see any E2E test results for this PR.

@SandeepPissay
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 27, 2020
@k8s-ci-robot k8s-ci-robot merged commit b0c26c0 into kubernetes-sigs:master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants