ideal-co/ogre

Handle Health Status Container Event

Aperta

#12 aperta il 14 mag 2020

 (0 commenti) (0 reazioni) (0 assegnatari)Go (2 fork)auto 404
dockerenhancementgood first issue

Metriche repository

Star
 (4 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Description:

Docker provides the HEALTHCHECK configuration in a Dockerfile. This will report some information to the events API when the status changes, not on a regular interval. Ogre should support this type of container event by default and make use of the data passed.

Notes:

The data passed in the event:

"State": {
... truncated ...
    "Health": {
        "Status": "unhealthy",
        "FailingStreak": 9,
        "Log": [
            {
                "Start": "2020-05-06T16:36:26.960121047Z",
                "End": "2020-05-06T16:36:27.16199565Z",
                "ExitCode": 1,
                "Output": ""
            }
        ]
    }
}

Approach:

This information should be parsed into a health.HealthCheck type (maybe reuse the DockerHealthCheck) and sent to the daemon as a msg.Message of type types.BackendMessage

Guida contributor