Freyr is an example Go Kubernetes Operator using operator-sdk.
# https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/
cd freyr
operator-sdk init --domain=fmtl.au [email protected] --project-name freyr;
operator-sdk create api --group freyr --version v1alpha1 --kind Freyr --resource --controller --namespaced=false
Freyr is a k8s operator, which manages a basic Captain/Conscript worker registration webapp.
When deployed, it will deploy an operator which manages Freyr resources (CRD)
Given the following freyr manifest, the following will be deployed:
apiVersion: freyr.fmtl.au/v1alpha1
kind: Freyr
metadata:
name: freyr-demo
spec:
mode: trig
trig:
duration: 300s
min: 2
max: 18
- Trig - trigonometric mode. Scale the conscripts based on a generated Sine wave
- Weather - weather mode. Scale the conscripts based on the current temperature of a given city.
- Uses openweather api
View the Freyr Spec for more information.
When the application is deployed and configured, the Captain deployment should be able to report
via api request about the current state of things. EG: