ideal-co/ogre

Handle Health Status Container Event

オープン

#12 opened on 2020/05/14

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Go (2 件のフォーク)auto 404
dockerenhancementgood first issue

Repository metrics

Stars
 (4 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

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

コントリビューターガイド