chore(netbox): add healthchecks (#5439)
* chore(netbox): add healthchecks * smooth upgrade
This commit is contained in:
@@ -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 -}}
|
||||
|
||||
@@ -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 -}}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user