Skip to content

Latest commit

 

History

141 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

API end points

Background colour that is visible

https://fqdn/background

Boot time

https://fqdn/boot

Uptime in pretty format

https://fqdn/uptime

Interaction

gomplate

gomplate -d up=https://fqdn/uptime -d background=https://fqdn/background -d boot=https://fqdn/boot -i 'Running for {{ (ds "up").up }} on colour {{ (ds "background").background }} since {{ (ds "boot").boot }}'

curl

curl -X POST -H "Content-Type: application/json" -d '{"background":"blue"}' https://fqdn/background

OpenShift Container Platform integration

New Project

oc new-project set-colour

New BuildConfig

oc new-app https://github.com/chornberger-c2c/set-colour.git

Create Route

oc expose svc/set-colour

Verify

URL=$(oc get route set-colour -o jsonpath='{.spec.host}''{"\n"}')
curl ${URL}

About

Provides a REST API to a website that allows to change the background colour from green to red to signal your availability.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages