Skip to content
This repository has been archived by the owner on Apr 20, 2021. It is now read-only.

Allow running serve out-of-cluster #1

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

robertgzr
Copy link
Contributor

@robertgzr robertgzr commented Jul 20, 2017

  • kubeconfig can be passed via flag
  • nicer logging
  • using context instead of chan struct{}

Todo:

Debug TypeAssertionError in onAdd, onUpdate and onDelete

t=2017-07-20T15:24:16+0000 lvl=eror msg="unable to assert type" func=onAdd want= got=
t=2017-07-20T15:24:16+0000 lvl=eror msg="unable to assert type" func=onAdd want= got=
t=2017-07-20T15:24:16+0000 lvl=eror msg="unable to assert type" func=onAdd want= got=
ERROR: logging before flag.Parse: E0720 15:24:17.215699   16917 reflector.go:363] github.com/kinvolk/cgnet/kube/pods.go:61: expected type *v1.Pod, but watch event object had type *v1.Pod
ERROR: logging before flag.Parse: E0720 15:24:18.222761   16917 reflector.go:363] github.com/kinvolk/cgnet/kube/pods.go:61: expected type *v1.Pod, but watch event object had type *v1.Pod

As suspected the problem was the wrong use of k8s.io/api/v1 instead of k8s.io/client-go/pkg/api/v1

Closes #9

cmd/serve.go Outdated
for {
select {
case <-term:
cancelFunc()

Choose a reason for hiding this comment

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

Do you need this? It's gonna be called anyway as part of defer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right 👍

@robertgzr robertgzr force-pushed the robertgzr/allow-out-of-cluster branch 4 times, most recently from 9fdb50b to eb53e2f Compare July 25, 2017 13:14
@robertgzr robertgzr requested a review from nhlfr July 25, 2017 13:23
kubeconfig can be passed via flag

Closes #9
@robertgzr robertgzr force-pushed the robertgzr/allow-out-of-cluster branch from eb53e2f to d163cfe Compare July 26, 2017 15:53
@robertgzr robertgzr changed the title WIP: Allow running serve out-of-cluster Allow running serve out-of-cluster Jul 26, 2017
@robertgzr robertgzr merged commit 1353957 into master Jul 26, 2017
@robertgzr robertgzr deleted the robertgzr/allow-out-of-cluster branch July 26, 2017 16:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants