-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Removed Destination's Get
API from the public-api
#5993
Conversation
This is the first step towards removing the `linkerd-controller` pod. It deals with removing the Destination `Get` http and gRPC endpoint it exposes, that only the `linkerd diagnostics endpoints` is consuming. Removed all references to Destination in the public-api, including all the gRPC-to-http-to-gRPC forwardings: - Removed the `Get` method from the public-api gRPC server that forwarded the connection from the controller pod to the destination pod. Clients should now connect directly to the destination service via gRPC. - Likewise, removed the destination boilerplate in the public-api http server (and its `main.go`) that served the `Get` destination endpoint and forwarded it into the gRPC server. - Finally, removed the destination boilerplate from the public-api's `client.go` that created a client connecting to the http API. In order to connect to the `Get` API, the `endpoints` command now calls a `GetDestinationClient` method in `api.go` that runs a series of healthchecks. The healthchecks have a new entry "can initialize the destination client" that builds the destination client, by calling a new function `NewExternalClient` defined in `controller/api/destination/client.go` that port-forwards the destination service before creating a gRPC client pointing to it. This change will be followed-up by the replacement of the `Version` API, and another separate change for completely removing the `linkerd-controller` once all its clients have been dealt with.
This is a sibling PR to #5993, and it's the second step towards removing the `linkerd-controller` pod. This one deals with a replacement for the `Version` API, fetching instead the `linkerd-config` CM and retrieving the `LinkerdVersion` value. ## Changes to the public-api - Removal of the `publicPb.ApiClient` entry from the `Client` interface - Removal of the `publicPb.ApiServer` entry from the `Server` interface - Removal of the `Version` and related methods from `client.go`, `grpc_server.go` and `http_server.go` ## Changes to `linkerd version` - Removal of all references to the public API. - Call `healthcheck.GetServerVersion` to retrieve the version ## Changes to `linkerd check` - Removal of the "can query the control API" check from the "linkerd-api" section - Addition of a new "can retrieve the control plane version" check under the "control-plane-version" section ## Changes to `linkerd-web` - The version is now retrieved from the `linkerd-config` CM instead of a public-API call. - Removal of all references to the public API. - Removal of the `data-go-version` global attribute on the dashboard, which wasn't being used. ## Other changes - Added `ValuesFromConfigMap` function in `values.go` to convert the `linkerd-config` CM into a `*Values` struct instance - Removal of the `public` protobuf
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.
This looks good but I agree with Alex's comment. Should be good for approval after that 👍
…out going through healthchecks
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.
Awesome that last changed cleaned up a lot. Thanks @alpeb!
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.
LGTM
* Removed `Version` API from the public-api This is a sibling PR to #5993, and it's the second step towards removing the `linkerd-controller` pod. This one deals with a replacement for the `Version` API, fetching instead the `linkerd-config` CM and retrieving the `LinkerdVersion` value. ## Changes to the public-api - Removal of the `publicPb.ApiClient` entry from the `Client` interface - Removal of the `publicPb.ApiServer` entry from the `Server` interface - Removal of the `Version` and related methods from `client.go`, `grpc_server.go` and `http_server.go` ## Changes to `linkerd version` - Removal of all references to the public API. - Call `healthcheck.GetServerVersion` to retrieve the version ## Changes to `linkerd check` - Removal of the "can query the control API" check from the "linkerd-api" section - Addition of a new "can retrieve the control plane version" check under the "control-plane-version" section ## Changes to `linkerd-web` - The version is now retrieved from the `linkerd-config` CM instead of a public-API call. - Removal of all references to the public API. - Removal of the `data-go-version` global attribute on the dashboard, which wasn't being used. ## Other changes - Added `ValuesFromConfigMap` function in `values.go` to convert the `linkerd-config` CM into a `*Values` struct instance - Removal of the `public` protobuf - Refactor 'linkerd repair' to use the refactored 'healthcheck.GetServerVersion()' function
Now that we got rid of the `Version` API (#6000) and the destination API forwarding business in `linkerd-controller` (#5993), we can get rid of the `linkerd-controller` pod. ## Removals - Deleted everything under `/controller/api/public` and `/controller/cmd/public-api`. - Moved `/controller/api/public/test_helper.go` to `/controller/api/destination/test_helper.go` because those are really utils for destination testing. I also extracted from there the prometheus mock structs and put that under `/pkg/prometheus/test_helper.go`, which is now by both the `linkerd diagnostics endpoints` and the `metrics-api` tests, removing some duplication. - Deleted the `controller.yaml` and `controller-rbac.yaml` helm templates along with the `publicAPIResources` and `publicAPIProxyResources` helm values. ## Health checks - Removed the `can initialize the client` check given such client is no longer needed. The `linkerd-api` section was left with only the check `control pods are ready`, so I moved that under the `linkerd-existence` section and got rid of the `linkerd-api` section altogether. - In that same `linkerd-existence` section, got rid of the `controller pod is running` check. ## Other changes - Fixed the Control Plane section of the dashboard, taking account the disappearance of `linkerd-controller` and previously, of `linkerd-sp-validator`.
* Remove the `linkerd-controller` pod Now that we got rid of the `Version` API (#6000) and the destination API forwarding business in `linkerd-controller` (#5993), we can get rid of the `linkerd-controller` pod. ## Removals - Deleted everything under `/controller/api/public` and `/controller/cmd/public-api`. - Moved `/controller/api/public/test_helper.go` to `/controller/api/destination/test_helper.go` because those are really utils for destination testing. I also extracted from there the prometheus mock structs and put that under `/pkg/prometheus/test_helper.go`, which is now by both the `linkerd diagnostics endpoints` and the `metrics-api` tests, removing some duplication. - Deleted the `controller.yaml` and `controller-rbac.yaml` helm templates along with the `publicAPIResources` and `publicAPIProxyResources` helm values. ## Health checks - Removed the `can initialize the client` check given such client is no longer needed. The `linkerd-api` section was left with only the check `control pods are ready`, so I moved that under the `linkerd-existence` section and got rid of the `linkerd-api` section altogether. - In that same `linkerd-existence` section, got rid of the `controller pod is running` check. ## Other changes - Fixed the Control Plane section of the dashboard, taking account the disappearance of `linkerd-controller` and previously, of `linkerd-sp-validator`.
* Removed Destination's `Get` API from the public-api This is the first step towards removing the `linkerd-controller` pod. It deals with removing the Destination `Get` http and gRPC endpoint it exposes, that only the `linkerd diagnostics endpoints` is consuming. Removed all references to Destination in the public-api, including all the gRPC-to-http-to-gRPC forwardings: - Removed the `Get` method from the public-api gRPC server that forwarded the connection from the controller pod to the destination pod. Clients should now connect directly to the destination service via gRPC. - Likewise, removed the destination boilerplate in the public-api http server (and its `main.go`) that served the `Get` destination endpoint and forwarded it into the gRPC server. - Finally, removed the destination boilerplate from the public-api's `client.go` that created a client connecting to the http API. Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
* Removed `Version` API from the public-api This is a sibling PR to linkerd#5993, and it's the second step towards removing the `linkerd-controller` pod. This one deals with a replacement for the `Version` API, fetching instead the `linkerd-config` CM and retrieving the `LinkerdVersion` value. ## Changes to the public-api - Removal of the `publicPb.ApiClient` entry from the `Client` interface - Removal of the `publicPb.ApiServer` entry from the `Server` interface - Removal of the `Version` and related methods from `client.go`, `grpc_server.go` and `http_server.go` ## Changes to `linkerd version` - Removal of all references to the public API. - Call `healthcheck.GetServerVersion` to retrieve the version ## Changes to `linkerd check` - Removal of the "can query the control API" check from the "linkerd-api" section - Addition of a new "can retrieve the control plane version" check under the "control-plane-version" section ## Changes to `linkerd-web` - The version is now retrieved from the `linkerd-config` CM instead of a public-API call. - Removal of all references to the public API. - Removal of the `data-go-version` global attribute on the dashboard, which wasn't being used. ## Other changes - Added `ValuesFromConfigMap` function in `values.go` to convert the `linkerd-config` CM into a `*Values` struct instance - Removal of the `public` protobuf - Refactor 'linkerd repair' to use the refactored 'healthcheck.GetServerVersion()' function Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
* Remove the `linkerd-controller` pod Now that we got rid of the `Version` API (linkerd#6000) and the destination API forwarding business in `linkerd-controller` (linkerd#5993), we can get rid of the `linkerd-controller` pod. ## Removals - Deleted everything under `/controller/api/public` and `/controller/cmd/public-api`. - Moved `/controller/api/public/test_helper.go` to `/controller/api/destination/test_helper.go` because those are really utils for destination testing. I also extracted from there the prometheus mock structs and put that under `/pkg/prometheus/test_helper.go`, which is now by both the `linkerd diagnostics endpoints` and the `metrics-api` tests, removing some duplication. - Deleted the `controller.yaml` and `controller-rbac.yaml` helm templates along with the `publicAPIResources` and `publicAPIProxyResources` helm values. ## Health checks - Removed the `can initialize the client` check given such client is no longer needed. The `linkerd-api` section was left with only the check `control pods are ready`, so I moved that under the `linkerd-existence` section and got rid of the `linkerd-api` section altogether. - In that same `linkerd-existence` section, got rid of the `controller pod is running` check. ## Other changes - Fixed the Control Plane section of the dashboard, taking account the disappearance of `linkerd-controller` and previously, of `linkerd-sp-validator`. Signed-off-by: Jijeesh <jijeesh.ka@gmail.com>
This is the first step towards removing the
linkerd-controller
pod. It deals with removing the DestinationGet
http and gRPC endpoint it exposes, that only thelinkerd diagnostics endpoints
is consuming.Removed all references to Destination in the public-api, including all the gRPC-to-http-to-gRPC forwardings:
Get
method from the public-api gRPC server that forwarded the connection from the controller pod to the destination pod. Clients should now connect directly to the destination service via gRPC.main.go
) that served theGet
destination endpoint and forwarded it into the gRPC server.client.go
that created a client connecting to the http API.In order to connect to the
Get
API, theendpoints
command now calls aGetDestinationClient
method inapi.go
that runs a series of healthchecks.The healthchecks have a new entry "can initialize the destination client" that builds the destination client, by calling a new function
NewExternalClient
defined incontroller/api/destination/client.go
that port-forwards the destination service before creating a gRPC client pointing to it.This change will be followed-up by the replacement of the
Version
API, and another separate change for completely removing thelinkerd-controller
once all its clients have been dealt with.