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

Incorrect validation and error message of stabilizationWindowSeconds in autoscaler behaviour #3345

Closed
onematchfox opened this issue Oct 11, 2024 · 0 comments · Fixed by #3346
Labels
bug Something isn't working needs triage

Comments

@onematchfox
Copy link
Contributor

Component(s)

No response

What happened?

Description

Received the following error message when trying to configure scaleUp policy for an OpenTelemetryCollector with
stabilizationWindowSeconds: 0.

admission webhook "vopentelemetrycollectorcreateupdatebeta.kb.io" denied the request: the OpenTelemetry Spec autoscale configuration is incorrect, scaleUp should be one or more

There are 2 issues here.

  1. The error message is misleading in that it is not the scaleUp object that should be one or more, but rather the value of stabilizationWindowSeconds.
  2. As per k8s.io/api/autoscaling/v2/types.go

StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour).

Steps to Reproduce

Attempt to apply following manifest:

apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
  name: foo
spec:
  mode: deployment
  autoscaler:
    minReplicas: 1
    maxReplicas: 10
    targetCPUUtilization: 70
    targetMemoryUtilization: 60
    behavior:
      scaleUp:
        policies:
          - periodSeconds: 15
            type: Pods
            value: 4
          - periodSeconds: 15
            type: Percent
            value: 100
        selectPolicy: Max
        stabilizationWindowSeconds: 0
  config:
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318
    processors:
      memory_limiter:
        check_interval: 1s
        limit_percentage: 75
        spike_limit_percentage: 15
      batch:
        send_batch_size: 10000
        timeout: 10s
    exporters:
      debug: {}
    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: [memory_limiter, batch]
          exporters: [debug]

Expected Result

One should be apply to set stabilizationWindowSeconds to 0 (which is the default for scaleUp behaviour).

Actual Result

See error message in description.

Kubernetes Version

1.30.4

Operator version

0.109.0

Collector version

0.109.0

Environment information

No response

Log output

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
1 participant