watermarkpodautoscaler icon indicating copy to clipboard operation
watermarkpodautoscaler copied to clipboard

Get a wpa based on CPU/Memory resource does not show values

Open xavierbaude opened this issue 2 years ago • 1 comments

I created a WPA object which looks for internal metrics as described here:

apiVersion: datadoghq.com/v1alpha1
kind: WatermarkPodAutoscaler
metadata:
  name: watermarkpodautoscaler-internal
spec:
  maxReplicas: 3
  minReplicas: 1
  tolerance: 1
  readinessDelay: 10
  scaleTargetRef:
    kind: Deployment
    apiVersion: apps/v1
    name: nginx-deployment-wpa
  metrics:
  - type: Resource
    resource:
      highWatermark: "100m"
      lowWatermark: "50m"
      name: cpu
      metricSelector:
        matchLabels:
          app: nginx-wpa

The status tells me that it is under monitoring :

kubectl describe wpa watermarkpodautoscaler-internal
[...]
  Current Metrics:
    Resource:
      Current Average Value:  24m
      Name:                   cpu
    Type:                     Resource
[...]

Unfortunately a simple get command shows me empty fields for "VALUE, WATERMARK, ..."

❯ k get wpa watermarkpodautoscaler-internal
NAME                              VALUE   HIGH WATERMARK   LOW WATERMARK   AGE   MIN REPLICAS   MAX REPLICAS   DRY-RUN
watermarkpodautoscaler-internal                                            14m   1              3

Can we improve this ?

xavierbaude avatar Dec 21 '21 15:12 xavierbaude

Hey Xavier - Thank you for opening this. Indeed, it appears that we only print the HWM/LWM for external types. Thanks for bring this up to our attention, I am going to triage this.

CharlyF avatar Dec 21 '21 15:12 CharlyF