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

Mg/refactor summary #90

Merged
merged 1 commit into from
Nov 14, 2019
Merged

Mg/refactor summary #90

merged 1 commit into from
Nov 14, 2019

Conversation

mgoodhart5
Copy link

  • refactored summary package with Client struct
    • run func
    • constructSummary func
  • refactored TestRunSummary

@codecov
Copy link

codecov bot commented Oct 31, 2019

Codecov Report

Merging #90 into master will increase coverage by 3.37%.
The diff coverage is 70.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
+ Coverage    39.4%   42.77%   +3.37%     
==========================================
  Files           8        8              
  Lines         538      547       +9     
==========================================
+ Hits          212      234      +22     
+ Misses        316      302      -14     
- Partials       10       11       +1
Impacted Files Coverage Δ
pkg/dashboard/dashboard.go 0% <0%> (ø) ⬆️
pkg/summary/summary.go 52.3% <75%> (+30.48%) ⬆️

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 30edf9e...c119e2d. Read the comment docs.

@sudermanjr
Copy link
Member

@mgoodhart5 Would you mind rebasing and resolving the conflicts on this?

Copy link
Member

@sudermanjr sudermanjr left a comment

Choose a reason for hiding this comment

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

I'm with Robert on this. Let's go ahead and refactor this to utilize the client struct in the vpa package rather than declaring a new one here.

@sudermanjr sudermanjr merged commit 998db15 into master Nov 14, 2019
@delete-merged-branch delete-merged-branch bot deleted the mg/refactor-summary branch November 14, 2019 17:46
hjkatz pushed a commit to hjkatz/goldilocks that referenced this pull request Apr 13, 2020
@hjkatz hjkatz mentioned this pull request Apr 13, 2020
hjkatz pushed a commit to hjkatz/goldilocks that referenced this pull request May 4, 2020
sudermanjr pushed a commit that referenced this pull request May 5, 2020
…154)

* Revert "Make units consistent for memory fixes issue #78 (#103)"

This reverts commit e55026d.

* Add FormatResourceList and test cases

* Use v1 resource memory constants instead of hardcoded strings

* Add a VPAUpdateMode to the vpa.Reconciler

The VPAUpdateMode field will allow us to use Goldilocks to create VPAs
that operate outside of "off" mode.

* Add ability to specify vpa update mode

This commit adds a parameter to createVPA that allows the user to
specify the update mode for the VPA. The mechanism for specifying this
is the label goldilocks.fairwinds.com/vpaUpdateMode.

* Extract variables instead of hardcoded values

* VPA update mode label case insensitive

Kubernetes labels are based on DNS names, which are case insensitive.
However, the current label used to specify the update mode of created
VPAs, vpaUpdateMode, is case sensitive. This has caused a bug that
results in all VPAs being created in "Off" mode. This commit fixes that
bug by using a case-insensitive label to specify the vpa-update-mode.

* Summary fix for multiple containers in a pod (#123)

* go.mod updated for some reason

* Add support for all VPA UpdateModes

* Use ParseBool for deployment enabled label value

* Use ParseBool for namespace enabled label value

* Use lowercase for switch statement

* Add Deployment Exclusion Annotation

Also:
 - Update reconciler to use VPA and Deployment objects
   directly (instead of names)
 - Update reconciler logging
 - Update/Add vpa tests

* Change no-vpa annotation to vpa-opt-out (to opt out of vpa in auto mode)

Also:
 - Update vpa tests
 - Fix vpa-opt-out logic

* Add more logging to VPA reconciler

* Fix namespace logs to use Name instead of the full Namespace

* Update README

* Fix Typo aut -> auto

Co-Authored-By: Andrew Suderman <andrew@sudermanjr.com>

* Fix grammar matched -> match

Co-Authored-By: Andrew Suderman <andrew@sudermanjr.com>

* Use vpa-update-mode as an annotation for Deployment specific VPA control

* Fix ineffectual assignment

* Fix test label

* Use index to get correct vpa

* Use short-hand if statement for map lookup

* Expand the functionality and interface for pkg/summary

* Add namespace support for summary command

* Standardize Vpa -> VPA

* Remove unused cached summary

* Fix typo in summary command help

* Remove confusing error comment

* Revert "Refactored summary pkg and added more tests. (#90)"

This reverts commit 998db15.

* Remove superfluous v1 import alias

* Use var for empty slice initialization

Co-Authored-By: Luke Reed <luke@lreed.net>

* Report an error when too many namespace arguments are given to the summary command

* golint and fixes

* Use apps/v1 for summary_test.go

* Re-export Option type (accidentally unexported)

* Use --namespace flag for summary command instead of args

Co-authored-by: John Turner <jturner@squarespace.com>
Co-authored-by: David Noyes <david.noyes@skybettingandgaming.com>
Co-authored-by: Andrew Suderman <andrew@sudermanjr.com>
Co-authored-by: Luke Reed <luke@lreed.net>
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.

4 participants