Repository: kubernetes-sigs/aws-ebs-csi-driver
Pull request #773 (2021-03-02 23:24:39)

Add well-known topology label
**Is this a bug fix or adding new feature?**
Feature

**What is this PR about? / Why do we need it?**
See #729. This is the first part where we start writing the label and also give priority to it when reading topology labels. This change is completely backward-compatible with no change in behavior as far as users are concerned.

**What testing is done?** 
Unit tests
Single AZ e2e (there was one failed case that should be unrelated, probably flake)


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/773#" title="Author self-approved">ayberk</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Faws-ebs-csi-driver).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/master/OWNERS)~~ [ayberk]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
ayberk: /assign @wongma7 
/assign @AndyXiangLi 
k8s-ci-robot: @ayberk: GitHub didn't allow me to assign the following users: AndyXiangLi.

Note that only [kubernetes-sigs members](https://github.com/orgs/kubernetes-sigs/people), repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see [the contributor guide](https://git.k8s.io/community/contributors/guide/first-contribution.md#issue-assignment-in-github)

<details>

In response to [this](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/773#issuecomment-789297633):

>/assign @wongma7 
>/assign @AndyXiangLi 


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>
coveralls: ## Pull Request Test Coverage Report for [Build 1665](https://coveralls.io/builds/37597707)

* **15** of **15**   **(100.0%)**  changed or added relevant lines in **2** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.09%**) to **81.805%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/37597707/badge)](https://coveralls.io/builds/37597707) |
| :-- | --: |
| Change from base [Build 1663](https://coveralls.io/builds/37590770): |  0.09% |
| Covered Lines: | 1758 |
| Relevant Lines: | 2149 |

---
##### 💛  - [Coveralls](https://coveralls.io)

k8s-ci-robot: @ayberk: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-migration-test-latest | 1e47c91febd4d110c6a48bc1e0c66f7b97341824 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1366892241724903424) | `/test pull-aws-ebs-csi-driver-migration-test-latest`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
AndyXiangLi: LGTM, let's wait for another approval :-)
wongma7: /lgtm
k8s-ci-robot: @ayberk: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-single-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370506656122671104) | `/test pull-aws-ebs-csi-driver-e2e-single-az`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-single-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370506656122671104) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370506656198168576) | `/test pull-aws-ebs-csi-driver-migration-test-latest`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following test **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-multi-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370506656156225536) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
wongma7: sorry I think you have to rebase since I moved some stuff to node_linux.go ...
wongma7: ```

pkg/driver/node.go:27:2: imported and not used: "golang.org/x/sys/unix"
pkg/driver/node.go:36:2: volume redeclared as imported package name
	previous declaration at pkg/driver/node.go:28:2 
```
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-single-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370506656122671104) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370506656198168576) | `/test pull-aws-ebs-csi-driver-migration-test-latest`
pull-aws-ebs-csi-driver-e2e-multi-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370506656156225536) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`
pull-aws-ebs-csi-driver-unit | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370506656080728064) | `/test pull-aws-ebs-csi-driver-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-single-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370506656122671104) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370506656198168576) | `/test pull-aws-ebs-csi-driver-migration-test-latest`
pull-aws-ebs-csi-driver-e2e-multi-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370506656156225536) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`
pull-aws-ebs-csi-driver-unit | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370506656080728064) | `/test pull-aws-ebs-csi-driver-unit`
pull-aws-ebs-csi-driver-verify | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-verify/1370506656038785024) | `/test pull-aws-ebs-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: New changes are detected. LGTM label has been removed.
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-migration-test-latest | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370506656198168576) | `/test pull-aws-ebs-csi-driver-migration-test-latest`
pull-aws-ebs-csi-driver-e2e-multi-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370506656156225536) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`
pull-aws-ebs-csi-driver-unit | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370506656080728064) | `/test pull-aws-ebs-csi-driver-unit`
pull-aws-ebs-csi-driver-verify | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-verify/1370506656038785024) | `/test pull-aws-ebs-csi-driver-verify`
pull-aws-ebs-csi-driver-e2e-single-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370515937836404736) | `/test pull-aws-ebs-csi-driver-e2e-single-az`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-multi-az | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370506656156225536) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`
pull-aws-ebs-csi-driver-unit | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370506656080728064) | `/test pull-aws-ebs-csi-driver-unit`
pull-aws-ebs-csi-driver-verify | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-verify/1370506656038785024) | `/test pull-aws-ebs-csi-driver-verify`
pull-aws-ebs-csi-driver-e2e-single-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370515937836404736) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370515937983205376) | `/test pull-aws-ebs-csi-driver-migration-test-latest`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-unit | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370506656080728064) | `/test pull-aws-ebs-csi-driver-unit`
pull-aws-ebs-csi-driver-verify | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-verify/1370506656038785024) | `/test pull-aws-ebs-csi-driver-verify`
pull-aws-ebs-csi-driver-e2e-single-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370515937836404736) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370515937983205376) | `/test pull-aws-ebs-csi-driver-migration-test-latest`
pull-aws-ebs-csi-driver-e2e-multi-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370515937911902208) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-unit | dbb1b7102db5f176b932e0578205f2b975d1a9db | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370506656080728064) | `/test pull-aws-ebs-csi-driver-unit`
pull-aws-ebs-csi-driver-e2e-single-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370515937836404736) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370515937983205376) | `/test pull-aws-ebs-csi-driver-migration-test-latest`
pull-aws-ebs-csi-driver-e2e-multi-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370515937911902208) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`
pull-aws-ebs-csi-driver-verify | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-verify/1370515937697992704) | `/test pull-aws-ebs-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->
k8s-ci-robot: @ayberk: The following tests **failed**, say `/retest` to rerun all failed tests:

Test name | Commit | Details | Rerun command
--- | --- | --- | ---
pull-aws-ebs-csi-driver-e2e-single-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-single-az/1370515937836404736) | `/test pull-aws-ebs-csi-driver-e2e-single-az`
pull-aws-ebs-csi-driver-migration-test-latest | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-migration-test-latest/1370515937983205376) | `/test pull-aws-ebs-csi-driver-migration-test-latest`
pull-aws-ebs-csi-driver-e2e-multi-az | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-e2e-multi-az/1370515937911902208) | `/test pull-aws-ebs-csi-driver-e2e-multi-az`
pull-aws-ebs-csi-driver-verify | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-verify/1370515937697992704) | `/test pull-aws-ebs-csi-driver-verify`
pull-aws-ebs-csi-driver-unit | bde5e0e687fc123e3bda18d99acf36b86076efe3 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_aws-ebs-csi-driver/773/pull-aws-ebs-csi-driver-unit/1370515937760907264) | `/test pull-aws-ebs-csi-driver-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=aws-ebs-csi-driver&pr=773). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Aayberk). Please help us cut down on flakes by [linking to](https://git.k8s.io/community/contributors/devel/sig-testing/flaky-tests.md#filing-issues-for-flaky-tests) an [open issue](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/issues?q=is:issue+is:open) when you hit one in your PR.

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
</details>
<!-- test report -->

Patch:
diff --git a/pkg/driver/controller.go b/pkg/driver/controller.go
index ea923dce..45d3b5c7 100644
--- a/pkg/driver/controller.go
+++ b/pkg/driver/controller.go
@@ -569,13 +569,22 @@ func pickAvailabilityZone(requirement *csi.TopologyRequirement) string {
 		return ""
 	}
 	for _, topology := range requirement.GetPreferred() {
-		zone, exists := topology.GetSegments()[TopologyKey]
+		zone, exists := topology.GetSegments()[WellKnownTopologyKey]
+		if exists {
+			return zone
+		}
+
+		zone, exists = topology.GetSegments()[TopologyKey]
 		if exists {
 			return zone
 		}
 	}
 	for _, topology := range requirement.GetRequisite() {
-		zone, exists := topology.GetSegments()[TopologyKey]
+		zone, exists := topology.GetSegments()[WellKnownTopologyKey]
+		if exists {
+			return zone
+		}
+		zone, exists = topology.GetSegments()[TopologyKey]
 		if exists {
 			return zone
 		}
@@ -615,7 +624,7 @@ func newCreateVolumeResponse(disk *cloud.Disk) *csi.CreateVolumeResponse {
 		}
 	}
 
-	segments := map[string]string{TopologyKey: disk.AvailabilityZone}
+	segments := map[string]string{TopologyKey: disk.AvailabilityZone, WellKnownTopologyKey: disk.AvailabilityZone}
 
 	arn, err := arn.Parse(disk.OutpostArn)
 
diff --git a/pkg/driver/driver.go b/pkg/driver/driver.go
index e631e012..0e586f06 100644
--- a/pkg/driver/driver.go
+++ b/pkg/driver/driver.go
@@ -41,11 +41,14 @@ const (
 
 const (
 	DriverName      = "ebs.csi.aws.com"
-	TopologyKey     = "topology." + DriverName + "/zone"
 	AwsPartitionKey = "topology." + DriverName + "/partition"
 	AwsAccountIDKey = "topology." + DriverName + "/account-id"
 	AwsRegionKey    = "topology." + DriverName + "/region"
 	AwsOutpostIDKey = "topology." + DriverName + "/outpost-id"
+
+	WellKnownTopologyKey = "topology.kubernetes.io/zone"
+	// DEPRECATED Use the WellKnownTopologyKey instead
+	TopologyKey = "topology." + DriverName + "/zone"
 )
 
 type Driver struct {
diff --git a/pkg/driver/node.go b/pkg/driver/node.go
index b42b49d2..6ada6ee5 100644
--- a/pkg/driver/node.go
+++ b/pkg/driver/node.go
@@ -487,8 +487,11 @@ func (d *nodeService) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetC
 func (d *nodeService) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error) {
 	klog.V(4).Infof("NodeGetInfo: called with args %+v", *req)
 
+	zone := d.metadata.GetAvailabilityZone()
+
 	segments := map[string]string{
-		TopologyKey: d.metadata.GetAvailabilityZone(),
+		TopologyKey:          zone,
+		WellKnownTopologyKey: zone,
 	}
 
 	outpostArn := d.metadata.GetOutpostArn()


Test patch:
diff --git a/pkg/driver/controller_test.go b/pkg/driver/controller_test.go
index b4b1d7ec..ab0298ec 100644
--- a/pkg/driver/controller_test.go
+++ b/pkg/driver/controller_test.go
@@ -242,11 +242,12 @@ func TestCreateVolume(t *testing.T) {
 					AccessibleTopology: []*csi.Topology{
 						{
 							Segments: map[string]string{
-								TopologyKey:     expZone,
-								AwsAccountIDKey: outpostArn.AccountID,
-								AwsOutpostIDKey: outpostArn.Resource,
-								AwsRegionKey:    outpostArn.Region,
-								AwsPartitionKey: outpostArn.Partition,
+								TopologyKey:          expZone,
+								WellKnownTopologyKey: expZone,
+								AwsAccountIDKey:      outpostArn.AccountID,
+								AwsOutpostIDKey:      outpostArn.Resource,
+								AwsRegionKey:         outpostArn.Region,
+								AwsPartitionKey:      outpostArn.Partition,
 							},
 						},
 					},
@@ -1230,7 +1231,7 @@ func TestCreateVolume(t *testing.T) {
 					VolumeContext: map[string]string{},
 					AccessibleTopology: []*csi.Topology{
 						{
-							Segments: map[string]string{TopologyKey: expZone},
+							Segments: map[string]string{TopologyKey: expZone, WellKnownTopologyKey: expZone},
 						},
 					},
 				}
@@ -1724,6 +1725,33 @@ func TestPickAvailabilityZone(t *testing.T) {
 		requirement *csi.TopologyRequirement
 		expZone     string
 	}{
+		{
+			name: "Return WellKnownTopologyKey if present from preferred",
+			requirement: &csi.TopologyRequirement{
+				Requisite: []*csi.Topology{
+					{
+						Segments: map[string]string{TopologyKey: ""},
+					},
+				},
+				Preferred: []*csi.Topology{
+					{
+						Segments: map[string]string{TopologyKey: expZone, WellKnownTopologyKey: "foobar"},
+					},
+				},
+			},
+			expZone: "foobar",
+		},
+		{
+			name: "Return WellKnownTopologyKey if present from requisite",
+			requirement: &csi.TopologyRequirement{
+				Requisite: []*csi.Topology{
+					{
+						Segments: map[string]string{TopologyKey: expZone, WellKnownTopologyKey: "foobar"},
+					},
+				},
+			},
+			expZone: "foobar",
+		},
 		{
 			name: "Pick from preferred",
 			requirement: &csi.TopologyRequirement{
diff --git a/pkg/driver/node_test.go b/pkg/driver/node_test.go
index 0b16a858..b2198786 100644
--- a/pkg/driver/node_test.go
+++ b/pkg/driver/node_test.go
@@ -1470,6 +1470,9 @@ func TestNodeGetInfo(t *testing.T) {
 			if at.Segments[TopologyKey] != tc.availabilityZone {
 				t.Fatalf("Expected topology %q, got %q", tc.availabilityZone, at.Segments[TopologyKey])
 			}
+			if at.Segments[WellKnownTopologyKey] != tc.availabilityZone {
+				t.Fatalf("Expected well-known topology %q, got %q", tc.availabilityZone, at.Segments[WellKnownTopologyKey])
+			}
 
 			if at.Segments[AwsAccountIDKey] != tc.outpostArn.AccountID {
 				t.Fatalf("Expected AwsAccountId %q, got %q", tc.outpostArn.AccountID, at.Segments[AwsAccountIDKey])