Skip to content

JadKHaddad/OpenFaaS-Operato.rs

Repository files navigation

OpenFaaS Functions OperatoRS

Install

  • Install the CRD
openfaas_functions_operato_rs crd install
  • Install the Operator in controller mode (in cluster)
openfaas_functions_operato_rs operator controller deploy install

If you would like to see, what exactly is being deployed, you can run the command

openfaas_functions_operato_rs operator controller deploy print
  • Now you can create a Function and wait for it to be ready
kubectl apply -f nodeinfo.yaml
kubectl wait --for=condition=ready openfaasfunctions -n openfaas-fn nodeinfo

Run locally

  • Run the Operator in controller mode
openfaas_functions_operato_rs operator controller run

Run in docker

  • Mount the kubeconfig file to the container
docker run --rm -it -v ~/.kube:/home/app/.kube openfaas_functions_operato_rs:latest operator controller run
docker run --rm -it -v ${USERPROFILE}/.kube:/home/app/.kube openfaas_functions_operato_rs:latest operator controller run

Uninstall

  • Uninstall the CRD
openfaas_functions_operato_rs crd uninstall

Uninstalling the CRD will automatically delete all the Functions

  • Uninstall the Operator
openfaas_functions_operato_rs operator controller deploy uninstall

Uninstalling the Operator will not delete the Functions. The Functions will no longer be managed by the Operator.

  • Delete a Function
kubectl delete -f nodeinfo.yaml

Help

openfaas_functions_operato_rs --help

Notes

  • The Function CRD is based on the OpenFaaS Function CRD with optional fields

Rust version

1.70.0

Contributors

License & copyright

© 2023 Jad K. Haddad Licensed under the Creative Commons Legal Code License