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 heapster alias to metrics-server addon #8455

Merged
merged 6 commits into from
Jun 14, 2020
Merged

Add heapster alias to metrics-server addon #8455

merged 6 commits into from
Jun 14, 2020

Conversation

govargo
Copy link
Contributor

@govargo govargo commented Jun 11, 2020

What type of PR is this?

/kind bug
/area addons

What this PR does / why we need it:

This PR add heapster alias to metrics-server addon.
kubectl top command needs heapster or metrics-server addon. But heapster is deprecated.
By this PR, when users enable heapster addon, metrics-server addon will be enabled instead.

Which issue(s) this PR fixes:

Fix #8360

Does this PR introduce a user-facing change?

Yes. This PR add heapster addon alias.

Before this PR

$ kubectl top pods
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)

$ minikube addons enable heapster
💣  enable failed: run callbacks: heapster is not a valid addon

😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose

After this PR

$ kubectl top pods
Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)

$ minikube addons enable heapster
⌛  enable metrics-server addon instead of heapster addon because heapster is deprecated
🌟  The 'metrics-server' addon is enabled

$ kubectl top pods -n kube-system
NAME                               CPU(cores)   MEMORY(bytes)
coredns-66bff467f8-8z27z           3m           6Mi
...

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. area/addons cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 11, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @govargo. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 11, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: govargo
To complete the pull request process, please assign sharifelgamal
You can assign the PR to them by writing /assign @sharifelgamal in a comment when ready.

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

@govargo
Copy link
Contributor Author

govargo commented Jun 11, 2020

/assign @sharifelgamal

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2020

Codecov Report

Merging #8455 into master will decrease coverage by 0.01%.
The diff coverage is 30.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8455      +/-   ##
==========================================
- Coverage   34.05%   34.04%   -0.02%     
==========================================
  Files         153      153              
  Lines        9840     9849       +9     
==========================================
+ Hits         3351     3353       +2     
- Misses       6086     6092       +6     
- Partials      403      404       +1     
Impacted Files Coverage Δ
cmd/minikube/cmd/config/disable.go 16.66% <0.00%> (-3.34%) ⬇️
cmd/minikube/cmd/config/enable.go 15.38% <0.00%> (-4.62%) ⬇️
pkg/addons/addons.go 44.10% <60.00%> (+0.12%) ⬆️

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

@govargo thanks for this PR, there was an issue that "kubectl top" was not working because there was no heapster addon ....would the top command work with this alternative addon ?

@@ -33,6 +33,9 @@ var addonsDisableCmd = &cobra.Command{
}

addon := args[0]
if addon == "heapster" {
exit.WithCodeT(exit.Unavailable, "There is no heapster addon")
Copy link
Member

Choose a reason for hiding this comment

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

I would say since we automaticly select metric-server for them instead of heapster, we ask them to disable metric
how about this.

exit.WithCodeT(exit.Unavailable, "The heapster addon is deprecicated will try to disable metrics-server instead  ")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

I changed to the following.

exit.WithCodeT(exit.Unavailable, "The heapster addon is depreciated. please try to disable metrics-server instead")

If any idea, please let me know.

@govargo
Copy link
Contributor Author

govargo commented Jun 12, 2020

@govargo thanks for this PR, there was an issue that "kubectl top" was not working because there was no heapster addon ....would the top command work with this alternative addon ?

Yes. If metrics-server is enabled in minikube, kubectl top command works.

@medyagh
Copy link
Member

medyagh commented Jun 12, 2020

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 12, 2020
@minikube-pr-bot
Copy link

kvm2 Driver
docker Driver

@medyagh medyagh merged commit 804e772 into kubernetes:master Jun 14, 2020
@govargo govargo deleted the add-heapster-alias branch February 13, 2021 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/addons cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"kubectl top pods" requires heapster - reinstate addon?
7 participants