Skip to content

Commit

Permalink
feat: startupProbe to avoid a long initial delay seconds for livene…
Browse files Browse the repository at this point in the history
…ss probe (#174)

Signed-off-by: Amir Alavi <[email protected]>
  • Loading branch information
a7i authored Feb 9, 2024
1 parent 28e114a commit b33e55d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/opencost/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords:
- kubecost
- opencost
- monitoring
version: 1.29.0
version: 1.29.1
maintainers:
- name: mattray
- name: toscott
Expand Down
9 changes: 9 additions & 0 deletions charts/opencost/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@ spec:
- containerPort: {{ .Values.opencost.exporter.apiPort }}
name: http
resources: {{- toYaml .Values.opencost.exporter.resources | nindent 12 }}
{{- if .Values.opencost.exporter.startupProbe.enabled }}
startupProbe:
httpGet:
path: {{ .Values.opencost.exporter.startupProbe.path }}
port: {{ .Values.opencost.exporter.apiPort }}
initialDelaySeconds: {{ .Values.opencost.exporter.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.opencost.exporter.startupProbe.periodSeconds }}
failureThreshold: {{ .Values.opencost.exporter.startupProbe.failureThreshold }}
{{- end }}
{{- if .Values.opencost.exporter.livenessProbe.enabled }}
livenessProbe:
httpGet:
Expand Down
18 changes: 15 additions & 3 deletions charts/opencost/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,28 @@ opencost:
limits:
cpu: '999m'
memory: '1Gi'
# Startup probe configuration
startupProbe:
# -- Whether probe is enabled
enabled: true
# -- Probe path
path: /healthz
# -- Number of seconds before probe is initiated
initialDelaySeconds: 10
# -- Probe frequency in seconds
periodSeconds: 5
# -- Number of failures for probe to be considered failed
failureThreshold: 30
# Liveness probe configuration
livenessProbe:
# -- Whether probe is enabled
enabled: true
# -- Probe path
path: /healthz
# -- Number of seconds before probe is initiated
initialDelaySeconds: 120
initialDelaySeconds: 10
# -- Probe frequency in seconds
periodSeconds: 10
periodSeconds: 20
# -- Number of failures for probe to be considered failed
failureThreshold: 3
# Readiness probe configuration
Expand All @@ -133,7 +145,7 @@ opencost:
# -- Probe path
path: /healthz
# -- Number of seconds before probe is initiated
initialDelaySeconds: 120
initialDelaySeconds: 10
# -- Probe frequency in seconds
periodSeconds: 10
# -- Number of failures for probe to be considered failed
Expand Down

0 comments on commit b33e55d

Please sign in to comment.