Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions charts/echo-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ helm upgrade -i ${name} ealenn/echo-server --namespace ${namespace} --force
| application.enable.request | bool | `true` | Enable request in response |
| application.logs.ignore.ping | bool | `false` | Don't log ping request on route `/ping` |
| fullnameOverride | string | `""` | |
| hpa.enabled | bool | `false` | |
| hpa.maxReplicas | int | `5` | |
| hpa.metrics | list | `[]` | |
| hpa.minReplicas | int | `1` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"ealen/echo-server"` | https://hub.docker.com/r/ealen/echo-server |
| image.tag | string | `"0.6.0"` | https://github.com/Ealenn/Echo-Server/releases |
Expand All @@ -49,6 +53,7 @@ helm upgrade -i ${name} ealenn/echo-server --namespace ${namespace} --force
| ingress.hosts[0].host | string | `"cluster.local"` | |
| ingress.hosts[0].paths[0] | string | `"/"` | |
| ingress.ingressClassName | string | `""` | |
| ingress.pathType | string | `"ImplementationSpecific"` | |
| ingress.tls | list | `[]` | |
| livenessProbe.failureThreshold | int | `3` | |
| livenessProbe.httpGet.httpHeaders[0].name | string | `"x-echo-code"` | |
Expand Down
21 changes: 21 additions & 0 deletions charts/echo-server/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.hpa }}
{{- if .Values.hpa.enabled }}
{{- if .Values.resources.requests }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "echo-server.fullname" . }}
labels:
{{ include "echo-server.labels" . | indent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "echo-server.fullname" . }}
minReplicas: {{ .Values.hpa.minReplicas }}
maxReplicas: {{ .Values.hpa.maxReplicas }}
metrics:
{{- toYaml .Values.hpa.metrics | nindent 2 }}
{{- end }}
{{- end }}
{{- end }}
18 changes: 18 additions & 0 deletions charts/echo-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,24 @@ resources:
cpu: 50m
memory: 128Mi

hpa:
enabled: false
minReplicas: 1
maxReplicas: 5
metrics: []
# - resource:
# name: cpu
# target:
# averageUtilization: 75
# type: Utilization
# type: Resource
# - resource:
# name: memory
# target:
# averageUtilization: 75
# type: Utilization
# type: Resource

nodeSelector: {}

tolerations: []
Expand Down