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 a flag to control whether the kubelet runs in "containerized" mode. #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dlorenc
Copy link

@dlorenc dlorenc commented Apr 26, 2016

This also adds a build mode for "dynamic" compilation instead of static. This is required for cAdvisor to run in the "non-containerized" kubelet.

FYI, this is part of the minikube project: kubernetes/minikube#8

…e or not.

This also adds a build mode for "dynamic" compilation instead of static. This
is required for cAdvisor to run in the "non-containerized" kubelet.
@@ -15,20 +16,28 @@ func (lk *LocalKube) Add(server Server) {
lk.Servers = append(lk.Servers, server)
}

func (lk *LocalKube) Run(args []string, out io.Writer) error {
if len(args) < 2 {
var containerized = flag.Bool("containerized", true, "Whether localkube is inside a container or not")
Copy link

Choose a reason for hiding this comment

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

Can we auto-detect this by looking at some env vars or inspecting /proc/self/ns?

Copy link
Author

Choose a reason for hiding this comment

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

Looks like inspecting /proc/1/cgroup should work, but I'd kind of prefer to keep this explicit to match the behavior of the kubelet itself.

Thoughts?

Copy link

Choose a reason for hiding this comment

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

SGTM. We can revisit this once, kubelet stops exposing the same flag.

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.

2 participants