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

Server component commands and hyperkube should be using cobra #34732

Closed
ncdc opened this Issue Oct 13, 2016 · 9 comments

Comments

@ncdc
Member

ncdc commented Oct 13, 2016

As best I can tell, our server component commands only use cobra as a means of generating docs and man pages. We should refactor our commands so that they use cobra the right way (i.e., they have Run functions that actually do things). As a result, we can make hyperkube leaner by reusing the cobra commands once they're refactored correctly.

Server component command tasks:

  • federation-apiserver
  • federation-controller-manager
  • kube-apiserver
  • kube-controller-manager #58398
  • kube-proxy #34727
  • kube-scheduler #52562
  • kubelet

Hyperkube tasks:

  • replace Server usage with cobra.Command
  • federation-apiserver
  • federation-controller-manager
  • kube-apiserver
  • kube-controller-manager
  • kube-proxy
  • kube-scheduler
  • kubelet

cc @smarterclayton @bgrant0607 @thockin @eparis @fabianofranz @deads2k @liggitt @sttts

@ncdc ncdc changed the title from Commands and hyperkube should be using cobra to Server commands and hyperkube should be using cobra Oct 13, 2016

@ncdc ncdc changed the title from Server commands and hyperkube should be using cobra to Server component commands and hyperkube should be using cobra Oct 13, 2016

@smarterclayton

This comment has been minimized.

Contributor

smarterclayton commented Oct 13, 2016

@kubernetes/kubectl

@luxas

This comment has been minimized.

Member

luxas commented Oct 13, 2016

Also relevant here: #31432

@adohe

This comment has been minimized.

Member

adohe commented Oct 13, 2016

I will start update server components.

@ncdc

This comment has been minimized.

Member

ncdc commented Oct 14, 2016

@adohe thanks! If you want to see an example, here's what I did for kube-proxy (although it's part of a larger POC, so we can refactor kube-proxy separate from the POC, and I'll rebase as needed): #34727

@adohe

This comment has been minimized.

Member

adohe commented Oct 14, 2016

@ncdc I will take a look, thanks :)

@kargakis

This comment has been minimized.

Member

kargakis commented Jun 24, 2017

/sig cli

@fejta-bot

This comment has been minimized.

fejta-bot commented Dec 30, 2017

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@ncdc

This comment has been minimized.

Member

ncdc commented Jan 17, 2018

/remove-lifecycle stale
/lifecycle frozen

@liggitt

This comment has been minimized.

Member

liggitt commented Jan 17, 2018

see #58190

k8s-merge-robot added a commit that referenced this issue Jan 18, 2018

Merge pull request #58405 from deads2k/kubelet-01-start
Automatic merge from submit-queue (batch tested with PRs 58209, 57561, 58405). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

make the kubelet cobra command complete

This pull attempts a move from the cmd/kubelet to the cobra command where it can re-used.

/assign @mtaufen 
/assign @liggitt 
@ncdc fyi

xref: #34732

```release-note
NONE
```

k8s-merge-robot added a commit that referenced this issue Jan 26, 2018

Merge pull request #58408 from deads2k/hyperkube-01-fix
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

switch hyperkube to cobra

This makes use of cobra to layer the commands with a library that already supports composing commands.

Fixes #34732

```release-note
NONE
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment