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

Scope pool/dataset lookups to root path #7

Open
maxirus opened this issue Feb 25, 2021 · 0 comments
Open

Scope pool/dataset lookups to root path #7

maxirus opened this issue Feb 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@maxirus
Copy link
Contributor

maxirus commented Feb 25, 2021

When looking for datasets the the CSI Driver has created, it scans the output of pool/dataset (see docs & example) which retrieves all of the datasets in TrueNAS.

Instead, these on_get methods should scope the datasets to parameters.root path given in the StorageClass.

At first look, it doesn't appear this parameter is passed down in the request (see spec) so will most likely needed to be loaded from the Secret as an env var (DEFAULT_ROOT ?). Given the above, the req paths go from pool/dataset to pool/dataset?id=${DEFAULT_ROOT}.

Example curl command:
curl -X GET "https://freenas.host/api/v2.0/pool/dataset?id=tank/k8s-iscsi" -H "accept: */*" -su 'root'

maxirus added a commit to maxirus/truenas-csp that referenced this issue Mar 2, 2021
# This is the 1st commit message:

ebasing to upstream

# This is the commit message hpe-storage#2:

Fixing log message

# This is the commit message hpe-storage#3:

Testing basic auth

# This is the commit message hpe-storage#4:

Fixing missing var error

# This is the commit message hpe-storage#5:

Fixing username

# This is the commit message hpe-storage#6:

Fixing username scope

# This is the commit message hpe-storage#7:

Printing headers

# This is the commit message hpe-storage#8:

Pulling credentials from ENV var

# This is the commit message hpe-storage#9:

Fixing Syntax error :(

# This is the commit message hpe-storage#10:

Removing comments

# This is the commit message hpe-storage#11:

Adding username/password vars

# This is the commit message hpe-storage#12:

Updating Docs

# This is the commit message hpe-storage#13:

testing getting root path

# This is the commit message hpe-storage#14:

Testing root in Volume method

# This is the commit message hpe-storage#15:

adding more debug statements

# This is the commit message hpe-storage#16:

Whoops

# This is the commit message hpe-storage#17:

req.media is None

# This is the commit message hpe-storage#18:

reverting Deployment

# This is the commit message hpe-storage#19:

Using token parsing instead of ENV Var to set creds

# This is the commit message hpe-storage#20:

Removing debug lines

# This is the commit message hpe-storage#21:

Updating Docs

# This is the commit message hpe-storage#22:

Putting needed token var back

# This is the commit message hpe-storage#23:

Upstream

# This is the commit message hpe-storage#24:

Adding back newline
@datamattsson datamattsson added the enhancement New feature or request label Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants