Skip to content

Commit

Permalink
Merge pull request #26 from GDATASoftwareAG/customizable_auto_scaler_…
Browse files Browse the repository at this point in the history
…metrics

Allow configuring auto scaler metrics
  • Loading branch information
doxthree authored Oct 5, 2023
2 parents 02022b0 + ef359bd commit 3348da2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ For pricing details please [contact us](mailto:[email protected]). A free trial is po

# Options

| Name | Description | Value |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| Name | Description | Value |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `service.type` | service type | `ClusterIP` |
| `service.ports.api` | API service port | `8080` |
| `service.annotations` | service annotations | `{}` |
| `replicaCount` | number of pods | `1` |
| `service.annotations` | service annotations | `{}` |
| `replicaCount` | number of pods | `1` |
| `autoscaling.enabled` | enable auto scaling | `false` |
| `autoscaling.maxReplicas` | maximum number of replicas | `20` |
| `autoscaling.metrics` | custom metrics for auto scaling | |
2 changes: 1 addition & 1 deletion charts/gdscan/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ maintainers:
- name: G DATA CyberDefense AG
email: [email protected]
type: application
version: 1.1.4
version: 1.2.0
4 changes: 4 additions & 0 deletions charts/gdscan/templates/horizontal-pod-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ spec:
name: {{ include "gdscan.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
{{- if .Values.autoscaling.metrics }}
metrics: {{- toYaml .Values.autoscaling.metrics | nindent 4 }}
{{- else }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.autoscaling.targetCPU }}
{{- end }}
{{- end }}
1 change: 1 addition & 0 deletions charts/gdscan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ autoscaling:
minReplicas: 2
maxReplicas: 20
targetCPU: 75
metrics:

nodeSelector: {}

Expand Down

0 comments on commit 3348da2

Please sign in to comment.