Skip to content

Commit

Permalink
HPA: set maxReplicas from Values, add grace period
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Fomenko <[email protected]>
  • Loading branch information
byako committed Aug 21, 2024
1 parent f32d810 commit d39dc51
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions helm-charts/chatqna/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ spec:
# port: {{ .Values.port }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.horizontalPodAutoscaler.enabled }}
terminationGracePeriodSeconds: 120
{{- end }}
volumes:
- name: tmp
emptyDir: {}
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/chatqna/templates/horizontalPorAutoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
kind: Deployment
name: {{ include "chatqna.fullname" . }}
minReplicas: 1
maxReplicas: 6
maxReplicas: {{ .Values.horizontalPodAutoscaler.maxReplicas }}
metrics:
- type: Object
object:
Expand Down
1 change: 1 addition & 0 deletions helm-charts/chatqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
replicaCount: 1
horizontalPodAutoscaler:
enable: false
maxReplicas: 6

image:
repository: opea/chatqna
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/common/embedding-usvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.horizontalPodAutoscaler.enabled }}
terminationGracePeriodSeconds: 60
{{- end }}
volumes:
- name: tmp
emptyDir: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
kind: Deployment
name: {{ include "embedding-usvc.fullname" . }}
minReplicas: 1
maxReplicas: 2
maxReplicas: {{ .Values.horizontalPodAutoscaler.maxReplicas }}
metrics:
- type: Object
object:
Expand Down
1 change: 1 addition & 0 deletions helm-charts/common/embedding-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ autodependency:
replicaCount: 1
horizontalPodAutoscaler:
enabled: false
maxReplicas: 2

TEI_EMBEDDING_ENDPOINT: ""
image:
Expand Down
3 changes: 3 additions & 0 deletions helm-charts/common/reranking-usvc/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.horizontalPodAutoscaler.enabled }}
terminationGracePeriodSeconds: 60
{{- end }}
volumes:
- name: tmp
emptyDir: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spec:
kind: Deployment
name: {{ include "reranking-usvc.fullname" . }}
minReplicas: 1
maxReplicas: 3
maxReplicas: {{ .Values.horizontalPodAutoscaler.maxReplicas }}
metrics:
- type: Object
object:
Expand Down
1 change: 1 addition & 0 deletions helm-charts/common/reranking-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ autodependency:
replicaCount: 1
horizontalPodAutoscaler:
enabled: false
maxReplicas: 3

TEI_RERANKING_ENDPOINT: ""
image:
Expand Down

0 comments on commit d39dc51

Please sign in to comment.