question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

would like to configure the namespace cadvisor is found in

See original GitHub issue

Right now it is hardcoded to cadvisor. It would be nice to be able to configure this.

Not sure how you like configuration to be extracted. If you provide some guidance I can open a PR.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brennantaylorcommented, Apr 30, 2020

Yeah I’ve also struggled defining an isomorphic config that feels right in both the cli and web.

It’s pretty standard to inject env vars or mount entire files into a container with configmaps. Env vars also let you use env or envFrom in podSpecs to define it. Changing the cli args is trivial too.

Env vars could be made to work ok in the browser with query params like you mentioned:

# using dotenv somewhere in index.js: require('dotenv').config()
echo "CADVISOR_NAMESPACE=default" > .env
npm index.js
# just on the command line
env "CADVISOR_NAMESPACE=default" npm index.js
# in the browser parse the query params as env vars?
http://kubebox.mydomain.com/?CADVISOR_NAMESPACE=default
apiVersion: apps/v1
kind: Deployment
metadata:
  name: kubebox
spec:
  selector:
    matchLabels:
      name: kubebox
  template:
    metadata:
      name: kubebox
    spec:
      serviceAccountName: kubebox
      containers:
      - image: astefanutti/kubebox:server
        name: kubebox
        env:
        - name: CADVISOR_NAMESPACE # EZ in k8s too
           value: default
        ports:
        - containerPort: 8080
          protocol: TCP
0reactions
astefanutticommented, May 6, 2020

@593769290 I’ve seen people used to create a namespace per application, other having inter-dependent applications into a single namespace. I’d be inclined to think cAdvisor is a rather cross-cutting kind of application, so it may be ok that it’s installed in its own namespace.

Anyway I like the idea of leaving that decision to the user, and exposing CADVISOR_NAMESPACE so that it’s configurable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cAdvisor should retrieve application metrics using container's ...
cAdvisor retrieves application metrics by issuing a GET request to an HTTP endpoint configured by placing a configuration file in the ...
Read more >
cAdvisor and Kubernetes Monitoring Guide - CloudForecast
In this guide, you'll learn the challenges with monitoring Kubernetes and how to use cAdvisor w/ Prometheus and Grafana to address them.
Read more >
cAdvisor: Tutorial & Examples - Kubecost
Learn what is cAdvisor, how to implement Container Advisor, understand runtime options, export data using cAdvisor and cAdvisor best practices.
Read more >
cAdvisor Setup - VMware Docs
Create cAdvisor.yaml (Daemaonset yaml). ... Run kubectl apply -f cadvisor.yaml . Daemonset and service on your Kubernetes cluster is created. Run ...
Read more >
Monitoring containers with cAdvisor - Learn Cloud Native
If your applications are already emitting metrics, you can configure cAdviser to scrape the endpoint and include which metrics you want to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found