There are many ways you can contribute to SonataFlow Operator, not only software development, as well as with the rest of Kogito community:
The main project is written in go. SonataFlow Operator is built on top of Kubernetes through Custom Resource Definitions.
This project aims to follow the Kubernetes Operator pattern
It uses Controllers which provides a reconcile function responsible for synchronizing resources untile the desired state is reached on the cluster
The Operator's controllers and the configurations are generated using the Operator sdk, the tasks are executed using a Makefile.
More information about annotations can be found via the Kubebuilder Documentation
In order to build the project, you need to comply with the following requirements:
GNU Make: Used to define composite build actions. This should be already installed or available as a package (https://www.gnu.org/software/make/).
NOTE: Run
make help
for more information on all potentialmake
targets
You’ll need a Kubernetes cluster to run against. You can use:
NOTE: Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster
kubectl cluster-info
shows).
IMPORTANT: Please make sure that your kubectl is version 1.24.0 or later since there's a bug performing validation on default attributes in Custom Resources.
You can launch the operator locally and bind to your cluster.
make install
make run
NOTE: You can also run this in one step by running:
make install run
NOTE: Run
make help
for more information on all potentialmake
targets
More information can be found via the Kubebuilder Documentation
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifests
make container-build
make deploy
make undeploy
See the section on README
A configmap called sonataflow-operator-builder-config
will be created under the sonataflow-operator-system
namespace when the Operator will be installed, and it contains:
<dockerfile content>
At the startup a Dockerfile is placed in a configmap. This Dockerfile uses a base image called kogito-swf-builder with:
/home/kogito/serverless-workflow-project
with those extensions:/home/kogito/.m2
directory in the image.There are, in the base image, some additional scripts in case of need to apply changes like this:
/home/kogito/launch/add-extension.sh
/home/kogito/launch/build-app.sh
/home/kogito/launch/create-app.sh
You can customize your final Image changing the Dockerfile in the configmap sonataflow-operator-builder-config accordingly to your specific needs.
apiVersion: sonataflow.org/v1alpha08 kind: SonataFlowPlatform metadata: name: greeting-workflow-platform spec: platform: registry: address: <docker registry repository> // the URI to access secret: <name of the secret> // the secret where credentials are stored insecure: true // if the container registry is insecure (ie, http only) ca: <name of the config map> // the configmap which stores the Certificate Authority organization: <name of the org> // the registry organization
Setup a pipeline on a Openshift cluster.