Skip to content

Commit

Permalink
EDIT lti-shim add readinessProbe to all deployment
Browse files Browse the repository at this point in the history
Gitlab AutoDevops deploy keeps failing. I think it's cause none of the
pods report ready, they only report running. Guessing that previously,
'running' status was good enough to consider the deployment a success.
So trying to see if the pods reporting 'ready' will fix this.

Note that even though the pods only report 'ready', they're actually all
running fine and serving traffic correctly. It's just that the
deployment gets reverted by timeout when the pods don't report ready.

All the timeouts check every minute to see if the pod is serving
traffic. For the ltijs-mongo pod though, it's technically only seeing if
the mongo ping is working, not that mongo is capable of serving traffic,
but I didn't want anything more complicated.
  • Loading branch information
ionparticle committed Nov 26, 2022
1 parent 73b25db commit 3e21070
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lti-shim/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
name: lti-shim
version: 0.5.5
version: 0.5.6
description: LTI proxy that anonymizes personal information
9 changes: 9 additions & 0 deletions lti-shim/templates/deployment-ltijs-mongo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ spec:
image: {{ .Values.ltijs.db.image }}
ports:
- containerPort: {{ .Values.ltijs.db.port }}
readinessProbe:
failureThreshold: 2
periodSeconds: 60
exec:
command:
- bash
- "-c"
- |
mongo -u $MONGO_INITDB_ROOT_USERNAME -p $MONGO_INITDB_ROOT_PASSWORD --eval db.adminCommand\(\"ping\"\)
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: {{ .Values.ltijs.db.user }}
Expand Down
6 changes: 6 additions & 0 deletions lti-shim/templates/deployment-ltijs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: {{ .Values.ltijs.port }}
readinessProbe:
httpGet:
path: /
port: {{ .Values.ltijs.port }}
failureThreshold: 2
periodSeconds: 60
env:
- name: PORT
value: {{ .Values.ltijs.port | quote }}
Expand Down
5 changes: 5 additions & 0 deletions lti-shim/templates/deployment-mail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ spec:
imagePullPolicy: IfNotPresent
ports:
- containerPort: {{ .Values.mail.port }}
readinessProbe:
failureThreshold: 2
periodSeconds: 60
tcpSocket:
port: {{ .Values.mail.port }}
env:
- name: POSTFIX_SENDER_NOREPLY
value: {{ .Values.mail.noreply | quote }}
Expand Down
6 changes: 6 additions & 0 deletions lti-shim/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ spec:
ports:
- name: http
containerPort: 80
readinessProbe:
httpGet:
path: /
port: http
failureThreshold: 2
periodSeconds: 60
env:
- name: APP_NAME
value: {{ .Values.app.name | quote }}
Expand Down

0 comments on commit 3e21070

Please sign in to comment.