Repository: kubernetes-sigs/gcp-filestore-csi-driver
Pull request #390 (2022-11-18 19:28:43)

Silent volume provisioning surprise
What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:


/kind bug


What this PR does / why we need it:
See Below

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

```release-note
Previous Behavior: 
   * if a user requested a volume size smaller than the Standard minimum (1TB), we'd quietly round up to the standard Minimum.
   * we didn't account for different tiers having different minimums
   * we didn't check against the maximum volume size for a tier

New Behavior: 
  * Compare against min/max values of provided tier, instead of always standard. (If tier is unrecognized, default to standard)
  * If the requested min is less than possible min, and no upper bound is given, return an error instead of quietly rounding up
  * vice versa for max
  
```

k8s-ci-robot: @hsadoyan: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our [release note process](https://git.k8s.io/community/contributors/guide/release-notes.md) to remove it.

<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.
</details>
linux-foundation-easycla[bot]:  <a href="https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/20677499/139204938/390/#/?version=2"><img src="https://s3.amazonaws.com/cla-project-logo-prod/cla-not-signed.svg" alt="CLA Not Signed" align="left" height="28" width="328"></a><br/><br /><ul><li><a href='https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/20677499/139204938/390/#/?version=2' target='_blank'>:x:</a> - login: @hsadoyan / name: Harry Sadoyan . The commit (3656c22b37013140831153e5f0ce02f89a797391, 185c571bf6e197a150e14d3a30bd8cb9a2e5c7f2) is not authorized under a signed CLA. <a href='https://api.easycla.lfx.linuxfoundation.org/v2/repository-provider/github/sign/20677499/139204938/390/#/?version=2' target='_blank'>Please click here to be authorized</a>. For further assistance with EasyCLA, <a href='https://jira.linuxfoundation.org/servicedesk/customer/portal/4' target='_blank'>please submit a support request ticket</a>.</li></ul>
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/390#" title="Author self-approved">hsadoyan</a>*
**Once this PR has been reviewed and has the lgtm label**, please assign msau42 for approval by writing `/assign @msau42` in a comment. For more information see [the Kubernetes Code Review Process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process).

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

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

- **[OWNERS](https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/blob/master/OWNERS)**

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":["msau42"]} -->
leiyiz: /ok-to-test
k8s-ci-robot: @hsadoyan: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-verify | 086f9612dc2d9efdd620062eb8139c0c7b9275e0 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1593734441706983424/) | true | `/test pull-gcp-filestore-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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 -->
leiyiz: please add a release note section in your PR description too. like so:

``` release-note
xxxxx
```

k8s-ci-robot: @hsadoyan: PR needs rebase.

<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.
</details>
k8s-ci-robot: @hsadoyan: The following test **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594821404337901568/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594821404337901568/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-verify | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1594821404291764224/) | true | `/test pull-gcp-filestore-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594821404337901568/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-verify | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1594821404291764224/) | true | `/test pull-gcp-filestore-csi-driver-verify`
pull-gcp-filestore-csi-driver-unit | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-unit/1594821404258209792/) | true | `/test pull-gcp-filestore-csi-driver-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594821404337901568/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-verify | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1594821404291764224/) | true | `/test pull-gcp-filestore-csi-driver-verify`
pull-gcp-filestore-csi-driver-unit | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-unit/1594821404258209792/) | true | `/test pull-gcp-filestore-csi-driver-unit`
pull-gcp-filestore-csi-driver-e2e | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594821404191100928/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: PR needs rebase.

<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.
</details>
k8s-ci-robot: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594821404191100928/) | true | `/test pull-gcp-filestore-csi-driver-e2e`
pull-gcp-filestore-csi-driver-kubernetes-integration | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594825376897437696/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-unit | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-unit/1594825376830328832/) | true | `/test pull-gcp-filestore-csi-driver-unit`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 09aa0053a0ff7beb47dca911d9c4ade9ec6c65bb | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594821404191100928/) | true | `/test pull-gcp-filestore-csi-driver-e2e`
pull-gcp-filestore-csi-driver-kubernetes-integration | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594825376897437696/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-unit | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-unit/1594825376830328832/) | true | `/test pull-gcp-filestore-csi-driver-unit`
pull-gcp-filestore-csi-driver-verify | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1594825376859688960/) | true | `/test pull-gcp-filestore-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594825376897437696/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-unit | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-unit/1594825376830328832/) | true | `/test pull-gcp-filestore-csi-driver-unit`
pull-gcp-filestore-csi-driver-verify | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1594825376859688960/) | true | `/test pull-gcp-filestore-csi-driver-verify`
pull-gcp-filestore-csi-driver-e2e | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594825376754831360/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594825376897437696/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-unit | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-unit/1594825376830328832/) | true | `/test pull-gcp-filestore-csi-driver-unit`
pull-gcp-filestore-csi-driver-verify | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1594825376859688960/) | true | `/test pull-gcp-filestore-csi-driver-verify`
pull-gcp-filestore-csi-driver-e2e | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594825376754831360/) | true | `/test pull-gcp-filestore-csi-driver-e2e`
pull-gcp-filestore-csi-driver-sanity | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-sanity/1594825376796774400/) | true | `/test pull-gcp-filestore-csi-driver-sanity`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594825376897437696/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-e2e | a3aea9aa9ed688ffab6a1d0fa1268f0e6554ae90 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594833296234123264/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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 -->
leiyiz: /retest
leiyiz: /lgtm
leiyiz: /approve
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/390#" title="Author self-approved">hsadoyan</a>*, *<a href="https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/pull/390#issuecomment-1322803754" title="Approved">leiyiz</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fgcp-filestore-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/gcp-filestore-csi-driver/blob/master/OWNERS)~~ [leiyiz]

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":[]} -->
k8s-ci-robot: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 5379181c2c3379fa6c85e7d4494e2a07a82e86e1 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1594825376897437696/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-e2e | 29a48ce33e540803a7a959a155105b2756b5b806 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594846536125124608/) | true | `/test pull-gcp-filestore-csi-driver-e2e`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 29a48ce33e540803a7a959a155105b2756b5b806 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594846536125124608/) | true | `/test pull-gcp-filestore-csi-driver-e2e`
pull-gcp-filestore-csi-driver-verify | 17f2389851bcb2532eed6157ed10ffe3c779412c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1597354252164927488/) | true | `/test pull-gcp-filestore-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-e2e | 29a48ce33e540803a7a959a155105b2756b5b806 | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-e2e/1594846536125124608/) | true | `/test pull-gcp-filestore-csi-driver-e2e`
pull-gcp-filestore-csi-driver-verify | 17f2389851bcb2532eed6157ed10ffe3c779412c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1597354252164927488/) | true | `/test pull-gcp-filestore-csi-driver-verify`
pull-gcp-filestore-csi-driver-kubernetes-integration | 17f2389851bcb2532eed6157ed10ffe3c779412c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1597354252206870528/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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 -->
hsadoyan: /retest

k8s-ci-robot: @hsadoyan: The following tests **failed**, say `/retest` to rerun all failed tests or `/retest-required` to rerun all mandatory failed tests:

Test name | Commit | Details | Required | Rerun command
--- | --- | --- | --- | ---
pull-gcp-filestore-csi-driver-kubernetes-integration | 17f2389851bcb2532eed6157ed10ffe3c779412c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-kubernetes-integration/1597354252206870528/) | false | `/test pull-gcp-filestore-csi-driver-kubernetes-integration`
pull-gcp-filestore-csi-driver-verify | 17f2389851bcb2532eed6157ed10ffe3c779412c | [link](https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/sigs.k8s.io_gcp-filestore-csi-driver/390/pull-gcp-filestore-csi-driver-verify/1597397543552028672/) | true | `/test pull-gcp-filestore-csi-driver-verify`

[Full PR test history](https://prow.k8s.io/pr-history?org=kubernetes-sigs&repo=gcp-filestore-csi-driver&pr=390). [Your PR dashboard](https://prow.k8s.io/pr?query=is%3Apr%20state%3Aopen%20author%3Ahsadoyan). 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/gcp-filestore-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/csi_driver/controller.go b/pkg/csi_driver/controller.go
index e35b1995..14cfa5dc 100644
--- a/pkg/csi_driver/controller.go
+++ b/pkg/csi_driver/controller.go
@@ -33,15 +33,26 @@ import (
 )
 
 const (
-	// premium tier min is 2.5 Tb, let GCFS error
-	minVolumeSize     int64 = 1 * util.Tb
-	modeInstance            = "modeInstance"
-	newInstanceVolume       = "vol1"
+	modeInstance      = "modeInstance"
+	newInstanceVolume = "vol1"
 
 	defaultTier    = "standard"
 	enterpriseTier = "enterprise"
+	premiumTier    = "premium"
+	basicHDDTier   = "basic_hdd"
+	basicSSDTier   = "basic_ssd"
+	highScaleTier  = "high_scale_ssd"
 	defaultNetwork = "default"
 
+	defaultTierMinSize    = 1 * util.Tb
+	defaultTierMaxSize    = 639 * util.Tb / 10
+	enterpriseTierMinSize = 1 * util.Tb
+	enterpriseTierMaxSize = 10 * util.Tb
+	highScaleTierMinSize  = 10 * util.Tb
+	highScaleTierMaxSize  = 100 * util.Tb
+	premiumTierMinSize    = 25 * util.Tb / 10
+	premiumTierMaxSize    = 639 * util.Tb / 10
+
 	directPeering        = "DIRECT_PEERING"
 	privateServiceAccess = "PRIVATE_SERVICE_ACCESS"
 
@@ -84,6 +95,11 @@ const (
 	tagKeyClusterLocation          = "storage_gke_io_cluster_location"
 )
 
+type capacityRangeForTier struct {
+	min int64
+	max int64
+}
+
 // controllerServer handles volume provisioning
 type controllerServer struct {
 	config *controllerServerConfig
@@ -137,7 +153,8 @@ func (s *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolu
 		return nil, status.Error(codes.InvalidArgument, err.Error())
 	}
 
-	capBytes, err := getRequestCapacity(req.GetCapacityRange())
+	tier := getTierFromParams(req.GetParameters())
+	capBytes, err := getRequestCapacity(req.GetCapacityRange(), tier)
 	if err != nil {
 		return nil, status.Error(codes.InvalidArgument, err.Error())
 	}
@@ -416,36 +433,98 @@ func (s *controllerServer) ControllerGetCapabilities(ctx context.Context, req *c
 	}, nil
 }
 
-// getRequestCapacity returns the volume size that should be provisioned
-func getRequestCapacity(capRange *csi.CapacityRange) (int64, error) {
-	if capRange == nil {
-		return minVolumeSize, nil
+// getTierFromParams returns the provided tier or default
+func getTierFromParams(params map[string]string) string {
+	if val, ok := params[paramTier]; ok {
+		return val
 	}
 
-	rCap := capRange.GetRequiredBytes()
-	rSet := rCap > 0
-	lCap := capRange.GetLimitBytes()
-	lSet := lCap > 0
+	return defaultTier
+}
+
+// validator function to check for invalid capacity size requests
+func invalidCapacityRange(capRange *csi.CapacityRange, tier string) error {
+	validRange := provisionableCapacityForTier(tier)
 
-	if lSet && rSet && lCap < rCap {
-		return 0, fmt.Errorf("limit bytes %v is less than required bytes %v", lCap, rCap)
+	requiredCap := capRange.GetRequiredBytes()
+	requireSet := requiredCap > 0
+	limitCap := capRange.GetLimitBytes()
+	limitSet := limitCap > 0
+
+	if limitSet && requireSet && limitCap < requiredCap {
+		return fmt.Errorf("limit bytes %vTiB is less than required bytes %vTiB", float64(limitCap)/util.Tb, float64(requiredCap)/util.Tb)
 	}
 
-	if lSet && lCap < minVolumeSize {
-		return 0, fmt.Errorf("limit bytes %v is less than minimum instance size bytes %v", lCap, minVolumeSize)
+	if requireSet {
+		if requiredCap > validRange.max {
+			return fmt.Errorf("request bytes %vTiB is more than maximum instance size bytes %vTiB for tier %s", float64(requiredCap)/util.Tb, float64(validRange.max)/util.Tb, tier)
+		}
+
+		if !limitSet && requiredCap < validRange.min {
+			// Avoid surprising users by provisioning more than Requested
+			klog.Warningf("required bytes %vTiB is less than minimum instance size capacity %vTiB for tier %s, but no upper bound was specified. Rounding up capacity request to %vTiB for tier %s.", float64(requiredCap)/util.Tb, float64(validRange.min)/util.Tb, tier, float64(validRange.min)/util.Tb, tier)
+		}
 	}
+	if limitSet {
+		if limitCap < validRange.min {
+			return fmt.Errorf("limit bytes %vTiB is less than minimum instance size bytes %vTiB for tier %s", float64(limitCap)/util.Tb, float64(validRange.min)/util.Tb, tier)
 
-	if lSet {
-		if rCap == 0 {
-			// request not set
-			return lCap, nil
 		}
-		// request set, round up to min
-		return util.Max(rCap, minVolumeSize), nil
+		if !requireSet && limitCap > validRange.max {
+			// Avoid surprising users by provisioning less than Requested
+			klog.Warningf("required bytes %vTiB is greater than maximum instance size capacity %vTiB for tier %s, but no lower bound was specified. Rounding down capacity request to %vTiB for tier %s", float64(limitCap)/util.Tb, float64(validRange.max)/util.Tb, tier, float64(validRange.max)/util.Tb, tier)
+		}
+	}
+
+	return nil
+}
+
+// init function to get min and max volume sizes per tier
+func provisionableCapacityForTier(tier string) capacityRangeForTier {
+	defaultRange := capacityRangeForTier{min: defaultTierMinSize, max: defaultTierMaxSize}
+	enterpriseRange := capacityRangeForTier{min: enterpriseTierMinSize, max: enterpriseTierMaxSize}
+	highScaleRange := capacityRangeForTier{min: highScaleTierMinSize, max: highScaleTierMaxSize}
+	premiumRange := capacityRangeForTier{min: premiumTierMinSize, max: premiumTierMaxSize}
+	provisionableCapacityForTier := map[string]capacityRangeForTier{
+		defaultTier:    defaultRange,
+		enterpriseTier: enterpriseRange,
+		highScaleTier:  highScaleRange,
+		premiumTier:    premiumRange,
+		basicSSDTier:   premiumRange, //these two are aliases
+		basicHDDTier:   defaultRange, //these two are aliases
+	}
+
+	validRange, ok := provisionableCapacityForTier[tier]
+	if !ok {
+		validRange = provisionableCapacityForTier[defaultTier]
+	}
+	return validRange
+}
+
+// getRequestCapacity returns the volume size that should be provisioned
+func getRequestCapacity(capRange *csi.CapacityRange, tier string) (int64, error) {
+	validRange := provisionableCapacityForTier(tier)
+
+	if capRange == nil {
+		return validRange.min, nil
 	}
 
-	// limit not set
-	return util.Max(rCap, minVolumeSize), nil
+	if err := invalidCapacityRange(capRange, tier); err != nil {
+		return 0, err
+	}
+
+	requiredCap := capRange.GetRequiredBytes()
+	requireSet := requiredCap > 0
+	maxRequired := capRange.GetLimitBytes()
+	limitSet := maxRequired > 0
+
+	if requireSet {
+		return util.Max(requiredCap, validRange.min), nil
+	} else if limitSet {
+		return util.Min(maxRequired, validRange.max), nil
+	} else {
+		return validRange.min, nil
+	}
 }
 
 // generateNewFileInstance populates the GCFS Instance object using
@@ -558,11 +637,6 @@ func (s *controllerServer) ControllerExpandVolume(ctx context.Context, req *csi.
 		return response, err
 	}
 
-	reqBytes, err := getRequestCapacity(req.GetCapacityRange())
-	if err != nil {
-		return nil, status.Error(codes.InvalidArgument, err.Error())
-	}
-
 	if acquired := s.config.volumeLocks.TryAcquire(volumeID); !acquired {
 		return nil, status.Errorf(codes.Aborted, util.VolumeOperationAlreadyExistsFmt, volumeID)
 	}
@@ -573,6 +647,11 @@ func (s *controllerServer) ControllerExpandVolume(ctx context.Context, req *csi.
 		return nil, status.Error(codes.InvalidArgument, err.Error())
 	}
 
+	reqBytes, err := getRequestCapacity(req.GetCapacityRange(), filer.Tier)
+	if err != nil {
+		return nil, status.Error(codes.InvalidArgument, err.Error())
+	}
+
 	filer.Project = s.config.cloud.Project
 	filer, err = s.config.fileService.GetInstance(ctx, filer)
 	if err != nil {


Test patch:
diff --git a/pkg/csi_driver/controller_test.go b/pkg/csi_driver/controller_test.go
index 708e8c30..1ae654ca 100644
--- a/pkg/csi_driver/controller_test.go
+++ b/pkg/csi_driver/controller_test.go
@@ -238,24 +238,29 @@ func TestGetRequestCapacity(t *testing.T) {
 		name          string
 		capRange      *csi.CapacityRange
 		bytes         int64
+		tier          string
 		errorExpected bool
 	}{
 		{
 			name:  "default",
 			bytes: 1 * util.Tb,
+			tier:  defaultTier,
 		},
 		{
-			name: "required below min",
+			name: "required below min, limit not provided",
 			capRange: &csi.CapacityRange{
 				RequiredBytes: 100 * util.Gb,
 			},
-			bytes: 1 * util.Tb,
+			tier:          defaultTier,
+			bytes:         1 * util.Tb,
+			errorExpected: false,
 		},
 		{
 			name: "required equals min",
 			capRange: &csi.CapacityRange{
 				RequiredBytes: 1 * util.Tb,
 			},
+			tier:  defaultTier,
 			bytes: 1 * util.Tb,
 		},
 		{
@@ -263,6 +268,7 @@ func TestGetRequestCapacity(t *testing.T) {
 			capRange: &csi.CapacityRange{
 				RequiredBytes: 1*util.Tb + 1*util.Gb,
 			},
+			tier:  defaultTier,
 			bytes: 1*util.Tb + 1*util.Gb,
 		},
 		{
@@ -270,6 +276,7 @@ func TestGetRequestCapacity(t *testing.T) {
 			capRange: &csi.CapacityRange{
 				LimitBytes: 1 * util.Tb,
 			},
+			tier:  defaultTier,
 			bytes: 1 * util.Tb,
 		},
 		{
@@ -277,6 +284,7 @@ func TestGetRequestCapacity(t *testing.T) {
 			capRange: &csi.CapacityRange{
 				LimitBytes: 1*util.Tb + 1*util.Gb,
 			},
+			tier:  defaultTier,
 			bytes: 1*util.Tb + 1*util.Gb,
 		},
 		{
@@ -285,6 +293,7 @@ func TestGetRequestCapacity(t *testing.T) {
 				RequiredBytes: 100 * util.Gb,
 				LimitBytes:    2 * util.Tb,
 			},
+			tier:  defaultTier,
 			bytes: 1 * util.Tb,
 		},
 		{
@@ -293,6 +302,7 @@ func TestGetRequestCapacity(t *testing.T) {
 				RequiredBytes: 100 * util.Gb,
 				LimitBytes:    500 * util.Gb,
 			},
+			tier:          defaultTier,
 			errorExpected: true,
 		},
 		{
@@ -301,20 +311,173 @@ func TestGetRequestCapacity(t *testing.T) {
 				RequiredBytes: 5 * util.Tb,
 				LimitBytes:    2 * util.Tb,
 			},
+			tier:          defaultTier,
+			errorExpected: true,
+		},
+		{
+			name: "limit below min default",
+			capRange: &csi.CapacityRange{
+				LimitBytes: 100 * util.Gb,
+			},
+			tier:          defaultTier,
+			errorExpected: true,
+		},
+		{
+			name: "required above max default",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 100 * util.Tb,
+			},
+			tier:          defaultTier,
+			errorExpected: true,
+		},
+		{
+			name: "limit above max and no min provided",
+			capRange: &csi.CapacityRange{
+				LimitBytes: 100 * util.Tb,
+			},
+			tier:          defaultTier,
+			bytes:         639 * util.Tb / 10,
+			errorExpected: false,
+		},
+		{
+			name: "limit above max but min in range",
+			capRange: &csi.CapacityRange{
+				LimitBytes:    100 * util.Tb,
+				RequiredBytes: 15 * util.Tb,
+			},
+			tier:  defaultTier,
+			bytes: 15 * util.Tb,
+		},
+		{
+			name: "limit below min enterprise",
+			capRange: &csi.CapacityRange{
+				LimitBytes: 100 * util.Gb,
+			},
+			tier:          enterpriseTier,
+			errorExpected: true,
+		},
+		{
+			name: "required above max enterprise",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 100 * util.Tb,
+			},
+			tier:          enterpriseTier,
+			errorExpected: true,
+		},
+		{
+			name: "required and limit both in range enterprise",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 2 * util.Tb,
+				LimitBytes:    3 * util.Tb,
+			},
+			tier:  enterpriseTier,
+			bytes: 2 * util.Tb,
+		},
+		{
+			name: "limit below min highScale",
+			capRange: &csi.CapacityRange{
+				LimitBytes: 5 * util.Tb,
+			},
+			tier:          highScaleTier,
+			errorExpected: true,
+		},
+		{
+			name: "required above max highScale",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 200 * util.Tb,
+			},
+			tier:          highScaleTier,
 			errorExpected: true,
 		},
 		{
-			name: "limit below min",
+			name: "required and limit both in range highScale",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 20 * util.Tb,
+				LimitBytes:    30 * util.Tb,
+			},
+			tier:  highScaleTier,
+			bytes: 20 * util.Tb,
+		},
+		{
+			name: "limit below min premium",
+			capRange: &csi.CapacityRange{
+				LimitBytes: 1 * util.Tb,
+			},
+			tier:          premiumTier,
+			errorExpected: true,
+		},
+		{
+			name: "required above max premium",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 70 * util.Tb,
+			},
+			tier:          premiumTier,
+			errorExpected: true,
+		},
+		{
+			name: "required and limit both in range premium",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 3 * util.Tb,
+				LimitBytes:    60 * util.Tb,
+			},
+			tier:  premiumTier,
+			bytes: 3 * util.Tb,
+		},
+		{
+			name: "limit below min basicSSD",
+			capRange: &csi.CapacityRange{
+				LimitBytes: 1 * util.Tb,
+			},
+			tier:          basicSSDTier,
+			errorExpected: true,
+		},
+		{
+			name: "required above max basicSSD",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 70 * util.Tb,
+			},
+			tier:          basicSSDTier,
+			errorExpected: true,
+		},
+		{
+			name: "required and limit both in range basicSSD",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 3 * util.Tb,
+				LimitBytes:    60 * util.Tb,
+			},
+			tier:  basicSSDTier,
+			bytes: 3 * util.Tb,
+		},
+		{
+			name: "limit below min basicHDD",
 			capRange: &csi.CapacityRange{
 				LimitBytes: 100 * util.Gb,
 			},
+			tier:          basicHDDTier,
 			errorExpected: true,
 		},
+		{
+			name: "required above max basicHDD",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 70 * util.Tb,
+			},
+			tier:          basicHDDTier,
+			errorExpected: true,
+		},
+		{
+			name: "required and limit both in range basicHDD",
+			capRange: &csi.CapacityRange{
+				RequiredBytes: 1 * util.Tb,
+				LimitBytes:    60 * util.Tb,
+			},
+			tier:  basicHDDTier,
+			bytes: 1 * util.Tb,
+		},
 	}
 
 	for _, tc := range cases {
 		t.Run(tc.name, func(t *testing.T) {
-			bytes, err := getRequestCapacity(tc.capRange)
+			bytes, err := getRequestCapacity(tc.capRange, tc.tier)
 			if err != nil && tc.errorExpected {
 				return
 			}