Skip to content

Commit

Permalink
Fix the piped to correct invoking the k8s plugin (#5401)
Browse files Browse the repository at this point in the history
* Remove mistakenly passed nil

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

* Fix plugin argument construction by adding 'start' command

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>

---------

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
  • Loading branch information
Warashi authored Dec 10, 2024
1 parent 4f1ff0f commit 74de8a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/cmd/piped/piped.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ func (p *piped) runPlugins(ctx context.Context, pluginsCfg []config.PipedPlugin,

// Build plugin's args.
args := make([]string, 0, 0)
args = append(args, "--piped-plugin-service", net.JoinHostPort("localhost", strconv.Itoa(p.pluginServicePort)))
args = append(args, "start", "--piped-plugin-service", net.JoinHostPort("localhost", strconv.Itoa(p.pluginServicePort)))
b, err := json.Marshal(pCfg)
if err != nil {
return nil, fmt.Errorf("failed to prepare plugin %s config: %w", pCfg.Name, err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/app/pipedv1/plugin/kubernetes/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (s *plugin) run(ctx context.Context, input cli.Input) (runErr error) {

group, ctx := errgroup.WithContext(ctx)

pipedapiClient, err := pipedapi.NewClient(ctx, s.pipedPluginService, nil)
pipedapiClient, err := pipedapi.NewClient(ctx, s.pipedPluginService)
if err != nil {
input.Logger.Error("failed to create piped plugin service client", zap.Error(err))
return err
Expand Down

0 comments on commit 74de8a0

Please sign in to comment.