Skip to content

Commit

Permalink
Adding the ability to set the default HTTP timeout (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
arschles authored Mar 31, 2021
1 parent 2cf4f7f commit 6a83ac8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions keda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ their default values.
| `affinity` | Affinity for pod scheduling ([docs](https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes-using-node-affinity/)) | `{}` |
| `priorityClassName` | Pod priority for KEDA Operator and Metrics Adapter ([docs](https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/)) | `` |
| `env` | Additional environment variables that will be passed onto KEDA operator and metrics api service | `` |
| `http.timeout` | The default HTTP timeout to use for all scalers that use raw HTTP clients (some scalers use SDKs to access target services. These have built-in HTTP clients, and the timeout does not necessarily apply to them) | `` |
| `service.annotations` | Annotations to add the KEDA Metric Server service | `{}` |
| `service.portHttp` | Service HTTP port for KEDA Metric Server service | `80` |
| `service.portHttpTarget` | Service HTTP port for KEDA Metric Server container | `8080` |
Expand Down
4 changes: 4 additions & 0 deletions keda/templates/12-keda-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ spec:
fieldPath: metadata.name
- name: OPERATOR_NAME
value: {{ .Values.operator.name }}
{{- if .Values.http.timeout }}
- name: KEDA_DEFAULT_HTTP_TIMEOUT
value: {{ .Values.http.timeout | quote }}
{{- end }}
{{- if .Values.env }}
{{- toYaml .Values.env | nindent 12 -}}
{{- end }}
Expand Down
6 changes: 6 additions & 0 deletions keda/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ affinity: {}
## Optional priorityClassName for KEDA Operator and Metrics Adapter
priorityClassName: ""

## The default HTTP timeout in milliseconds that KEDA should use
## when making requests to external services. Removing this defaults to a
## reasonable default
http:
timeout: 3000

## Extra environment variables that will be passed onto KEDA operator and metrics api service
env:
# - name: ENV_NAME
Expand Down

0 comments on commit 6a83ac8

Please sign in to comment.