diff --git a/charts/minecraft-bedrock/templates/deployment.yaml b/charts/minecraft-bedrock/templates/deployment.yaml index 1934e5d..dcbbc0d 100644 --- a/charts/minecraft-bedrock/templates/deployment.yaml +++ b/charts/minecraft-bedrock/templates/deployment.yaml @@ -93,6 +93,21 @@ spec: - {{ .Values.minecraftServer.serverPort | quote }} initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} {{- end }} + {{- if and .Values.startupProbe.enabled (not .Values.restoreMode) }} + startupProbe: + exec: + command: + - mc-monitor + - status-bedrock + - --host + # force health check against IPv4 port + - 127.0.0.1 + - --port + - {{ .Values.minecraftServer.serverPort | quote }} + initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} + failureThreshold: {{ .Values.startupProbe.failureThreshold }} + periodSeconds: {{ .Values.startupProbe.periodSeconds }} + {{- end }} {{- with .Values.envFrom }} envFrom: diff --git a/charts/minecraft-bedrock/values.yaml b/charts/minecraft-bedrock/values.yaml index eacd9bc..dbb712d 100644 --- a/charts/minecraft-bedrock/values.yaml +++ b/charts/minecraft-bedrock/values.yaml @@ -52,6 +52,11 @@ livenessProbe: initialDelaySeconds: 30 readinessProbe: initialDelaySeconds: 30 +startupProbe: + enabled: false + initialDelaySeconds: 30 + failureThreshold: 60 + periodSeconds: 10 # https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ shareProcessNamespace: false