Skip to content

Commit

Permalink
Issue #157 feature properly setup liveness and readyness probes for a…
Browse files Browse the repository at this point in the history
…ll containers (#179)

[Fixes #157]  Feature: properly setup liveness and readyness probes for all containers
  • Loading branch information
mwallschlaeger authored Jun 18, 2024
1 parent 1dcf0a3 commit b25cfd7
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 17 deletions.
20 changes: 17 additions & 3 deletions charts/geonode/templates/geonode/geonode-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ spec:
dockerize -stdout /var/log/geonode.log /usr/local/bin/uwsgi --ini /usr/src/geonode/uwsgi.ini
ports:
- containerPort: 8000
- containerPort: 8001

- name: http
containerPort: 8000
- name: http-monitor
containerPort: 8001
envFrom:
- configMapRef:
name: {{ include "geonode_pod_name" . }}-env
Expand Down Expand Up @@ -155,6 +156,19 @@ spec:
readOnly: true
{{ end }}

startupProbe:
httpGet:
path: /
port: http-monitor
failureThreshold: 10
periodSeconds: 10

livenessProbe:
httpGet:
path: /
port: http-monitor
initialDelaySeconds: 90
periodSeconds: 10
resources:
requests:
memory: {{ .Values.geonode.resources.requests.memory }}
Expand Down
4 changes: 1 addition & 3 deletions charts/geonode/templates/geoserver/geoserver-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,12 @@ spec:
readinessProbe:
tcpSocket:
port: {{ .Values.geoserver.port }}
initialDelaySeconds: 60
periodSeconds: 5
failureThreshold: 15

livenessProbe:
tcpSocket:
port: {{ .Values.geoserver.port }}
initialDelaySeconds: 180
initialDelaySeconds: 90
periodSeconds: 5
failureThreshold: 15

Expand Down
15 changes: 11 additions & 4 deletions charts/geonode/templates/nginx/nginx-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ spec:
image: "{{ .Values.nginx.image.name }}:{{ .Values.nginx.image.tag }}"
imagePullPolicy: {{ .Values.nginx.imagePullPolicy }}
ports:
- name: http
{{- if (eq .Values.geonode.general.externalScheme "https" )}}
- containerPort: 443
name: https
containerPort: 443
{{- else }}
- containerPort: 80
name: http
containerPort: 80
{{- end }}

volumeMounts:
Expand All @@ -46,6 +45,14 @@ spec:
- name: nginx-confd
mountPath: /etc/nginx/conf.d

# this will fail as long as statics are not build by the geonode sts
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 15
timeoutSeconds: 5

resources:
requests:
memory: {{ .Values.nginx.resources.requests.memory }}
Expand Down
20 changes: 13 additions & 7 deletions charts/geonode/templates/pycsw/pycsw-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ spec:
value: "postgresql://$(GEONODE_DATABASE):$(GEONODE_DATABASE_PASSWORD)@$(DATABASE_HOST):$(DATABASE_PORT)/$(GEONODE_DATABASE)"

ports:
- containerPort: {{ .Values.pycsw.port }}
- name: http
containerPort: {{ .Values.pycsw.port }}
volumeMounts:
- name: pycsw-cfg
mountPath: "/etc/pycsw/pycsw.cfg"
Expand All @@ -67,19 +68,24 @@ spec:
mountPath: /etc/pycsw/pycsw-mappings.py
subPath: pycsw-mappings.py
readOnly: true
readinessProbe:
httpGet:
path: /
port: http
timeoutSeconds: 5
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
timeoutSeconds: 5
resources:
requests:
memory: {{ .Values.pycsw.resources.requests.memory }}
cpu: {{ .Values.pycsw.resources.requests.cpu }}
limits:
memory: {{ .Values.pycsw.resources.limits.memory }}
cpu: {{ .Values.pycsw.resources.limits.cpu }}
# livenessProbe:
# httpGet:
# path: /
# port: {{ .Values.pycsw.port }}
# initialDelaySeconds: 3
# periodSeconds: 10

volumes:
- name: pycsw-cfg
Expand Down

0 comments on commit b25cfd7

Please sign in to comment.