Skip to content

Commit

Permalink
Increase timing between polling (#102)
Browse files Browse the repository at this point in the history
* increasing time between probe checks

* adjusting startup delay to 60 seconds
  • Loading branch information
bigtallcampbell authored Aug 1, 2024
1 parent 86ae868 commit b41347e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 6 deletions.
1 change: 1 addition & 0 deletions chart/templates/_secrets.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ data:
spacefx_dir_xfer: {{ printf "%s/%s/%s" $globalValues.spacefxDirectories.base $globalValues.spacefxDirectories.xfer $serviceValues.appName | b64enc }}
heartbeatpulsetimingms: {{ printf "%.0f" $globalValues.appConfig.heartBeatPulseTimingMS | b64enc }}
heartbeatreceivedtolerancems: {{ printf "%.0f" $globalValues.appConfig.heartBeatReceivedToleranceMS | b64enc }}
heartbeatreceivedcriticaltolerancems: {{ printf "%.0f" $globalValues.appConfig.heartBeatReceivedCriticalToleranceMS | b64enc }}
resourcemonitorenabled: {{ $globalValues.appConfig.resourceMonitorEnabled | ternary "true" "false" | b64enc }}
resourcemonitortimingms: {{ printf "%.0f" $globalValues.appConfig.resourceMonitorTimingMS | b64enc }}
resourcescavengerenabled: {{ $globalValues.appConfig.resourceScavengerEnabled | ternary "true" "false" | b64enc }}
Expand Down
21 changes: 15 additions & 6 deletions chart/templates/_service.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,35 @@ spec:
{{- include "spacefx.daprannotations" (dict "globalValues" $globalValues "serviceValues" $serviceValues) | indent 8 }}
spec:
serviceAccountName: {{ $serviceValues.appName | quote }}
terminationGracePeriodSeconds: 1
{{- if eq $serviceValues.appName "platform-mts" }}
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
{{- end }}
containers:
- name: {{ $serviceValues.appName | quote }}
{{- if or $serviceValues.appHealthChecks $serviceValues.debugShim }}
ports:
- name: liveness-port
- name: app-port
containerPort: 50051
{{- if or $serviceValues.appHealthChecks $serviceValues.debugShim }}
{{- if $globalValues.probes.liveness.enabled }}
livenessProbe:
grpc:
port: 50051
failureThreshold: 2
periodSeconds: 5
failureThreshold: {{ $globalValues.probes.liveness.failureThreshold }}
periodSeconds: {{ $globalValues.probes.liveness.periodSeconds }}
initialDelaySeconds: {{ $globalValues.probes.liveness.initialDelaySeconds }}
timeoutSeconds: {{ $globalValues.probes.liveness.timeoutSeconds }}
{{- end }}
{{- if $globalValues.probes.startup.enabled }}
startupProbe:
grpc:
port: 50051
failureThreshold: 100
periodSeconds: 5
failureThreshold: {{ $globalValues.probes.startup.failureThreshold }}
periodSeconds: {{ $globalValues.probes.startup.periodSeconds }}
initialDelaySeconds: {{ $globalValues.probes.startup.initialDelaySeconds }}
timeoutSeconds: {{ $globalValues.probes.startup.timeoutSeconds }}
{{- end }}
{{- end }}
{{- if $serviceValues.securityContext }}
securityContext:
Expand Down
14 changes: 14 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@ global:
appConfig:
heartBeatPulseTimingMS: 2000
heartBeatReceivedToleranceMS: 10000
heartBeatReceivedCriticalToleranceMS: 60000
resourceMonitorEnabled: false
resourceMonitorTimingMS: 5000
resourceScavengerEnabled: true
resourceScavengerTimingMS: 30000
probes:
liveness:
enabled: true
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
failureThreshold: 3
startup:
enabled: true
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 100
containerCommand: dotnet
containerRegistry: registry.spacefx.local:5000
containerRegistryInternal: coresvc-registry.coresvc.svc.cluster.local:5000
Expand Down

0 comments on commit b41347e

Please sign in to comment.