Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add readiness probe for lms/cms #133

Merged
merged 16 commits into from
Sep 11, 2024
Merged
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
3 changes: 3 additions & 0 deletions drydock/patches/openedx-common-settings
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ XBLOCK_SETTINGS["ScormXBlock"] = {
"STORAGE_FUNC": scorm_xblock_storage,
}
{% endif %}

LOGGING["loggers"].pop("tracking")
LOGGING["loggers"][""]["handlers"] = ["console"]
2 changes: 2 additions & 0 deletions drydock/patches/uwsgi-config
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ no-defer-accept = true
master = true
py-call-osafterfork = true
vacuum = true
hook-master-start = unix_signal:1 gracefully_kill_them_all
disable-logging = true
jfavellar90 marked this conversation as resolved.
Show resolved Hide resolved
31 changes: 26 additions & 5 deletions drydock/templates/drydock/k8s/lifecycle/cms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,37 @@ spec:
exec:
command:
- "sleep"
- "30"
- "15"
jfavellar90 marked this conversation as resolved.
Show resolved Hide resolved
startupProbe:
httpGet:
httpHeaders:
- name: Host
value: {{ CMS_HOST }}
value: cms
path: /heartbeat
port: 8000
initialDelaySeconds: 5
initialDelaySeconds: 1
timeoutSeconds: 3
periodSeconds: 5
failureThreshold: 5
periodSeconds: 1
failureThreshold: 30
livenessProbe:
httpGet:
httpHeaders:
- name: Host
value: lms
path: /heartbeat
port: 8000
initialDelaySeconds: 3
timeoutSeconds: 30
periodSeconds: 60
failureThreshold: 2
successThreshold: 1
terminationGracePeriodSeconds: 60
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: cms
topologyKey: kubernetes.io/hostname
31 changes: 26 additions & 5 deletions drydock/templates/drydock/k8s/lifecycle/lms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,37 @@ spec:
exec:
command:
- "sleep"
- "30"
- "15"
startupProbe:
httpGet:
httpHeaders:
- name: Host
value: {{ LMS_HOST }}
value: lms
path: /heartbeat
port: 8000
initialDelaySeconds: 5
initialDelaySeconds: 1
timeoutSeconds: 3
periodSeconds: 5
failureThreshold: 5
periodSeconds: 1
failureThreshold: 30
livenessProbe:
httpGet:
httpHeaders:
- name: Host
value: lms
path: /heartbeat
port: 8000
initialDelaySeconds: 3
timeoutSeconds: 30
periodSeconds: 60
failureThreshold: 2
successThreshold: 1
terminationGracePeriodSeconds: 60
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app.kubernetes.io/name: lms
topologyKey: kubernetes.io/hostname
Loading