commit | a6a954abe391ed5bd4e6856b494fa2a768dcb431 | [log] [tgz] |
---|---|---|
author | Roy Golan <rgolan@redhat.com> | Thu Jul 25 16:36:23 2024 +0300 |
committer | GitHub <noreply@github.com> | Thu Jul 25 15:36:23 2024 +0200 |
tree | 4bcd361205c20a895358574fe82ea73178ddccc6 | |
parent | 5c00933758d0bbcdee1af55abd8b033de0ddbbed [diff] |
Set recommended kubernetes labels on services and workflows (#482) Motivation: There's a need to select efficiently workflows and their respective services. Having the common kubernetes labels allow a single selector: podSelector: matchExpressions: - { key: app.kubernetes.io/component, operator: In, values: ["data-index-service", "jobs-service", "serverless-workflow"] } Modification: Make the v1.Deployment for services and the deployment or knative services to contain at common labels Result: A workflow deployment or knative serving labels: app.kubernetes.io/name: ${workflow name} app.kubernetes.io/component: serverless-workflow app.kubernetes.io/part-of: ${platform url set by status} app.kubernetes.io/managed-by: sonataflow-operator Data index or Jobs services Deployment.v1 labels: app.kubernetes.io/name: ${service name} app.kubernetes.io/component: data-index-service|jobs-service app.kubernetes.io/part-of: ${platform name} app.kubernetes.io/managed-by: sonataflow-operator Reference: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels Signed-off-by: Roy Golan <rgolan@redhat.com>
The SonataFlow Operator defines a set of Kubernetes Custom Resources to help users to deploy SonataFlow projects on Kubernetes and OpenShift.
Please visit our official documentation to know more.
If you're a developer, and you are interested in integrating your project or application with the SonataFlow Operator ecosystem, this repository provides a few Go Modules described below.
Every custom resource managed by the operator is exported in the module api. You can use it to programmatically create any custom type managed by the operator. To use it, simply run:
go get github.com/kiegroup/kogito-serverless-workflow/api
Then you can create any type programmatically, for example:
workflow := &v1alpha08.SonataFlow{
ObjectMeta: metav1.ObjectMeta{Name: w.name, Namespace: w.namespace},
Spec: v1alpha08.SonataFlowSpec{Flow: *myWorkflowDef>}
}
You can use the Kubernetes client-go library to manipulate these objects in the cluster.
You might need to register our schemes:
s := scheme.Scheme
utilruntime.Must(v1alpha08.AddToScheme(s))
Please see the module's README file.
Please see the module's README file.
Contributing is easy, just take a look at our contributors'guide.
In order to productize the Red Hat OpenShift Serverless Logic Operator read the notes into the productization'section.