-
Notifications
You must be signed in to change notification settings - Fork 4
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
Powerflex pre-approved GUIDs #208
Conversation
Can one of the admins verify this patch? |
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.
Move merge target from main to a holding branch for 1.6, until patch release is in progress.
} | ||
defer r.Body.Close() | ||
|
||
var requestBody map[string]json.RawMessage |
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.
It doesn't look like the requestBody is used or modified in this handler. If we're not doing that, we don't need to read it.
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.
On a second look, we are doing this in other handler so it's ok to leave this. We will have the request body ready for the future incase we need to modify it.
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.
Okay. Left this
internal/sdc/sdc_approve.go
Outdated
|
||
// ApproveSdcField returns the redis formatted approved capacity field. | ||
func (r Request) ApproveSdcField() string { | ||
return "Approvesdc" |
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.
The existing fields in Redis are lowercase with underscores. Can this be changed to approve_sdc
?
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.
Done
cmd/karavictl/cmd/tenant_update.go
Outdated
@@ -0,0 +1,78 @@ | |||
// Copyright © 2021-2023 Dell Inc., or its subsidiaries. All Rights Reserved. |
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.
Please remove 2021
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.
done
@@ -0,0 +1,165 @@ | |||
// Copyright © 2021-2023 Dell Inc., or its subsidiaries. All Rights Reserved. |
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.
same comment as above
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.
done
internal/sdc/fake.go
Outdated
@@ -0,0 +1,32 @@ | |||
// Copyright © 2021-2023 Dell Inc., or its subsidiaries. All Rights Reserved. |
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.
Remove 2021
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.
done
internal/sdc/sdc_approve.go
Outdated
@@ -0,0 +1,130 @@ | |||
// Copyright © 2021-2023 Dell Inc., or its subsidiaries. All Rights Reserved. |
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.
Remove 2021
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.
done
internal/sdc/sdc_approve_test.go
Outdated
@@ -0,0 +1,177 @@ | |||
// Copyright © 2021-2023 Dell Inc., or its subsidiaries. All Rights Reserved. |
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.
remove 2021
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.
done
internal/proxy/powerflex_handler.go
Outdated
ans, err := decision.Can(func() decision.Query { | ||
return decision.Query{ | ||
Host: opaHost, | ||
// TODO(ian): This will need to be namespaced under "powerflex". |
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.
can this comment be removed?
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.
done
internal/sdc/sdc_approve.go
Outdated
|
||
// Request is a request to redis. | ||
type Request struct { | ||
//SystemID string `json:"systemId"` |
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.
if systemID isn't required here, can it be removed?
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.
done
@@ -0,0 +1,26 @@ | |||
package karavi.sdc.approve |
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.
are there plans to add this new sdc-approve policy to the helm-charts and csm operator authorization deployments?
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.
Added the support in helm-charts and csm-operator
45ae196
b291b3b
to
45ae196
Compare
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.
Giving an approval per request but I'm not qualified to audit the code.
@ashleyvjoy @khareRajshree can you quickly update and revert ? |
The variable name is self explanatory in the context of the function and Novus had already reviewed it. Regarding the copyright on the tenant.go file, can raise a new PR for copyright update without affecting the progress of this PR. Discussed it with Bharat |
@@ -13,7 +13,7 @@ | |||
# limitations under the License. | |||
|
|||
ARCH=amd64 | |||
SIDECAR_DOCKER_TAG=1.5.1 | |||
SIDECAR_DOCKER_TAG=nightly |
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.
Does this need to change to 1.6.0?
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.
The last information I got from Novus yesterday was that to keep that as nightly
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.
that will be addressed in another PR
run e2e test |
run e2e test |
Description
sdcApproveHandler
will allow/deny approve SDC request coming from driverside to the powerflex array based on the Tenant datakaravictl tenant create
karavictl tenant update
command to update the approvesdc flag valuekaravictl tenant get
updatedGitHub Issues
List the GitHub issues impacted by this PR:
| GitHub Issue # |
| dell/csm#402 |
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
Test A
Test B
logs.txt