github.com/yrj2011/jx-test-infra@v0.0.0-20190529031832-7a2065ee98eb/queue_health/README.md (about)

     1  This app monitors the submit queue and produces the chart at
     2  http://submit-queue.k8s.io/#/e2e.
     3  
     4  It does this with two components:
     5  
     6  - a poller, which polls the current state of the queue and appends it to a
     7    historical log.
     8  - a grapher, which gets the historical log and renders it into charts.
     9  
    10  This folder is organized in the following way:
    11  
    12  - base: base image that graph and poll customize
    13  - graph: a python app that downloads the polled history and renders it
    14  - poll: a python app that polls the submit queue every 60s
    15  - queue-health-graph-dev.yaml: test graph-only deployment
    16  - queue-health-prod.yaml: production queue-health deployment
    17  - queue-health.yaml: test queue-health deployment
    18  
    19  
    20  Expected usage on a cluster whose nodes have a storage-rw or -full scope:
    21  ```
    22  # vim graph/graph.py
    23  make -C graph && make -C poll  # Make new images
    24  kubectl create -f queue-health.yaml  # Deploy them to your cluster
    25  kubectl get pods -l app=queue-health-dev
    26  kubectl logs queue-health-dev-STUFF -c graph
    27  ```
    28  
    29  Test changes locally with a bit of docker volume hackery
    30  to send credentials to gsutil.
    31  See the comment above the `CMD` line
    32  in the `Dockerfile` of the folder of interest.
    33  
    34  However it is probably easier to iterate outside docker:
    35  ```
    36  python poller.py $HISTORY $GRAPH
    37  python graph.py $HISTORY $GRAPH
    38  ```