• Allow to make a controller without specific knowledges • Allow to implement a controller in familiar programming languages • Allow to validate new controller ideas more quickly Motivation
Whitebox Controller • https://github.com/summerwind/whitebox-controller • Extensible generic controller for Kubernetes • It is possible to replace “reconciler” with any command or HTTP server • Very similar to Metacontroller, but executes command • Just like "Whitebox Switch" but it is for Kubernetes controller
Implementing controller in bash (2) #!/bin/bash # Read current state from stdio. state=$(cat -) # Do something based on the state. url=$(echo "${state}" | jq -r ".object.status.url|select (.!=null)") if [ "${url}" == "" ]; then url=$(create_issue "${state}") fi # Update state. updated_state=$(echo "${state}" | jq -r ".object.status.url = \"${url}\"") # Write updated state to stdout. echo "${updated_state}" Write your reconciler in bash. reconcile.sh