Take a look at the code in the tinkerbell/tink GitHub repository.
Tink Server exposes workflow actions over a gRPC API for Tink Worker to retrieve and execute. When a Tink Worker completes an action, it reports the status to Tink Server.
Tink Server uses Kubernetes custom resources to store workflow state.
Tink Server retrieves tasks from and updates task status' on
Workflow Kubernetes custom resources. Tinkerbell users submit the
Workflows to the cluster via the Kube API Server.