[Prometheus-adapter] Does Prometheus-adapter support scraping custom metrics for windows pods to implement HPA.
numa1985 opened this issue · comments
Is your feature request related to a problem ?
HPA using Prometheus-adapter was working fine for linux pods ,but when I was trying to implement HPA for windows pods in AKS ,but its throwing volume mount errors. Does Prometheus-adapter support scraping custom metrics for windows pods to implement HPA.
values.yaml :
prometheus:
port: "9090"
url: http://**-aks-001-prometheus-dev.com
resources:
requests:
cpu: 100m
memory: 100Mi
rules:
custom:
- seriesQuery: '{namespace!="",name!~"^container_."}'
resources:
template: <<.Resource>>
name:
matches: "^(.)_total"
as: "${1}_per_second"
metricsQuery: 'sum(rate(<<.Series>>{<<.LabelMatchers>>}[2m])) by (<<.GroupBy>>)'
podAnnotations:
prometheus.io/scrape: "true"
nodeSelector:
kubernetes.io/os: windows
helm install prometheus-adapter-windows prometheus-community/prometheus-adapter -f values.yaml -n prometheus-adapter-windows
Error info
- We are having the prometheus-adapter-hpa running fine on the linux nodes ,but when I was trying to create release for prometheus-adapter-windows on the same aks cluster landing up with conflicts.
ubuntu@NARU-Pr5530:~/3107$ kubectl get pods -n prometheus-adapter-hpa
NAME READY STATUS RESTARTS AGE
prometheus-adapter-hpa-57cdc55c5c-hr2fj 1/1 Running 0 12h
ubuntu@NARU-Pr5530:~/3107$ helm install prometheus-adapter-windows prometheus-community/prometheus-adapter -f values.yaml -n prometheus-adapter-windows
Error: INSTALLATION FAILED: Unable to continue with install: ClusterRole "prometheus-adapter-resource-reader" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "prometheus-adapter-windows": current value is "prometheus-adapter-hpa"; annotation validation error: key "meta.helm.sh/release-namespace" must equal "prometheus-adapter-windows": current value is "prometheus-adapter-hpa"
- I had uninstalled the linux release and tried to create release for prometheus-adapter-windows to scrapping custom metrics for windows pods with the values.yaml mentioned above encountered with below error.
Describe the solution you'd like.
- Does the Prometheus-adapter supports windows .
- If yes it will be really helpful to provide sample values.yaml or can provide modifications on the existing values.yaml for windows implementation.
Describe alternatives you've considered.
NONE
Additional context.
No response