Skip to content

Liveness / Readiness probes for PythonWatchManager #38

@gabe-l-hart

Description

@gabe-l-hart

Is your feature request related to a problem? Please describe.

As an operator maintainer in an application, I need to be able to probe the liveness/readiness of the operator. With the AnsibleWatchManager, the native /healthz and /readyz HTTP endpoints were accessible, but there's no equivalent with PWM.

Describe the solution you'd like

Add a heartbeat_thread to the PWM's group of managed threads. This thread will periodically dump the current time to a file if enabled.

Describe alternatives you've considered

  • Use a lightweight HTTP server to expose GET endpoint(s). The downside to this is that adding an HTTP server is non-trivial to code and adds non-trivial dependencies to do in a robust way.
  • Require users to install procps in their docker builds and run a ps aux | grep ... style check to ensure the operator is running. This has the downside of requiring a potentially dangerous tool (ps can be used to probe running processes), and it is also a bad approximation for the state of the running operator code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions