-
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
Ingress removal storage svc #224
Conversation
cmd.Execute() | ||
|
||
if !gotCalled { | ||
t.Error("expected DeleteTenant to be called, but it wasn't") |
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.
Is it DeleteTenant to be called? Also the gotCalled was set to true anyways from the beginning?
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.
fixed, also noticed this on other karavictl test and updated the error logs
@@ -0,0 +1,127 @@ | |||
package middleware |
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.
Copy Right headers.
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
cmd/storage-service/main.go
Outdated
cfg Config | ||
) | ||
|
||
// Config is the configuration details on the tenant-service |
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.
should this config say its for storage service?
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.
fixed
@@ -0,0 +1,79 @@ | |||
// 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.
Don't need a range here if this file was just added
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.
fixed
9a5ef59
Description
This PR removes the storage-service ingress from the RPM, adds storage-service handlers to the proxy-server, updates karavictl to connect to the proxy-server instead of the storage-service, and adds telemetry updates.
Proxy-Server changes:
New service handler at internal/proxy/service_handler.go to handle these paths for karavictl:
POST /proxy/storage/ (create storage, storage info is in request body)
PATCH /proxy/storage/ (update storage, storage info is in request body)
GET /proxy/storage/ (list or get storage, storage name is in query parameter)
PATCH /proxy/storage/ (storage info is in request body)
The handlers for each path will parse the request and make the appropriate grpc request to the storage service.
Adds grpc connection interceptors which will automatically create tracing spans for grpc client requests.
New http middleware called TelemetryMW. This will log the time taken for the next handler to complete and record the error in the span. The telemetry will happen only if the next handler is the type HandlerWithError. This handler returns an error specifically for recording in the span.
type HandlerWithError func(w http.ResponseWriter, r *http.Request) error
karavictl changes:
karavictl commands that previously connected to the storage-service via grpc now connect to the proxy-server via https
New file cmd/karavictl/cmd/api/api.go which is a generic http client inspired by https://github.com/dell/goscaleio/blob/main/api/api.go
karavictl will build this generic http client and execute the appropriate request
Storage-service changes:
Adds grpc server interceptors which will automatically create tracing spans for incoming requests.
Adds telemetry middleware at internal/storage-service/middleware/storage_telemetry.go to log the time taken for the request, log request info, and set the request info in the span
Most if not all code is similar to Tenant-service changes made by Aaron Tye
GitHub Issues
List the GitHub issues impacted by this PR:
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
Powerflex E2E Test, and manual test (Containerized, RPM, and CSM-Operator)