chore(netbox): add healthchecks (#5439)

* chore(netbox): add healthchecks

* smooth upgrade
This commit is contained in:
Stavros Kois
2022-12-16 22:21:56 +02:00
committed by GitHub
parent e09dfe58f1
commit 70b534e25b
9 changed files with 73 additions and 19 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ name: netbox
sources:
- https://github.com/truecharts/charts/tree/master/charts/incubator/netbox
- https://github.com/netbox-community/netbox-docker
version: 3.0.12
version: 3.0.13
annotations:
truecharts.org/catagories: |
- network
@@ -30,4 +30,37 @@ volumeMounts:
- name: configfile
mountPath: /etc/netbox/config/01-config.py
subPath: config.py
readinessProbe:
exec:
command:
- /bin/bash
- -c
- |
ps -aux | grep -v grep | grep -q housekeeping || exit 1
initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }}
periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }}
failureThreshold: {{ .Values.probes.readiness.spec.failureThreshold }}
livenessProbe:
exec:
command:
- /bin/bash
- -c
- |
ps -aux | grep -v grep | grep -q housekeeping || exit 1
initialDelaySeconds: {{ .Values.probes.liveness.spec.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.liveness.spec.timeoutSeconds }}
periodSeconds: {{ .Values.probes.liveness.spec.periodSeconds }}
failureThreshold: {{ .Values.probes.liveness.spec.failureThreshold }}
startupProbe:
exec:
command:
- /bin/bash
- -c
- |
ps -aux | grep -v grep | grep -q housekeeping || exit 1
initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
{{- end -}}
+14 -5
View File
@@ -29,10 +29,13 @@ volumeMounts:
- name: configfile
mountPath: /etc/netbox/config/01-config.py
subPath: config.py
{{/*readinessProbe:
readinessProbe:
exec:
command:
- TODO: find a healthcheck
- /bin/bash
- -c
- |
ps -aux | grep -v grep | grep -q rqworker || exit 1
initialDelaySeconds: {{ .Values.probes.readiness.spec.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.readiness.spec.timeoutSeconds }}
periodSeconds: {{ .Values.probes.readiness.spec.periodSeconds }}
@@ -40,7 +43,10 @@ volumeMounts:
livenessProbe:
exec:
command:
- TODO: find a healthcheck
- /bin/bash
- -c
- |
ps -aux | grep -v grep | grep -q rqworker || exit 1
initialDelaySeconds: {{ .Values.probes.liveness.spec.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.liveness.spec.timeoutSeconds }}
periodSeconds: {{ .Values.probes.liveness.spec.periodSeconds }}
@@ -48,9 +54,12 @@ livenessProbe:
startupProbe:
exec:
command:
- TODO: find a healthcheck
- /bin/bash
- -c
- |
ps -aux | grep -v grep | grep -q rqworker || exit 1
initialDelaySeconds: {{ .Values.probes.startup.spec.initialDelaySeconds }}
timeoutSeconds: {{ .Values.probes.startup.spec.timeoutSeconds }}
periodSeconds: {{ .Values.probes.startup.spec.periodSeconds }}
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}*/}}
failureThreshold: {{ .Values.probes.startup.spec.failureThreshold }}
{{- end -}}
+3 -3
View File
@@ -14,13 +14,13 @@ podSecurityContext:
probes:
liveness:
type: HTTP
path: /login
path: /api
readiness:
type: HTTP
path: /login
path: /api
startup:
type: HTTP
path: /login
path: /api
# Gives some time for app to run db migrations
initialDelaySeconds: 60