Uh oh!
There was an error while loading. Please reload this page.
refactor: cleanup apiservice.Binder duplication (#360) - #595
Open
alokkumardalei-wq wants to merge 2 commits into
Open
refactor: cleanup apiservice.Binder duplication (#360)#595alokkumardalei-wq wants to merge 2 commits into
alokkumardalei-wq wants to merge 2 commits into
Conversation
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
cnvergence
commented
Jul 30, 2026
Member
@alokkumardalei-wq tests failing ptal :) |
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
alokkumardalei-wqforce-pushed
the
feature/issue-360
branch
from
July 30, 2026 08:42
aad76f4 to
7f1de05Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Fixes#360)
This pull request addresses Issue #360 by refactoring and cleaning up the Binder logic in
cli/pkg/kubectl/bind-apiservice/plugin/binder.go.Changes made
Extracted Helper Methods:
ctx context.Context,remoteKubeconfigBytes []byte) (string, string,*rest.Config,error) to encapsulate common environment initialization logic (ensuring the client-side namespace exists, parsing/saving the remotekubeconfig, and fetching the resolved config).ctx context.Context,apiRequests []*kubebindv1alpha2.APIServiceExportRequest, remoteConfig*rest.Config,remoteNamespaceActual string,remoteKubeconfigstring) ([]*kubebindv1alpha2.APIServiceBinding, error) to handle the common request processing loop (deploying konnector, creating service export requests, saving secrets, and creating bindings).Refactored Entrypoints:
Testing and Validation
make build) that the refactored logic compiles cleanly.