Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add middleware or similar for Kubernetes probes #15

Open
bittner opened this issue Oct 13, 2020 · 0 comments
Open

Add middleware or similar for Kubernetes probes #15

bittner opened this issue Oct 13, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@bittner
Copy link
Member

bittner commented Oct 13, 2020

As of today, this Django app only provides a way to ensure that a database, configured in your Django project, is reachable. The main use case for this is a Kubernetes Init Container.

Health checks

For the health checks after the startup phase, we usually suggest to implement the Kubernetes probes with the least impact that technically makes sense. For Python application running uWSGI this is a check on the socket, e.g.

      containers:
      - name: django
        ports:
        - name: uwsgi
          containerPort: 8000
        livenessProbe:
          tcpSocket:
            port: uwsgi
          initialDelaySeconds: 13
        readinessProbe:
          tcpSocket:
            port: uwsgi
          initialDelaySeconds: 9

However, if someone for some specific reason wanted to do checks deeper into the Django application stack we may need to provide an appropriate way to call the application in a way that consumes few resources. (A management command will probably not do for this use case.)

Other background reading

@bittner bittner added enhancement New feature or request help wanted Extra attention is needed labels Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant