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
7 changes: 6 additions & 1 deletion charts/flagsmith/templates/deployment-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ spec:
{{- end }}
{{- end }}
ports:
- containerPort: {{ .Values.service.api.port }}
- name: http
containerPort: {{ .Values.service.api.port }}
{{- if .Values.prometheus.enabled }}
- name: prom
containerPort: 9100
{{- end }}
env: {{ include (print $.Template.BasePath "/_api_environment.yaml") . | nindent 8 }}
livenessProbe:
{{- if .Values.api.livenessProbe.exec }}
Expand Down
7 changes: 6 additions & 1 deletion charts/flagsmith/templates/deployment-task-processor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ spec:
- run-task-processor
{{- end }}
ports:
- containerPort: {{ .Values.service.taskProcessor.port }}
- name: http
containerPort: {{ .Values.service.taskProcessor.port }}
{{- if .Values.prometheus.enabled }}
- name: prom
containerPort: 9100
{{- end }}
env: {{ include (print $.Template.BasePath "/_task_processor_environment.yaml") . | nindent 8 }}
livenessProbe:
{{- $exec := .Values.taskProcessor.livenessProbe.exec | default .Values.api.livenessProbe.exec }}
Expand Down
19 changes: 14 additions & 5 deletions charts/flagsmith/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,19 @@ api:
nodeSelector: {}
tolerations: []
affinity: {}
# Container lifecycle hooks (e.g. preStop for graceful shutdown)
lifecycle: {}
# Pod termination grace period in seconds
terminationGracePeriodSeconds: null
# Container lifecycle hooks. Default preStop delays SIGTERM so the
# LB / endpoints controller has time to deregister the pod before
# gunicorn closes its listen socket. Without this, rolling deploys
# and HPA scale-down can cause a short 5xx spike on traffic that
# the LB routes to the pod after it has stopped accepting connections.
lifecycle:
preStop:
exec:
command: ["sleep", "20"]
# Pod termination grace period in seconds. Must exceed the LB's
# connection-draining timeout so the kubelet does not SIGKILL
# the pod while the LB is still draining in-flight connections.
terminationGracePeriodSeconds: 75
podSecurityContext: {}
defaultPodSecurityContext:
enabled: true
Expand Down Expand Up @@ -461,7 +470,7 @@ hpa:
enabled: false
minReplicas: 2
maxReplicas: 10
targetCPUUtilization: 50
targetCPUUtilization: 50
sse:
enabled: true
minReplicas: 1
Expand Down
Loading