New health check added
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 16s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 3s
All checks were successful
Build containers when image tags change / build-if-image-changed (., web, containers, main container, git.baumann.gr/adebaumann/labhelper) (push) Successful in 16s
Build containers when image tags change / build-if-image-changed (data-loader, loader, initContainers, init-container, git.baumann.gr/adebaumann/labhelper-data-loader) (push) Successful in 3s
This commit is contained in:
@@ -27,7 +27,7 @@ spec:
|
|||||||
mountPath: /data
|
mountPath: /data
|
||||||
containers:
|
containers:
|
||||||
- name: web
|
- name: web
|
||||||
image: git.baumann.gr/adebaumann/labhelper:0.080
|
image: git.baumann.gr/adebaumann/labhelper:0.081
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
@@ -137,7 +137,7 @@ spec:
|
|||||||
mountPath: /app/data
|
mountPath: /app/data
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /health/
|
||||||
port: 8000
|
port: 8000
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
@@ -145,7 +145,7 @@ spec:
|
|||||||
failureThreshold: 6
|
failureThreshold: 6
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /health/
|
||||||
port: 8000
|
port: 8000
|
||||||
initialDelaySeconds: 20
|
initialDelaySeconds: 20
|
||||||
periodSeconds: 20
|
periodSeconds: 20
|
||||||
|
|||||||
@@ -18,6 +18,11 @@ from .forms import (
|
|||||||
from .models import Box, BoxType, Facet, Tag, Thing, ThingFile, ThingLink
|
from .models import Box, BoxType, Facet, Tag, Thing, ThingFile, ThingLink
|
||||||
|
|
||||||
|
|
||||||
|
def health_check(request):
|
||||||
|
"""Health check endpoint for Kubernetes liveness/readiness probes."""
|
||||||
|
return HttpResponse('OK', status=200)
|
||||||
|
|
||||||
|
|
||||||
def _strip_markdown(text, max_length=100):
|
def _strip_markdown(text, max_length=100):
|
||||||
"""Convert Markdown to plain text and truncate."""
|
"""Convert Markdown to plain text and truncate."""
|
||||||
if not text:
|
if not text:
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ from boxes.views import (
|
|||||||
edit_box_type,
|
edit_box_type,
|
||||||
edit_thing,
|
edit_thing,
|
||||||
fixme,
|
fixme,
|
||||||
|
health_check,
|
||||||
index,
|
index,
|
||||||
resources_list,
|
resources_list,
|
||||||
search_api,
|
search_api,
|
||||||
@@ -43,6 +44,7 @@ from boxes.views import (
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('oidc/', include('mozilla_django_oidc.urls')),
|
path('oidc/', include('mozilla_django_oidc.urls')),
|
||||||
path('login/', TemplateView.as_view(template_name='login.html'), name='login'),
|
path('login/', TemplateView.as_view(template_name='login.html'), name='login'),
|
||||||
|
path('health/', health_check, name='health_check'),
|
||||||
path('', index, name='index'),
|
path('', index, name='index'),
|
||||||
path('box-management/', box_management, name='box_management'),
|
path('box-management/', box_management, name='box_management'),
|
||||||
path('box-type/add/', add_box_type, name='add_box_type'),
|
path('box-type/add/', add_box_type, name='add_box_type'),
|
||||||
|
|||||||
Reference in New Issue
Block a user