Git Product home page Git Product logo

Comments (4)

dkistner avatar dkistner commented on June 8, 2024

Did a short test based on latest master commit: 953f3c1

I used this values.yaml with no kubeconfig specified (then a ServiceAccount and corresponding ClusterRole/ClusterRoleBinding should be deployed).

image:
  tag: 0.0.0

Then I run the following:

# move to repo and deploy values.yaml
cd $GOPATH/src/github.com/gardener/gardener-metrics-exporter
cat <<EOF > dev/values.yaml
image:
  tag: 0.0.0
EOF

# deploy test ns
$ kubectl create ns test >/dev/null

# deploy helm chart
$ helm upgrade gardener-metrics-exporter $GOPATH/src/github.com/gardener/gardener-metrics-exporter/charts/gardener-metrics-exporter --install --force --wait --values dev/values.yaml --namespace test
Release "gardener-metrics-exporter" does not exist. Installing it now.
NAME:   gardener-metrics-exporter
LAST DEPLOYED: Fri Oct  5 16:28:46 2018
NAMESPACE: test
STATUS: DEPLOYED

RESOURCES:
==> v1/Service
NAME                       TYPE       CLUSTER-IP      EXTERNAL-IP  PORT(S)   AGE
gardener-metrics-exporter  ClusterIP  10.110.164.247  <none>       2718/TCP  2s

==> v1/Deployment
NAME                       DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
gardener-metrics-exporter  1        1        1           1          2s

==> v1/Pod(related)
NAME                                        READY  STATUS       RESTARTS  AGE
gardener-metrics-exporter-5ddb5d5f7c-9g5c6  1/1    Running      0         2s

==> v1/ServiceAccount
NAME                       SECRETS  AGE
gardener-metrics-exporter  1        2s

==> v1/ClusterRole
NAME                                 AGE
garden.sapcloud.io:metrics-exporter  2s

==> v1/ClusterRoleBinding
NAME                                 AGE
garden.sapcloud.io:metrics-exporter  2s

Then if the an exporter pod is running:

$ k -n test get pod
NAME                                         READY     STATUS    RESTARTS   AGE
gardener-metrics-exporter-5ddb5d5f7c-9g5c6   1/1       Running   0          35s

Be aware there is no helm chart repo for the exporter (just located in the repo) therefore you have to pass an absolute path to the chart location to helm upgrade/install like I did before ($GOPATH/src/github.com/gardener/gardener-metrics-exporter/charts/gardener-metrics-exporter).

from gardener-metrics-exporter.

alcasim avatar alcasim commented on June 8, 2024

Hey, thanks @dkistner for your response, I'm currently using image value "0.1.0-dev-8fde706255c44c8f39aeb76ab0563f953e485c40" as it's the latest image before introducing the kubeconfig path flag

In my use case, I'm running the exporter in same namespace and cluster than gardener-controller-manager, I agree on having this flag is useful to run the exporter from a different kubernetes cluster

May I suggest something? Perhaps the default exporter behavior should be relying on the ServiceAccount used to run the pod (as it was in the beginning) so running the exporter on same cluster and namespace would be supported out of the box, or use the kubeconfig if it has been specified with the flag, that would cover all use cases (running together with the gardener-controller-manager, and running outside namespace/cluster)

from gardener-metrics-exporter.

dkistner avatar dkistner commented on June 8, 2024

Yes you are absolutely right, we should do that in the way you described. I will address that.

from gardener-metrics-exporter.

dkistner avatar dkistner commented on June 8, 2024

Fixed 217ac9f

from gardener-metrics-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.