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

Curated packages bugfixes #2045

Merged
merged 7 commits into from
May 6, 2022

Conversation

a-cool-train
Copy link
Contributor

@a-cool-train a-cool-train commented May 6, 2022

Description of changes:

Add License for Curated Packages

Provides the capability to print a license during the following scenarios:

  • When installing curated packages as part of cluster creation
  • When installing curated packages controller through install packagecontroller
  • When creating curated packages through create, apply, and install commands

Minor Bugfixes

  • Fixes bug with upgrade to use apply instead of create
  • Fixes bug for get commands to print a new line carriage
  • Fixes bug for kubeconfig outside of current directory

Move Dependency creation to curatedpackages

  • Unify curatedpackages dependencies creation.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please ask for approval from a-cool-train after the PR has been reviewed.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 6, 2022
@codecov
Copy link

codecov bot commented May 6, 2022

Codecov Report

Merging #2045 (a6c5557) into main (563187d) will decrease coverage by 0.07%.
The diff coverage is 89.47%.

@@            Coverage Diff             @@
##             main    #2045      +/-   ##
==========================================
- Coverage   49.81%   49.73%   -0.08%     
==========================================
  Files         305      306       +1     
  Lines       25717    25791      +74     
==========================================
+ Hits        12811    12828      +17     
- Misses      11583    11640      +57     
  Partials     1323     1323              
Impacted Files Coverage Δ
pkg/curatedpackages/bundle.go 73.91% <0.00%> (ø)
pkg/workflows/create.go 50.00% <0.00%> (-0.18%) ⬇️
pkg/curatedpackages/curatedpackages.go 62.50% <100.00%> (+9.55%) ⬆️
pkg/curatedpackages/packageclient.go 76.92% <100.00%> (+0.54%) ⬆️
pkg/curatedpackages/packagecontrollerclient.go 100.00% <100.00%> (ø)
internal/test/e2e/flux.go 0.00% <0.00%> (ø)
internal/test/e2e/setup.go 0.00% <0.00%> (ø)
internal/test/e2e/fluxGit.go 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 563187d...a6c5557. Read the comment docs.

@@ -56,9 +57,9 @@ func getResources(ctx context.Context, resourceType string, output string, args
return fmt.Errorf("kubectl execution failure: \n%v", err)
}
if len(stdOut.Bytes()) == 0 {
fmt.Printf("No resources found in %v namespace", constants.EksaPackagesName)
fmt.Printf("No resources found in %v namespace\n", constants.EksaPackagesName)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this make use of logger instead of a printf?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually this needs to be printed to the user.

cmd/eksctl-anywhere/cmd/installpackagecontroller.go Outdated Show resolved Hide resolved
pkg/curatedpackages/curatedpackages.go Show resolved Hide resolved
@@ -68,6 +68,7 @@ func (c *Create) Run(ctx context.Context, clusterSpec *cluster.Spec, validator i
}

if packagesLocation != "" {
curatedpackages.PrintLicense()
Copy link
Member

Choose a reason for hiding this comment

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

What is the purpose of printing out the license all the time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a business requirement to print out the license.

@g-gaston
Copy link
Member

g-gaston commented May 6, 2022

/lgtm

@a-cool-train a-cool-train merged commit ac57fbd into aws:main May 6, 2022
danbudris pushed a commit to danbudris/eks-anywhere-1 that referenced this pull request May 6, 2022
* Fix some minor issues

* Add License during cluster creation

* Add License in controller and package installation

* Add formatting curated packages license

* Gofumpt resolution

* Fix PR Review Comments

* Fix PR Review Comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants