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

Support secondary custom-metric-server #522

Closed
qmhu opened this issue Aug 11, 2022 · 6 comments
Closed

Support secondary custom-metric-server #522

qmhu opened this issue Aug 11, 2022 · 6 comments

Comments

@qmhu
Copy link

qmhu commented Aug 11, 2022

As we know, k8s don't support multiple custom-metric-server in one cluster :kubernetes-sigs/custom-metrics-apiserver#70

One possible solution is to build an CRD for metric routing. But, it's too complicated for mostly of the users. Most of the time we just have two custom-metric-server in one cluster, So how about let prometheus-adapter support a secondary custom-metric-server.

The configuration is like this:

spec:
      serviceAccountName: custom-metrics-apiserver
      containers:
      - name: custom-metrics-apiserver
        image: gcr.io/k8s-staging-prometheus-adapter-amd64
        args:
        - --secure-port=6443
        - --tls-cert-file=/var/run/serving-cert/serving.crt
        - --tls-private-key-file=/var/run/serving-cert/serving.key
        - --logtostderr=true
        - --prometheus-url=http://prometheus.prom.svc:9090/
        - --metrics-relist-interval=1m
        - --v=10
        - --config=/etc/adapter/config.yaml
        - --secondary-metric-server=true
        - --secondary-metric-server-service-namespace=kube-system
        - --secondary-metric-server-service-name=metric-adapter
        - --secondary-metric-server-service-port=443

the logic for handle a metric would be:

  1. If the metric name is exist in prometheus-adapter, just process as before
  2. If not exist, proxy forward the request to secondary-metric-server

If it is needed, I want to implement it.

@qmhu
Copy link
Author

qmhu commented Aug 15, 2022

@dgrisonnet any suggestions?

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 13, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 13, 2022
@olivierlemasle
Copy link
Member

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 13, 2022
@dgrisonnet
Copy link
Member

This is a feature that would be very useful, but it shouldn't be done at the prometheus-adapter level since we don't have the resources today to invest into that. As such I am denying this feature request. But we could benefit from the more general effort in kubernetes-sigs/custom-metrics-apiserver#70.

@qmhu
Copy link
Author

qmhu commented Dec 14, 2022

This is a feature that would be very useful, but it shouldn't be done at the prometheus-adapter level since we don't have the resources today to invest into that. As such I am denying this feature request. But we could benefit from the more general effort in kubernetes-sigs/custom-metrics-apiserver#70.

ok, We know users that have more than one custom metric servers, it should be a way to resolve it.

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

No branches or pull requests

5 participants