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

feat: move add-cluster.sh script logic into register-member command #53

Merged
merged 63 commits into from
Aug 27, 2024

Conversation

mfrancisc
Copy link
Contributor

@mfrancisc mfrancisc commented Jul 30, 2024

Jira: https://issues.redhat.com/browse/KUBESAW-27

Update the ksctl register-member command so that it doesn't rely anymore on the execution of the add-cluster.sh script. The logic from the bash script is now implemented in Golang. The original idea was to convert only since the creation of the Secret containing the kubeconfig, but I found it easier to convert the entire logic and remove the execution of the bash script. This simplifies the code and the tests.

The creation of the toolchaincluster is just temporary until we implement https://issues.redhat.com/browse/KUBESAW-44, which will move the creation of TC in the toolchaincluster_resource controller and will remove it from here.

@mfrancisc mfrancisc marked this pull request as ready for review August 2, 2024 10:14
# Conflicts:
#	pkg/cmd/adm/register_member.go
pkg/client/client.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member.go Outdated Show resolved Hide resolved
Copy link
Contributor

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

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

looks good, a few cosmetic comments and proposals in the test

pkg/cmd/adm/register_member.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Show resolved Hide resolved
Copy link
Contributor

@metlos metlos left a comment

Choose a reason for hiding this comment

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

Great job! Just a very minor request for a clarifying comment :)

pkg/cmd/adm/register_member.go Show resolved Hide resolved
Copy link
Contributor

@MatousJobanek MatousJobanek left a comment

Choose a reason for hiding this comment

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

Awesome, great job 👍 🚀 🥇

pkg/cmd/adm/register_member.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Outdated Show resolved Hide resolved
pkg/cmd/adm/register_member_test.go Show resolved Hide resolved
mfrancisc and others added 2 commits August 27, 2024 10:17
Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
@mfrancisc mfrancisc merged commit ed47159 into kubesaw:master Aug 27, 2024
6 of 7 checks passed
@mfrancisc mfrancisc deleted the registermember branch August 27, 2024 08:28
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

Attention: Patch coverage is 84.30233% with 27 lines in your changes missing coverage. Please review.

Project coverage is 69.45%. Comparing base (7f0bcfb) to head (9471f72).
Report is 1 commits behind head on master.

Files Patch % Lines
pkg/cmd/adm/register_member.go 84.66% 17 Missing and 8 partials ⚠️
pkg/utils/util.go 71.42% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #53      +/-   ##
==========================================
+ Coverage   68.63%   69.45%   +0.81%     
==========================================
  Files          43       43              
  Lines        2468     2544      +76     
==========================================
+ Hits         1694     1767      +73     
- Misses        584      587       +3     
  Partials      190      190              
Files Coverage Δ
pkg/cmd/generate/cli_configs.go 74.30% <100.00%> (ø)
pkg/utils/util.go 75.00% <71.42%> (-2.78%) ⬇️
pkg/cmd/adm/register_member.go 75.59% <84.66%> (+7.28%) ⬆️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants