Skip to content

Workload replica overrides do not take precedence over high-availability for broker HPAs #2372

Open

Description

@RaphaelFakhri

Describe the bug

A replicas value in spec.workloads is meant to take precedence over spec.high-availability for that workload. HighAvailabilityTransform skips resources whose name equals the override name, which works for HPAs that share the workload's name (activator, webhook, eventing-webhook). The broker HPAs have different names (broker-ingress-hpa, broker-filter-hpa), so high-availability still raises them, and hpaTransform never lowers minReplicas afterwards.

Expected behavior

broker-ingress-hpa gets minReplicas: 2, maxReplicas: 11, the same as activator gets with equivalent settings.

To Reproduce

apiVersion: operator.knative.dev/v1beta1
kind: KnativeEventing
metadata:
  name: knative-eventing
  namespace: knative-eventing
spec:
  high-availability:
    replicas: 3
  workloads:
  - name: mt-broker-ingress
    replicas: 2

broker-ingress-hpa ends up with minReplicas: 3, maxReplicas: 12.

Knative release version

main (pkg/reconciler/common/ha.go)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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