Skip to content

Commit

Permalink
http-add-on: support portName on HTTPScaledObject (#697)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Wozniak <[email protected]>
  • Loading branch information
wozniakjan authored Oct 25, 2024
1 parent 86b12cb commit c0d3bd5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 10 additions & 5 deletions http-add-on/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ spec:
type: integer
type: object
scaleTargetRef:
description: The name of the deployment to route HTTP requests to
(and to autoscale).
description: |-
The name of the deployment to route HTTP requests to (and to autoscale).
Including validation as a requirement to define either the PortName or the Port
properties:
apiVersion:
type: string
Expand All @@ -110,13 +111,18 @@ spec:
description: The port to route to
format: int32
type: integer
portName:
description: The port to route to referenced by name
type: string
service:
description: The name of the service to route to
type: string
required:
- port
- service
type: object
x-kubernetes-validations:
- message: must define either the 'portName' or the 'port'
rule: has(self.portName) != has(self.port)
scaledownPeriod:
description: (optional) Cooldown period value
format: int32
Expand Down Expand Up @@ -152,7 +158,7 @@ spec:
type: object
type: object
targetPendingRequests:
description: (optional) DEPRECATED (use SscalingMetric instead) Target
description: (optional) DEPRECATED (use ScalingMetric instead) Target
metric value
format: int32
type: integer
Expand Down Expand Up @@ -210,4 +216,3 @@ spec:
subresources:
status: {}
{{ end }}

8 changes: 8 additions & 0 deletions http-add-on/templates/interceptor/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- get
- list
- watch
- apiGroups:
- http.keda.sh
resources:
Expand Down

0 comments on commit c0d3bd5

Please sign in to comment.