Skip to content
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

Add k8s plugin's toolregistry implementation #5243

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

Warashi
Copy link
Contributor

@Warashi Warashi commented Sep 30, 2024

What this PR does / why we need it:

The plugin has to pass the tool install script to the piped.
I don't want to pass a script everywhere the plugin tries to install a tool.
So I wrote a wrapper package to hide install script from other implementations.

Which issue(s) this PR fixes:

Part of #4980

Does this PR introduce a user-facing change?: No

  • How are users affected by this change:
  • Is this breaking change:
  • How to migrate (if breaking change):

Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Signed-off-by: Shinnosuke Sawada-Dazai <[email protected]>
Comment on lines +18 to +20
cd {{ .TmpDir }}
curl -LO https://storage.googleapis.com/kubernetes-release/release/v{{ .Version }}/bin/{{ .Os }}/{{ .Arch }}/kubectl
mv kubectl {{ .OutPath }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These template variables come from the below comments.

// - {{ .Name }}: name of the tool.
// - {{ .Version }}: version of the tool.
// - {{ .OutPath }}: file path where the tool will be installed.
// - {{ .TmpDir }}: directory where the tool will be downloaded and extracted.
// - {{ .Arch }}: GOARCH of the current machine.
// - {{ .Os }}: GOOS of the current machine.

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 23.94%. Comparing base (c1a06aa) to head (bb55a18).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...pipedv1/plugin/kubernetes/toolregistry/registry.go 0.00% 10 Missing ⚠️
...kg/app/pipedv1/plugin/toolregistry/toolregistry.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5243      +/-   ##
==========================================
- Coverage   23.95%   23.94%   -0.01%     
==========================================
  Files         437      438       +1     
  Lines       46997    47008      +11     
==========================================
  Hits        11258    11258              
- Misses      34835    34846      +11     
  Partials      904      904              
Flag Coverage Δ
23.94% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@khanhtc1202 khanhtc1202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@khanhtc1202 khanhtc1202 merged commit 077b7b6 into master Oct 1, 2024
15 of 17 checks passed
@khanhtc1202 khanhtc1202 deleted the pipedv1-k8s-plugin-tool-registry branch October 1, 2024 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants