Skip to content

Commit

Permalink
feat: New ScalingSet CRD to deploy isolated interceptors+scalers
Browse files Browse the repository at this point in the history
Signed-off-by: kahirokunn <[email protected]>
  • Loading branch information
kahirokunn committed Nov 20, 2024
1 parent 3ad2830 commit 5720465
Show file tree
Hide file tree
Showing 7 changed files with 825 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $ helm search repo kedacore
NAME CHART VERSION APP VERSION DESCRIPTION
kedacore/external-scaler-azure-cosmos-db 0.1.0 0.1.0 Event-based autoscaler for Azure Cosmos DB chan...
kedacore/keda 2.16.0 2.16.0 Event-based autoscaler for workloads on Kubernetes
kedacore/keda-add-ons-http 0.8.0 0.8.0 Event-based autoscaler for HTTP workloads on Ku...
kedacore/keda-add-ons-http 0.9.0 0.9.0 Event-based autoscaler for HTTP workloads on Ku...
```

## Releases
Expand Down
4 changes: 2 additions & 2 deletions http-add-on/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ kubeVersion: ">=v1.23.0-0"
# to the chart and its templates, including the app version. This is incremented at chart release time and does not need
# to be included in any PRs to main.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.0
version: 0.9.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.8.0
appVersion: 0.9.0
home: https://github.com/kedacore/http-add-on
sources:
- https://github.com/kedacore/http-add-on
Expand Down
365 changes: 365 additions & 0 deletions http-add-on/templates/crds/clusterhttpscalingset.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ spec:
properties:
apiVersion:
type: string
deployment:
description: 'Deprecated: The name of the deployment to scale
according to HTTP traffic'
type: string
kind:
type: string
name:
Expand Down Expand Up @@ -157,6 +153,22 @@ spec:
type: string
type: object
type: object
scalingSet:
description: |-
ScalingSet to be used for this HTTPScaledObject, if empty, default
interceptor and scaler will be used
properties:
kind:
description: Kind of the resource being referred to. Defaults
to HTTPScalingSet.
enum:
- HTTPScalingSet
- ClusterHTTPScalingSet
type: string
name:
description: Name of the scaling set
type: string
type: object
targetPendingRequests:
description: (optional) DEPRECATED (use ScalingMetric instead) Target
metric value
Expand Down
364 changes: 364 additions & 0 deletions http-add-on/templates/crds/httpscalingset.yaml

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions http-add-on/templates/operator/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,56 @@ metadata:
{{- include "keda-http-add-on.labels" . | indent 4 }}
name: {{ .Chart.Name }}-role
rules:
- apiGroups:
- ""
resources:
- services
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- http.keda.sh
resources:
- clusterhttpscalingsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- http.keda.sh
resources:
- clusterhttpscalingsets/finalizers
verbs:
- update
- apiGroups:
- http.keda.sh
resources:
- clusterhttpscalingsets/status
verbs:
- get
- patch
- update
- apiGroups:
- http.keda.sh
resources:
Expand Down Expand Up @@ -77,6 +127,32 @@ rules:
- patch
- update
- watch
- apiGroups:
- http.keda.sh
resources:
- httpscalingsets
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- http.keda.sh
resources:
- httpscalingsets/finalizers
verbs:
- update
- apiGroups:
- http.keda.sh
resources:
- httpscalingsets/status
verbs:
- get
- patch
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
4 changes: 1 addition & 3 deletions http-add-on/templates/scaler/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
app.kubernetes.io/component: scaler
{{- include "keda-http-add-on.labels" . | indent 8 }}
spec:
imagePullSecrets:
imagePullSecrets:
{{- toYaml .Values.scaler.imagePullSecrets | nindent 8 }}
serviceAccountName: {{ .Chart.Name }}-external-scaler
{{- if .Values.podSecurityContext.scaler }}
Expand All @@ -40,8 +40,6 @@ spec:
- containerPort: {{ .Values.scaler.grpcPort }}
name: grpc
env:
- name: KEDA_HTTP_SCALER_TARGET_ADMIN_DEPLOYMENT
value: "{{ .Chart.Name }}-interceptor"
- name: KEDA_HTTP_SCALER_PORT
value: "{{ .Values.scaler.grpcPort }}"
- name: KEDA_HTTP_SCALER_TARGET_ADMIN_NAMESPACE
Expand Down

0 comments on commit 5720465

Please sign in to comment.