Skip to content

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

@xavierbaude

Description

@xavierbaude

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions