This is an automated email from the ASF dual-hosted git repository.
ricardozanini pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-kie-kogito-serverless-operator.git
The following commit(s) were added to refs/heads/main by this push:
new 4db88459 [KOGITO-9103] [KSW-Operator] Create the cekit image
descriptor for Op… (#145)
4db88459 is described below
commit 4db884596c98a2947425eba5e1a2e90eb9ec7e5e
Author: Davide Salerno <[email protected]>
AuthorDate: Wed Sep 27 19:58:08 2023 +0200
[KOGITO-9103] [KSW-Operator] Create the cekit image descriptor for Op…
(#145)
* [KOGITO-9103] [KSW-Operator] Create the cekit image descriptor for
Operator bundle image
Signed-off-by: Davide Salerno <[email protected]>
* Apply Marian's suggestions from code review
Co-authored-by: Marián Macik <[email protected]>
* Added missing API Markers to Flow API
Signed-off-by: Davide Salerno <[email protected]>
* Apply Filipe's suggestions from code review
Co-authored-by: Filippe Spolti <[email protected]>
* Rebuilt Operator image with version 1.30.0
Signed-off-by: Davide Salerno <[email protected]>
* [KOGITO-9103] Changes to align CSV to the latest community version
Signed-off-by: Davide Salerno <[email protected]>
* [KOGITO-9103] Restoring community bundle directory structure
Signed-off-by: Davide Salerno <[email protected]>
* [KOGITO-9103] Reducing duplication into kustomize config folder - 1st step
Signed-off-by: Davide Salerno <[email protected]>
* [KOGITO-9103] Updating the builder image with the productized one
Signed-off-by: Davide Salerno <[email protected]>
* [KOGITO-9103] Added Makefile target to align osl config files with
community ones
Signed-off-by: Davide Salerno <[email protected]>
* [KOGITO-9103] Rebasing with main
Signed-off-by: Davide Salerno <[email protected]>
* Update osl-bundle-prod.yaml
Co-authored-by: Tristan Radisson <[email protected]>
* [KOGITO-9103] Applying Tristan's suggestions
Signed-off-by: Davide Salerno <[email protected]>
---------
Signed-off-by: Davide Salerno <[email protected]>
Co-authored-by: Marián Macik <[email protected]>
Co-authored-by: Filippe Spolti <[email protected]>
Co-authored-by: Tristan Radisson <[email protected]>
---
Makefile | 3 +
Makefile => Makefile.osl | 86 ++-
README.md | 4 +
api/v1alpha08/sonataflow_types.go | 16 +-
api/v1alpha08/sonataflowbuild_types.go | 32 +-
api/v1alpha08/sonataflowplatform_types.go | 14 +-
bundle.Dockerfile | 3 +-
...operator-rhel8-builder-config_v1_configmap.yaml | 22 +
...troller-manager-metrics-service_v1_service.yaml | 17 +
...operator-rhel8-manager-config_v1_configmap.yaml | 17 +
...r_rbac.authorization.k8s.io_v1_clusterrole.yaml | 10 +
...logic-operator-rhel8.clusterserviceversion.yaml | 654 +++++++++++++++++++++
.../manifests/sonataflow.org_sonataflowbuilds.yaml | 9 +-
.../sonataflow.org_sonataflowplatforms.yaml | 5 +-
.../manifests/sonataflow.org_sonataflows.yaml | 11 +-
bundle.osl/metadata/annotations.yaml | 14 +
{bundle => bundle.osl}/tests/scorecard/config.yaml | 10 +-
.../sonataflow-operator.clusterserviceversion.yaml | 137 ++++-
.../manifests/sonataflow.org_sonataflowbuilds.yaml | 9 +-
.../sonataflow.org_sonataflowplatforms.yaml | 5 +-
bundle/manifests/sonataflow.org_sonataflows.yaml | 11 +-
bundle/tests/scorecard/config.yaml | 10 +-
.../crd/bases/sonataflow.org_sonataflowbuilds.yaml | 9 +-
.../bases/sonataflow.org_sonataflowplatforms.yaml | 5 +-
config/crd/bases/sonataflow.org_sonataflows.yaml | 11 +-
config/default/osl/kustomization.yaml | 74 +++
config/default/osl/manager_auth_proxy_patch.yaml | 39 ++
config/manager/manager.yaml | 2 -
config/manager/osl/controller_manager_config.yaml | 11 +
config/manager/osl/kustomization.yaml | 39 ++
config/manager/{ => osl}/manager.yaml | 2 -
.../manager/osl/sonataflow_builder_dockerfile.yaml | 31 +
.../sonataflow-operator.clusterserviceversion.yaml | 125 ++++
...logic-operator-rhel8.clusterserviceversion.yaml | 207 +++++++
config/manifests/osl/kustomization.yaml | 27 +
config/samples/kustomization.yaml | 1 +
.../sonataflow.org_v1alpha08_sonataflowbuild.yaml | 6 +
config/scorecard/patches/basic.config.yaml | 2 +-
config/scorecard/patches/olm.config.yaml | 8 +-
content_sets.yaml | 5 +-
docs/PRODUCTIZATION.md | 48 ++
hack/align-osl-config.sh | 51 ++
.../org.kie.kogito.osl.builder.prod/module.yaml | 2 +-
.../org.kie.kogito.osl.bundleinstall/module.yaml | 14 +
operator.yaml | 27 +-
osl-bundle-prod.yaml | 70 +++
osl-image-prod.yaml | 9 +-
47 files changed, 1771 insertions(+), 153 deletions(-)
diff --git a/Makefile b/Makefile
index 10dcd876..be120ee1 100644
--- a/Makefile
+++ b/Makefile
@@ -321,6 +321,9 @@ bump-version:
install-operator-sdk:
./hack/ci/install-operator-sdk.sh
+align-osl-config:
+ ./hack/align-osl-config.sh
+
.PHONY: addheaders
addheaders:
./hack/addheaders.sh
diff --git a/Makefile b/Makefile.osl
similarity index 83%
copy from Makefile
copy to Makefile.osl
index 10dcd876..868bebe2 100644
--- a/Makefile
+++ b/Makefile.osl
@@ -3,8 +3,7 @@
# To re-generate a bundle for another specific version without changing the
standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export
VERSION=0.0.2)
-VERSION ?= 2.0.0-snapshot
-REDUCED_VERSION ?= latest
+VERSION ?= 1.30.0
# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g
CHANNELS = "candidate,fast,stable")
@@ -30,16 +29,14 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS)
$(BUNDLE_DEFAULT_CHANNEL)
#
# For example, running 'make bundle-build bundle-push catalog-build
catalog-push' will build and push both
# kiegroup.org/kogito-serverless-operator-bundle:$VERSION and
kiegroup.org/kogito-serverless-operator-catalog:$VERSION.
-IMAGE_TAG_BASE ?= quay.io/kiegroup/kogito-serverless-operator-nightly
+IMAGE_TAG_BASE ?=
registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8
# BUNDLE_IMG defines the image:tag used for the bundle.
# You can use it as an arg. (E.g make bundle-build
BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
-BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(REDUCED_VERSION)
+BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)
# BUNDLE_GEN_FLAGS are the flags passed to the operator-sdk generate bundle
command
-# TODO: review this flag once we upgrade
https://github.com/operator-framework/operator-sdk/issues/4992
(https://issues.redhat.com/browse/KOGITO-9428)
-# TODO: It is preventing us from adding new annotations to
bundle/metadata/annotations.yaml
-BUNDLE_GEN_FLAGS ?= -q --overwrite=false --version $(VERSION)
$(BUNDLE_METADATA_OPTS)
+BUNDLE_GEN_FLAGS ?= -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
# Container runtime engine used for building the images
BUILDER ?= podman
@@ -48,12 +45,15 @@ BUILDER ?= podman
# You can enable this value if you would like to use SHA Based Digests
# To enable set flag to true
USE_IMAGE_DIGESTS ?= false
+IMG_TAG_SEP = :
+IMG_VERSION = $(VERSION)
ifeq ($(USE_IMAGE_DIGESTS), true)
BUNDLE_GEN_FLAGS += --use-image-digests
+ IMG_TAG_SEP = @
+ IMG_VERSION = $(IMAGE_DIGEST)
endif
-# Image URL to use all building/pushing image targets
-IMG ?= $(IMAGE_TAG_BASE):$(REDUCED_VERSION)
+IMG ?= $(IMAGE_TAG_BASE)$(IMG_TAG_SEP)$(IMG_VERSION)
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be
downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.24
@@ -95,7 +95,7 @@ help: ## Display this help.
##@ Development
.PHONY: manifests
-manifests: generate ## Generate WebhookConfiguration, ClusterRole and
CustomResourceDefinition objects.
+manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and
CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role
crd:allowDangerousTypes=true webhook paths="./api/..."
paths="./controllers/..." output:crd:artifacts:config=config/crd/bases
.PHONY: generate
@@ -105,7 +105,6 @@ generate: controller-gen ## Generate code containing
DeepCopy, DeepCopyInto, and
.PHONY: fmt
fmt: ## Run go fmt against code.
./hack/goimports.sh
- go work sync
go mod tidy
go fmt ./...
@@ -114,38 +113,26 @@ vet: ## Run go vet against code.
go vet ./...
.PHONY: test
-test: manifests generate envtest vet fmt test-api ## Run tests.
+test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION)
--bin-dir $(LOCALBIN) -p path)" go test $(shell go list ./... | grep -v /test/)
-coverprofile cover.out
-.PHONY: test-api
-test-api:
- cd api && make test
-
-.PHONY: test-container-builder
-test-container-builder:
- cd container-builder && make test
-
-.PHONY: test-workflowproj
-test-workflowproj:
- cd workflowproj && make test
-
##@ Build
.PHONY: build
-build: generate ## Build manager binary.
+build: generate fmt vet ## Build manager binary.
go build -o bin/manager main.go
.PHONY: build-4-debug
-build-4-debug: generate ## Build manager binary with debug options.
+build-4-debug: generate fmt vet ## Build manager binary with debug options.
go build -gcflags="all=-N -l" -o bin/manager main.go
.PHONY: run
-run: manifests generate ## Run a controller from your host.
+run: manifests generate fmt vet ## Run a controller from your host.
go run ./main.go
.PHONY: debug
debug: build-4-debug ## Run a controller from your host from binary
- ./bin/manager -v=2
+ ./bin/manager
.PHONY: docker-build
docker-build: test ## Build docker image with the manager.
@@ -159,8 +146,7 @@ podman-build: test ## Build container image with the
manager.
docker-push: ## Push docker image with the manager.
docker push ${IMG}
-# This is currently done directly into the CI
-# PLATFORMS defines the target platforms for the manager image be build to
provide support to multiple
+# PLATFORMS defines the target platforms for the manager image be build to
provide support to multiple
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1).
To use this option you need to:
# - able to use docker buildx . More info:
https://docs.docker.com/build/buildx/
# - have enable BuildKit, More info:
https://docs.docker.com/develop/develop-images/build_enhancements/
@@ -181,12 +167,15 @@ docker-buildx: test ## Build and push docker image for
the manager for cross-pla
podman-push: ## Push container image with the manager.
podman push ${PODMAN_PUSH_PARAMS} ${IMG}
+CEKIT_FLAGS = --assume-yes
+ifeq ($(RELEASE), true)
+ CEKIT_FLAGS += --release
+endif
+
+
.PHONY: container-build
container-build: test ## Build the container image
- cekit -v --descriptor image.yaml build ${build_options} $(BUILDER)
-ifneq ($(ignore_tag),true)
- $(BUILDER) tag kogito-serverless-operator ${IMG}
-endif
+ cekit --redhat -v --descriptor osl-image-prod.yaml build osbs
$(CEKIT_FLAGS)
.PHONY: container-push
container-push: ## Push the container image
@@ -200,7 +189,7 @@ endif
.PHONY: install
install: manifests kustomize ## Install CRDs into the K8s cluster specified in
~/.kube/config.
- $(KUSTOMIZE) build config/crd | kubectl create -f -
+ $(KUSTOMIZE) build config/crd | kubectl apply -f -
.PHONY: uninstall
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster
specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource
not found errors during deletion.
@@ -208,17 +197,16 @@ uninstall: manifests kustomize ## Uninstall CRDs from the
K8s cluster specified
.PHONY: deploy
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified
in ~/.kube/config.
- cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
- $(KUSTOMIZE) build config/default | kubectl create -f -
+ cd config/manager/osl && $(KUSTOMIZE) edit set image controller=${IMG}
+ $(KUSTOMIZE) build config/default/osl | kubectl apply -f -
.PHONY: generate-deploy
generate-deploy: manifests kustomize ## Deploy controller to the K8s cluster
specified in ~/.kube/config.
- cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
- $(KUSTOMIZE) build config/default > operator.yaml
+ cd config/manager/osl && $(KUSTOMIZE) edit set image controller=${IMG}
.PHONY: undeploy
undeploy: ## Undeploy controller from the K8s cluster specified in
~/.kube/config. Call with ignore-not-found=true to ignore resource not found
errors during deletion.
- $(KUSTOMIZE) build config/default | kubectl delete
--ignore-not-found=$(ignore-not-found) -f -
+ $(KUSTOMIZE) build config/default/osl | kubectl delete
--ignore-not-found=$(ignore-not-found) -f -
##@ Build Dependencies
@@ -254,14 +242,14 @@ $(ENVTEST): $(LOCALBIN)
.PHONY: bundle
bundle: manifests kustomize install-operator-sdk ## Generate bundle manifests
and metadata, then validate generated files.
- operator-sdk generate kustomize manifests -q
- cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
- $(KUSTOMIZE) build config/manifests | operator-sdk generate bundle
$(BUNDLE_GEN_FLAGS)
- operator-sdk bundle validate ./bundle
+ operator-sdk generate kustomize manifests
--input-dir=./config/manifests/osl --output-dir=./config/manifests/osl
--package=logic-operator-rhel8 -q
+ cd config/manager/osl && $(KUSTOMIZE) edit set image controller=$(IMG)
+ $(KUSTOMIZE) build config/manifests/osl | operator-sdk generate bundle
$(BUNDLE_GEN_FLAGS) --package=logic-operator-rhel8 --output-dir=bundle.osl
+ operator-sdk bundle validate ./bundle.osl
.PHONY: bundle-build
bundle-build: ## Build the bundle image.
- $(BUILDER) build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
+ cekit --redhat -vvvv --descriptor osl-bundle-prod.yaml build osbs
$(CEKIT_FLAGS)
.PHONY: bundle-push
bundle-push: ## Push the bundle image.
@@ -326,11 +314,15 @@ addheaders:
./hack/addheaders.sh
.PHONY: generate-all
-generate-all: generate generate-deploy bundle addheaders vet fmt
+generate-all: generate generate-deploy bundle
.PHONY: test-e2e # You will need to have a Minikube/Kind cluster up in running
to run this target, and run container-builder before the test
test-e2e: install-operator-sdk
go test ./test/e2e/* -v -ginkgo.v
.PHONY: before-pr
-before-pr: test generate-all
\ No newline at end of file
+before-pr: addheaders test generate-all
+
+.PHONY: scorecard-tests
+scorecard-tests:
+ operator-sdk scorecard bundle.osl -o text --selector='test in
(basic-check-spec-test,olm-bundle-validation-test)'
\ No newline at end of file
diff --git a/README.md b/README.md
index da2266d7..4400a21a 100644
--- a/README.md
+++ b/README.md
@@ -52,3 +52,7 @@ Please see the module's [README file](workflowproj/README.md).
## Development and Contributions
Contributing is easy, just take a look at our
[contributors](docs/CONTRIBUTING.md)'guide.
+
+## Productization notes
+
+In order to productize the Red Hat OpenShift Serverless Logic Operator read
the notes into the [productization](docs/PRODUCTIZATION.md)'section.
diff --git a/api/v1alpha08/sonataflow_types.go
b/api/v1alpha08/sonataflow_types.go
index bb9ed32e..57076f69 100644
--- a/api/v1alpha08/sonataflow_types.go
+++ b/api/v1alpha08/sonataflow_types.go
@@ -109,24 +109,33 @@ type ConfigMapWorkflowResource struct {
}
// SonataFlowSpec defines the desired state of SonataFlow
+// +k8s:openapi-gen=true
type SonataFlowSpec struct {
+ // Flow the workflow definition.
// +kubebuilder:validation:Required
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="flow"
Flow Flow `json:"flow"`
// Resources workflow resources that are linked to this workflow
definition.
// For example, a collection of OpenAPI specification files.
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="resources"
Resources WorkflowResources `json:"resources,omitempty"`
}
// SonataFlowStatus defines the observed state of SonataFlow
+// +k8s:openapi-gen=true
type SonataFlowStatus struct {
api.Status `json:",inline"`
// Address is used as a part of Addressable interface
(status.address.url) for knative
// +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="address"
Address duckv1.Addressable `json:"address,omitempty"`
// keeps track of how many failure recovers a given workflow had so far
- RecoverFailureAttempts int
`json:"recoverFailureAttempts,omitempty"`
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="recoverFailureAttempts"
+ RecoverFailureAttempts int `json:"recoverFailureAttempts,omitempty"`
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="lastTimeRecoverAttempt"
LastTimeRecoverAttempt metav1.Time
`json:"lastTimeRecoverAttempt,omitempty"`
// Endpoint is an externally accessible URL of the workflow
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="endpoint"
Endpoint *apis.URL `json:"endpoint,omitempty"`
}
@@ -190,6 +199,11 @@ func (s *SonataFlowStatus) IsBuildFailed() bool {
// +kubebuilder:printcolumn:name="URL",type=string,JSONPath=`.status.endpoint`
//
+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=='Running')].status`
//
+kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=='Running')].reason`
+//
+operator-sdk:csv:customresourcedefinitions:resources={{SonataFlowBuild,sonataflow.org/v1alpha08,"A
SonataFlow Build"}}
+//
+operator-sdk:csv:customresourcedefinitions:resources={{Deployment,apps/v1,"A
Deployment for the Flow"}}
+// +operator-sdk:csv:customresourcedefinitions:resources={{Service,v1,"A
Service for the Flow"}}
+//
+operator-sdk:csv:customresourcedefinitions:resources={{Route,route.openshift.io/v1,"An
OpenShift Route for the Flow"}}
+// +operator-sdk:csv:customresourcedefinitions:resources={{ConfigMap,v1,"The
ConfigMaps with Flow definition and additional configuration files"}}
type SonataFlow struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
diff --git a/api/v1alpha08/sonataflowbuild_types.go
b/api/v1alpha08/sonataflowbuild_types.go
index ae41395c..60d9d0ec 100644
--- a/api/v1alpha08/sonataflowbuild_types.go
+++ b/api/v1alpha08/sonataflowbuild_types.go
@@ -45,41 +45,63 @@ const (
BuildPhaseError BuildPhase = "Error"
)
+// BuildTemplate an abstraction over the actual build process performed by the
platform.
+// +k8s:openapi-gen=true
type BuildTemplate struct {
// Timeout defines the Build maximum execution duration.
// The Build deadline is set to the Build start time plus the Timeout
duration.
// If the Build deadline is exceeded, the Build context is canceled,
// and its phase set to BuildPhaseFailed.
// +kubebuilder:validation:Format=duration
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Timeout"
Timeout metav1.Duration `json:"timeout,omitempty"`
// Resources optional compute resource requirements for the builder
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources"
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
// Arguments lists the command line arguments to send to the internal
builder command.
// Depending on the build method you might set this attribute instead
of BuildArgs.
// For example: ".spec.arguments=verbose=3".
// Please see the SonataFlow guides.
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Arguments"
Arguments []string `json:"arguments,omitempty"`
// Optional build arguments that can be set to the internal build (e.g.
Docker ARG)
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="BuildArgs"
BuildArgs []corev1.EnvVar `json:"buildArgs,omitempty"`
// Optional environment variables to add to the internal build
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Envs"
Envs []corev1.EnvVar `json:"envs,omitempty"`
}
-// SonataFlowBuildSpec an abstraction over the actual build process performed
by the platform.
+// SonataFlowBuildSpec define the desired state of th SonataFlowBuild.
+// +k8s:openapi-gen=true
type SonataFlowBuildSpec struct {
BuildTemplate `json:",inline"`
}
// SonataFlowBuildStatus defines the observed state of SonataFlowBuild
+// +k8s:openapi-gen=true
type SonataFlowBuildStatus struct {
- // The final image tag produced by this build instance
+ // ImageTag The final image tag produced by this build instance
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="ImageTag"
ImageTag string `json:"imageTag,omitempty"`
- // Current phase of the build
+ // BuildPhase Current phase of the build
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="BuildPhase"
BuildPhase BuildPhase `json:"buildPhase,omitempty"`
- // Last error found during build
+ // Error Last error found during build
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="Error"
Error string `json:"error,omitempty"`
// InnerBuild is a reference to an internal build object, which can be
anything known only to internal builders.
// +kubebuilder:pruning:PreserveUnknownFields
+ // +optional
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="InnerBuild"
InnerBuild runtime.RawExtension `json:"innerBuild,omitempty"
patchStrategy:"replace"`
}
@@ -109,9 +131,11 @@ func (k *SonataFlowBuildStatus) GetInnerBuild(innerBuild
interface{}) error {
// +kubebuilder:object:root=true
// +kubebuilder:object:generate=true
// +kubebuilder:subresource:status
+// +k8s:openapi-gen=true
//
+kubebuilder:printcolumn:name="Image",type=string,JSONPath=`.status.imageTag`
//
+kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.buildPhase`
// +kubebuilder:resource:shortName={"sfb", "sfbuild", "sfbuilds"}
+//
+operator-sdk:csv:customresourcedefinitions:resources={{BuildConfig,build.openshift.io/v1,"An
Openshift Build Config"}}
type SonataFlowBuild struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
diff --git a/api/v1alpha08/sonataflowplatform_types.go
b/api/v1alpha08/sonataflowplatform_types.go
index c79172a8..3597b3fa 100644
--- a/api/v1alpha08/sonataflowplatform_types.go
+++ b/api/v1alpha08/sonataflowplatform_types.go
@@ -26,10 +26,15 @@ const (
)
// SonataFlowPlatformSpec defines the desired state of SonataFlowPlatform
+// +k8s:openapi-gen=true
type SonataFlowPlatformSpec struct {
- // Attributes for building workflows in the target platform
+ // Build Attributes for building workflows in the target platform
+ // +optional
+ //
+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Build"
Build BuildPlatformSpec `json:"build,omitempty"`
- // Attributes for running workflows in devmode (immutable, no build
required)
+ // DevMode Attributes for running workflows in devmode (immutable, no
build required)
+ // +optional
+ //
+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="DevMode"
DevMode DevModePlatformSpec `json:"devMode,omitempty"`
}
@@ -52,13 +57,17 @@ const (
)
// SonataFlowPlatformStatus defines the observed state of SonataFlowPlatform
+// +k8s:openapi-gen=true
type SonataFlowPlatformStatus struct {
api.Status `json:",inline"`
// Cluster what kind of cluster you're running (ie, plain Kubernetes or
OpenShift)
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="cluster"
Cluster PlatformCluster `json:"cluster,omitempty"`
// Version the operator version controlling this Platform
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="version"
Version string `json:"version,omitempty"`
// Info generic information related to the build
+
//+operator-sdk:csv:customresourcedefinitions:type=status,displayName="info"
Info map[string]string `json:"info,omitempty"`
}
@@ -107,6 +116,7 @@ func (in *SonataFlowPlatformStatus) IsFailure() bool {
//
+kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=`.status.cluster`
//
+kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=='Succeed')].status`
//
+kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.conditions[?(@.type=='Succeed')].reason`
+// +operator-sdk:csv:customresourcedefinitions:resources={{Namespace,v1,"The
Namespace controlled by the platform"}}
type SonataFlowPlatform struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
diff --git a/bundle.Dockerfile b/bundle.Dockerfile
index 4cbe45a0..774a790c 100644
--- a/bundle.Dockerfile
+++ b/bundle.Dockerfile
@@ -4,12 +4,11 @@ FROM scratch
LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1
LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
-LABEL operators.operatorframework.io.bundle.package.v1=sonataflow-operator
+LABEL operators.operatorframework.io.bundle.package.v1=logic-operator-rhel8
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.25.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL
operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3
-LABEL com.redhat.openshift.versions=v4.11
# Labels for testing.
LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
diff --git
a/bundle.osl/manifests/logic-operator-rhel8-builder-config_v1_configmap.yaml
b/bundle.osl/manifests/logic-operator-rhel8-builder-config_v1_configmap.yaml
new file mode 100644
index 00000000..1d188824
--- /dev/null
+++ b/bundle.osl/manifests/logic-operator-rhel8-builder-config_v1_configmap.yaml
@@ -0,0 +1,22 @@
+apiVersion: v1
+data:
+ DEFAULT_BUILDER_RESOURCE_NAME: Dockerfile
+ DEFAULT_WORKFLOW_EXTENSION: .sw.json
+ Dockerfile: "FROM
registry.redhat.io/openshift-serverless-1-tech-preview/logic-swf-builder-rhel8:latest
+ AS builder\n\n# variables that can be overridden by the builder\n# To add
a Quarkus
+ extension to your application\nARG QUARKUS_EXTENSIONS\n# Args to pass to
the Quarkus
+ CLI add extension command\nARG QUARKUS_ADD_EXTENSION_ARGS\n \n# Copy from
build
+ context to skeleton resources project\nCOPY --chmod=644 *
./resources/\n\nRUN
+ /home/kogito/launch/build-app.sh ./resources\n
\n#=============================\n#
+ Runtime Run\n#=============================\nFROM
registry.access.redhat.com/ubi8/openjdk-11:latest\n\nENV
+ LANG='en_US.UTF-8' LANGUAGE='en_US:en'\n \n# We make four distinct layers
so
+ if there are application changes the library layers can be re-used\nCOPY
--from=builder
+ --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/lib/
/deployments/lib/\nCOPY
+ --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/*.jar
+ /deployments/\nCOPY --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/app/
+ /deployments/app/\nCOPY --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/quarkus/
+ /deployments/quarkus/\n\nEXPOSE 8080\nUSER 185\nENV
AB_JOLOKIA_OFF=\"\"\nENV JAVA_OPTS=\"-Dquarkus.http.host=0.0.0.0
+ -Djava.util.logging.manager=org.jboss.logmanager.LogManager\"\nENV
JAVA_APP_JAR=\"/deployments/quarkus-run.jar\"\n"
+kind: ConfigMap
+metadata:
+ name: logic-operator-rhel8-builder-config
diff --git
a/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml
b/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml
new file mode 100644
index 00000000..43c03ea7
--- /dev/null
+++
b/bundle.osl/manifests/logic-operator-rhel8-controller-manager-metrics-service_v1_service.yaml
@@ -0,0 +1,17 @@
+apiVersion: v1
+kind: Service
+metadata:
+ creationTimestamp: null
+ labels:
+ control-plane: controller-manager
+ name: logic-operator-rhel8-controller-manager-metrics-service
+spec:
+ ports:
+ - name: https
+ port: 8443
+ protocol: TCP
+ targetPort: https
+ selector:
+ control-plane: controller-manager
+status:
+ loadBalancer: {}
diff --git
a/bundle.osl/manifests/logic-operator-rhel8-manager-config_v1_configmap.yaml
b/bundle.osl/manifests/logic-operator-rhel8-manager-config_v1_configmap.yaml
new file mode 100644
index 00000000..78bb9c63
--- /dev/null
+++ b/bundle.osl/manifests/logic-operator-rhel8-manager-config_v1_configmap.yaml
@@ -0,0 +1,17 @@
+apiVersion: v1
+data:
+ controller_manager_config.yaml: |
+ apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
+ kind: ControllerManagerConfig
+ health:
+ healthProbeBindAddress: :8081
+ metrics:
+ bindAddress: 127.0.0.1:8080
+ webhook:
+ port: 9443
+ leaderElection:
+ leaderElect: true
+ resourceName: 1be5e57d.kiegroup.org
+kind: ConfigMap
+metadata:
+ name: logic-operator-rhel8-manager-config
diff --git
a/bundle.osl/manifests/logic-operator-rhel8-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml
b/bundle.osl/manifests/logic-operator-rhel8-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml
new file mode 100644
index 00000000..8ef65bf8
--- /dev/null
+++
b/bundle.osl/manifests/logic-operator-rhel8-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml
@@ -0,0 +1,10 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ creationTimestamp: null
+ name: logic-operator-rhel8-metrics-reader
+rules:
+- nonResourceURLs:
+ - /metrics
+ verbs:
+ - get
diff --git
a/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml
b/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml
new file mode 100644
index 00000000..b12ee227
--- /dev/null
+++ b/bundle.osl/manifests/logic-operator-rhel8.clusterserviceversion.yaml
@@ -0,0 +1,654 @@
+apiVersion: operators.coreos.com/v1alpha1
+kind: ClusterServiceVersion
+metadata:
+ annotations:
+ alm-examples: |-
+ [
+ {
+ "apiVersion": "sonataflow.org/v1alpha08",
+ "kind": "SonataFlow",
+ "metadata": {
+ "annotations": {
+ "sonataflow.org/description": "Greeting example on k8s!",
+ "sonataflow.org/version": "0.0.1"
+ },
+ "name": "greeting"
+ },
+ "spec": {
+ "flow": {
+ "functions": [
+ {
+ "name": "greetFunction",
+ "operation": "sysout",
+ "type": "custom"
+ }
+ ],
+ "start": "ChooseOnLanguage",
+ "states": [
+ {
+ "dataConditions": [
+ {
+ "condition": "${ .language == \"English\" }",
+ "transition": "GreetInEnglish"
+ },
+ {
+ "condition": "${ .language == \"Spanish\" }",
+ "transition": "GreetInSpanish"
+ }
+ ],
+ "defaultCondition": "GreetInEnglish",
+ "name": "ChooseOnLanguage",
+ "type": "switch"
+ },
+ {
+ "data": {
+ "greeting": "Hello from JSON Workflow, "
+ },
+ "name": "GreetInEnglish",
+ "transition": "GreetPerson",
+ "type": "inject"
+ },
+ {
+ "data": {
+ "greeting": "Saludos desde JSON Workflow, "
+ },
+ "name": "GreetInSpanish",
+ "transition": "GreetPerson",
+ "type": "inject"
+ },
+ {
+ "actions": [
+ {
+ "functionRef": {
+ "arguments": {
+ "message": ".greeting+.name"
+ },
+ "refName": "greetFunction"
+ },
+ "name": "greetAction"
+ }
+ ],
+ "end": true,
+ "name": "GreetPerson",
+ "type": "operation"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "apiVersion": "sonataflow.org/v1alpha08",
+ "kind": "SonataFlowBuild",
+ "metadata": {
+ "name": "greeting"
+ },
+ "spec": {
+ "timeout": "360s"
+ }
+ },
+ {
+ "apiVersion": "sonataflow.org/v1alpha08",
+ "kind": "SonataFlowPlatform",
+ "metadata": {
+ "name": "sonataflow-platform"
+ },
+ "spec": {
+ "build": {
+ "config": {
+ "registry": {
+ "address": "quay.io/kiegroup",
+ "secret": "regcred"
+ }
+ }
+ }
+ }
+ }
+ ]
+ capabilities: Basic Install
+ categories: Application Runtime
+ description: OpenShift Serverless Logic Kubernetes Operator for deploying
workflow applications based on the CNCF Serverless Workflow specification
+ operators.openshift.io/valid-subscription: '["OpenShift Container
Platform", "OpenShift Platform Plus"]'
+ operators.operatorframework.io/builder: operator-sdk-v1.25.0
+ operators.operatorframework.io/internal-objects:
'["sonataflowbuilds.sonataflow.org"]'
+ operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
+ repository: https://github.com/kiegroup/kogito-serverless-operator
+ support: Red Hat
+ name: logic-operator-rhel8.v1.30.0
+ namespace: placeholder
+spec:
+ apiservicedefinitions: {}
+ customresourcedefinitions:
+ owned:
+ - description: SonataFlowBuild is an internal custom resource to control
workflow build instances in the target platform
+ displayName: Sonata Flow Build
+ kind: SonataFlowBuild
+ name: sonataflowbuilds.sonataflow.org
+ resources:
+ - kind: BuildConfig
+ name: An Openshift Build Config
+ version: build.openshift.io/v1
+ specDescriptors:
+ - description: 'Arguments lists the command line arguments to send
to the internal builder command. Depending on the build method you might set
this attribute instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see the SonataFlow guides.'
+ displayName: Arguments
+ path: arguments
+ - description: Optional build arguments that can be set to the
internal build (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: envs
+ - description: Resources optional compute resource requirements for
the builder
+ displayName: Resources
+ path: resources
+ - description: Timeout defines the Build maximum execution duration.
The Build deadline is set to the Build start time plus the Timeout duration. If
the Build deadline is exceeded, the Build context is canceled, and its phase
set to BuildPhaseFailed.
+ displayName: Timeout
+ path: timeout
+ statusDescriptors:
+ - description: BuildPhase Current phase of the build
+ displayName: BuildPhase
+ path: buildPhase
+ - description: Error Last error found during build
+ displayName: Error
+ path: error
+ - description: ImageTag The final image tag produced by this build
instance
+ displayName: ImageTag
+ path: imageTag
+ - description: InnerBuild is a reference to an internal build
object, which can be anything known only to internal builders.
+ displayName: InnerBuild
+ path: innerBuild
+ version: v1alpha08
+ - description: SonataFlowPlatform is the descriptor for the workflow
platform infrastructure.
+ displayName: Sonata Flow Platform
+ kind: SonataFlowPlatform
+ name: sonataflowplatforms.sonataflow.org
+ resources:
+ - kind: Namespace
+ name: The Namespace controlled by the platform
+ version: v1
+ specDescriptors:
+ - description: Build Attributes for building workflows in the target
platform
+ displayName: Build
+ path: build
+ - description: 'Arguments lists the command line arguments to send
to the internal builder command. Depending on the build method you might set
this attribute instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see the SonataFlow guides.'
+ displayName: Arguments
+ path: build.template.arguments
+ - description: Optional build arguments that can be set to the
internal build (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: build.template.buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: build.template.envs
+ - description: Resources optional compute resource requirements for
the builder
+ displayName: Resources
+ path: build.template.resources
+ - description: Timeout defines the Build maximum execution duration.
The Build deadline is set to the Build start time plus the Timeout duration. If
the Build deadline is exceeded, the Build context is canceled, and its phase
set to BuildPhaseFailed.
+ displayName: Timeout
+ path: build.template.timeout
+ - description: DevMode Attributes for running workflows in devmode
(immutable, no build required)
+ displayName: DevMode
+ path: devMode
+ statusDescriptors:
+ - description: Cluster what kind of cluster you're running (ie,
plain Kubernetes or OpenShift)
+ displayName: cluster
+ path: cluster
+ - description: Info generic information related to the build
+ displayName: info
+ path: info
+ - description: Version the operator version controlling this Platform
+ displayName: version
+ path: version
+ version: v1alpha08
+ - description: SonataFlow is the descriptor representation for a
workflow application based on the CNCF Serverless Workflow specification.
+ displayName: Sonata Flow
+ kind: SonataFlow
+ name: sonataflows.sonataflow.org
+ resources:
+ - kind: Deployment
+ name: A Deployment for the Flow
+ version: apps/v1
+ - kind: Service
+ name: A Service for the Flow
+ version: v1
+ - kind: SonataFlowBuild
+ name: A SonataFlow Build
+ version: sonataflow.org/v1alpha08
+ - kind: Route
+ name: An OpenShift Route for the Flow
+ version: route.openshift.io/v1
+ - kind: ConfigMap
+ name: The ConfigMaps with Flow definition and additional
configuration files
+ version: v1
+ specDescriptors:
+ - description: Flow the workflow definition.
+ displayName: flow
+ path: flow
+ - description: Resources workflow resources that are linked to this
workflow definition. For example, a collection of OpenAPI specification files.
+ displayName: resources
+ path: resources
+ statusDescriptors:
+ - description: Address is used as a part of Addressable interface
(status.address.url) for knative
+ displayName: address
+ path: address
+ - description: Endpoint is an externally accessible URL of the
workflow
+ displayName: endpoint
+ path: endpoint
+ - displayName: lastTimeRecoverAttempt
+ path: lastTimeRecoverAttempt
+ - description: keeps track of how many failure recovers a given
workflow had so far
+ displayName: recoverFailureAttempts
+ path: recoverFailureAttempts
+ version: v1alpha08
+ description: |-
+ OpenShift Serverless Logic Kubernetes Operator for deploying workflow
applications
+ based on the [CNCF Serverless Workflow
specification](https://serverlessworkflow.io/):
+
+ * Deploy workflow applications using the [dev
profile](https://sonataflow.org/serverlessworkflow/latest/cloud/operator/developing-workflows.html),
suited for the your development cycle
+ * Build workflow applications based on the platform you're currently
working on.
+ displayName: SonataFlow Operator
+ install:
+ spec:
+ clusterPermissions:
+ - rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ - pods
+ - pods/exec
+ - services
+ - services/finalizers
+ - namespaces
+ - serviceaccounts
+ - persistentvolumeclaims
+ - secrets
+ - events
+ - deployments
+ - nodes
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - apps
+ resources:
+ - configmaps
+ - pods
+ - pods/exec
+ - services
+ - services/finalizers
+ - namespaces
+ - serviceaccounts
+ - persistentvolumeclaims
+ - secrets
+ - events
+ - deployments
+ - nodes
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - rbac.authorization.k8s.io
+ resources:
+ - roles
+ - rolebindings
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - coordination.k8s.io
+ resources:
+ - leases
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflowbuilds
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflowbuilds/finalizers
+ verbs:
+ - update
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflowbuilds/status
+ verbs:
+ - get
+ - patch
+ - update
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflowplatforms
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflowplatforms/finalizers
+ verbs:
+ - update
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflowplatforms/status
+ verbs:
+ - get
+ - patch
+ - update
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflows
+ verbs:
+ - create
+ - delete
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflows/finalizers
+ verbs:
+ - update
+ - apiGroups:
+ - sonataflow.org
+ resources:
+ - sonataflows/status
+ verbs:
+ - get
+ - patch
+ - update
+ - apiGroups:
+ - route.openshift.io
+ resources:
+ - route
+ - routes
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - route.openshift.io
+ resources:
+ - route/finalizers
+ - routes/finalizers
+ verbs:
+ - get
+ - list
+ - create
+ - update
+ - delete
+ - deletecollection
+ - patch
+ - watch
+ - apiGroups:
+ - image.openshift.io
+ resources:
+ - imagestreams
+ - imagestreamtags
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - image.openshift.io
+ resources:
+ - imagestreams/finalizers
+ - imagestreamtags/finalizers
+ verbs:
+ - get
+ - list
+ - create
+ - update
+ - delete
+ - deletecollection
+ - patch
+ - watch
+ - apiGroups:
+ - build.openshift.io
+ resources:
+ - buildconfigs
+ - builds
+ verbs:
+ - create
+ - delete
+ - deletecollection
+ - get
+ - list
+ - patch
+ - update
+ - watch
+ - apiGroups:
+ - build.openshift.io
+ resources:
+ - buildconfigs/finalizers
+ - builds/finalizers
+ verbs:
+ - get
+ - list
+ - create
+ - update
+ - delete
+ - deletecollection
+ - patch
+ - watch
+ - apiGroups:
+ - build.openshift.io
+ resources:
+ - buildconfigs/instantiatebinary
+ verbs:
+ - create
+ - apiGroups:
+ - authentication.k8s.io
+ resources:
+ - tokenreviews
+ verbs:
+ - create
+ - apiGroups:
+ - authorization.k8s.io
+ resources:
+ - subjectaccessreviews
+ verbs:
+ - create
+ serviceAccountName: logic-operator-rhel8-controller-manager
+ deployments:
+ - label:
+ control-plane: controller-manager
+ name: logic-operator-rhel8-controller-manager
+ spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ control-plane: controller-manager
+ strategy: {}
+ template:
+ metadata:
+ annotations:
+ kubectl.kubernetes.io/default-container: manager
+ labels:
+ control-plane: controller-manager
+ spec:
+ containers:
+ - args:
+ - --secure-listen-address=0.0.0.0:8443
+ - --upstream=http://127.0.0.1:8080/
+ - --logtostderr=true
+ - --v=0
+ image:
registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:4564ca3dc5bac80d6faddaf94c817fbbc270698a9399d8a21ee1005d85ceda56
+ name: kube-rbac-proxy
+ ports:
+ - containerPort: 8443
+ name: https
+ protocol: TCP
+ resources:
+ limits:
+ cpu: 500m
+ memory: 128Mi
+ requests:
+ cpu: 5m
+ memory: 64Mi
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ - args:
+ - --health-probe-bind-address=:8081
+ - --metrics-bind-address=127.0.0.1:8080
+ - --leader-elect
+ command:
+ - /usr/local/bin/manager
+ env:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ image:
registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8@sha256:24c2e62bff1f2f7e5579b990e44206ac019bd00f5ca546b069471fc1af34ed75
+ livenessProbe:
+ httpGet:
+ path: /healthz
+ port: 8081
+ initialDelaySeconds: 15
+ periodSeconds: 20
+ name: manager
+ readinessProbe:
+ httpGet:
+ path: /readyz
+ port: 8081
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ resources:
+ limits:
+ cpu: 500m
+ memory: 128Mi
+ requests:
+ cpu: 10m
+ memory: 64Mi
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ securityContext:
+ runAsNonRoot: true
+ serviceAccountName: logic-operator-rhel8-controller-manager
+ terminationGracePeriodSeconds: 10
+ permissions:
+ - rules:
+ - apiGroups:
+ - ""
+ resources:
+ - configmaps
+ verbs:
+ - get
+ - list
+ - watch
+ - create
+ - update
+ - patch
+ - delete
+ - apiGroups:
+ - coordination.k8s.io
+ resources:
+ - leases
+ verbs:
+ - get
+ - list
+ - watch
+ - create
+ - update
+ - patch
+ - delete
+ - apiGroups:
+ - ""
+ resources:
+ - events
+ verbs:
+ - create
+ - patch
+ serviceAccountName: logic-operator-rhel8-controller-manager
+ strategy: deployment
+ installModes:
+ - supported: false
+ type: OwnNamespace
+ - supported: false
+ type: SingleNamespace
+ - supported: false
+ type: MultiNamespace
+ - supported: true
+ type: AllNamespaces
+ keywords:
+ - sonataflow
+ - cncf
+ - serverless
+ - serverlessworkflow
+ links:
+ - name: Product Page
+ url: https://sonataflow.org/serverlessworkflow/latest/index.html
+ maintainers:
+ - email: [email protected]
+ name: Red Hat
+ maturity: alpha
+ minKubeVersion: 1.23.0
+ provider:
+ name: Red Hat
+ relatedImages:
+ - image:
registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8@sha256:24c2e62bff1f2f7e5579b990e44206ac019bd00f5ca546b069471fc1af34ed75
+ name: manager
+ - image:
registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:4564ca3dc5bac80d6faddaf94c817fbbc270698a9399d8a21ee1005d85ceda56
+ name: kube-rbac-proxy
+ version: 1.30.0
diff --git a/bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
b/bundle.osl/manifests/sonataflow.org_sonataflowbuilds.yaml
similarity index 98%
copy from bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
copy to bundle.osl/manifests/sonataflow.org_sonataflowbuilds.yaml
index 0f268ba1..ba0a8769 100644
--- a/bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
+++ b/bundle.osl/manifests/sonataflow.org_sonataflowbuilds.yaml
@@ -44,8 +44,7 @@ spec:
metadata:
type: object
spec:
- description: SonataFlowBuildSpec an abstraction over the actual
build
- process performed by the platform.
+ description: SonataFlowBuildSpec define the desired state of th
SonataFlowBuild.
properties:
arguments:
description: 'Arguments lists the command line arguments to
send to
@@ -336,13 +335,13 @@ spec:
description: SonataFlowBuildStatus defines the observed state of
SonataFlowBuild
properties:
buildPhase:
- description: Current phase of the build
+ description: BuildPhase Current phase of the build
type: string
error:
- description: Last error found during build
+ description: Error Last error found during build
type: string
imageTag:
- description: The final image tag produced by this build
instance
+ description: ImageTag The final image tag produced by this
build instance
type: string
innerBuild:
description: InnerBuild is a reference to an internal build
object,
diff --git a/bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
b/bundle.osl/manifests/sonataflow.org_sonataflowplatforms.yaml
similarity index 99%
copy from bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
copy to bundle.osl/manifests/sonataflow.org_sonataflowplatforms.yaml
index 4bea2cd0..08519ef7 100644
--- a/bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
+++ b/bundle.osl/manifests/sonataflow.org_sonataflowplatforms.yaml
@@ -50,7 +50,8 @@ spec:
description: SonataFlowPlatformSpec defines the desired state of
SonataFlowPlatform
properties:
build:
- description: Attributes for building workflows in the target
platform
+ description: Build Attributes for building workflows in the
target
+ platform
properties:
config:
description: Describes the platform configuration for
building
@@ -411,7 +412,7 @@ spec:
type: object
type: object
devMode:
- description: Attributes for running workflows in devmode
(immutable,
+ description: DevMode Attributes for running workflows in
devmode (immutable,
no build required)
properties:
baseImage:
diff --git a/bundle/manifests/sonataflow.org_sonataflows.yaml
b/bundle.osl/manifests/sonataflow.org_sonataflows.yaml
similarity index 99%
copy from bundle/manifests/sonataflow.org_sonataflows.yaml
copy to bundle.osl/manifests/sonataflow.org_sonataflows.yaml
index 1fd78fd1..4d708ac8 100644
--- a/bundle/manifests/sonataflow.org_sonataflows.yaml
+++ b/bundle.osl/manifests/sonataflow.org_sonataflows.yaml
@@ -56,16 +56,7 @@ spec:
description: SonataFlowSpec defines the desired state of SonataFlow
properties:
flow:
- description: "Flow describes the contents of the Workflow
definition
- following the CNCF Serverless Workflow Specification. The
attributes
- not part of the flow are defined by the Custom Resource
metadata
- information, as follows: \n - Id, name, and key are replaced
by
- the Custom Resource's name. Must follow the Kubernetes
naming patterns
- (RFC1123). \n - Description can be added in the CR's
annotation
- field sonataflow.org/description \n - Version is also
defined in
- the CR's annotation, field sonataflow.org/version \n -
SpecVersion
- is in the CR's apiVersion, for example v1alpha08 means that
it follows
- the specification version 0.8."
+ description: Flow the workflow definition.
properties:
annotations:
description: Annotations List of helpful terms describing
the
diff --git a/bundle.osl/metadata/annotations.yaml
b/bundle.osl/metadata/annotations.yaml
new file mode 100644
index 00000000..03ff7a27
--- /dev/null
+++ b/bundle.osl/metadata/annotations.yaml
@@ -0,0 +1,14 @@
+annotations:
+ # Core bundle annotations.
+ operators.operatorframework.io.bundle.mediatype.v1: registry+v1
+ operators.operatorframework.io.bundle.manifests.v1: manifests/
+ operators.operatorframework.io.bundle.metadata.v1: metadata/
+ operators.operatorframework.io.bundle.package.v1: logic-operator-rhel8
+ operators.operatorframework.io.bundle.channels.v1: alpha
+ operators.operatorframework.io.metrics.builder: operator-sdk-v1.25.0
+ operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
+ operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v3
+
+ # Annotations for testing.
+ operators.operatorframework.io.test.mediatype.v1: scorecard+v1
+ operators.operatorframework.io.test.config.v1: tests/scorecard/
diff --git a/bundle/tests/scorecard/config.yaml
b/bundle.osl/tests/scorecard/config.yaml
similarity index 81%
copy from bundle/tests/scorecard/config.yaml
copy to bundle.osl/tests/scorecard/config.yaml
index 760c2d98..b12b9e6a 100644
--- a/bundle/tests/scorecard/config.yaml
+++ b/bundle.osl/tests/scorecard/config.yaml
@@ -8,7 +8,7 @@ stages:
- entrypoint:
- scorecard-test
- basic-check-spec
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: basic
test: basic-check-spec-test
@@ -18,7 +18,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-bundle-validation
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-bundle-validation-test
@@ -28,7 +28,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-crds-have-validation
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-crds-have-validation-test
@@ -48,7 +48,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-spec-descriptors
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-spec-descriptors-test
@@ -58,7 +58,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-status-descriptors
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-status-descriptors-test
diff --git a/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml
b/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml
index 2fc42f02..762a5598 100644
--- a/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml
+++ b/bundle/manifests/sonataflow-operator.clusterserviceversion.yaml
@@ -76,6 +76,16 @@ metadata:
}
}
},
+ {
+ "apiVersion": "sonataflow.org/v1alpha08",
+ "kind": "SonataFlowBuild",
+ "metadata": {
+ "name": "greeting"
+ },
+ "spec": {
+ "timeout": "360s"
+ }
+ },
{
"apiVersion": "sonataflow.org/v1alpha08",
"kind": "SonataFlowPlatform",
@@ -100,6 +110,7 @@ metadata:
description: SonataFlow Kubernetes Operator for deploying workflow
applications
based on the CNCF Serverless Workflow specification
operators.operatorframework.io/builder: operator-sdk-v1.25.0
+ operators.operatorframework.io/internal-objects:
'["sonataflowbuilds.sonataflow.org"]'
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/kiegroup/kogito-serverless-operator
support: Red Hat
@@ -114,18 +125,142 @@ spec:
displayName: Sonata Flow Build
kind: SonataFlowBuild
name: sonataflowbuilds.sonataflow.org
+ resources:
+ - kind: BuildConfig
+ name: An Openshift Build Config
+ version: build.openshift.io/v1
+ specDescriptors:
+ - description: 'Arguments lists the command line arguments to send to
the internal
+ builder command. Depending on the build method you might set this
attribute
+ instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see
+ the SonataFlow guides.'
+ displayName: Arguments
+ path: arguments
+ - description: Optional build arguments that can be set to the internal
build
+ (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: envs
+ - description: Resources optional compute resource requirements for the
builder
+ displayName: Resources
+ path: resources
+ - description: Timeout defines the Build maximum execution duration. The
Build
+ deadline is set to the Build start time plus the Timeout duration.
If the
+ Build deadline is exceeded, the Build context is canceled, and its
phase
+ set to BuildPhaseFailed.
+ displayName: Timeout
+ path: timeout
+ statusDescriptors:
+ - description: BuildPhase Current phase of the build
+ displayName: BuildPhase
+ path: buildPhase
+ - description: Error Last error found during build
+ displayName: Error
+ path: error
+ - description: ImageTag The final image tag produced by this build
instance
+ displayName: ImageTag
+ path: imageTag
+ - description: InnerBuild is a reference to an internal build object,
which
+ can be anything known only to internal builders.
+ displayName: InnerBuild
+ path: innerBuild
version: v1alpha08
- description: SonataFlowPlatform is the descriptor for the workflow
platform
infrastructure.
displayName: Sonata Flow Platform
kind: SonataFlowPlatform
name: sonataflowplatforms.sonataflow.org
+ resources:
+ - kind: Namespace
+ name: The Namespace controlled by the platform
+ version: v1
+ specDescriptors:
+ - description: Build Attributes for building workflows in the target
platform
+ displayName: Build
+ path: build
+ - description: 'Arguments lists the command line arguments to send to
the internal
+ builder command. Depending on the build method you might set this
attribute
+ instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see
+ the SonataFlow guides.'
+ displayName: Arguments
+ path: build.template.arguments
+ - description: Optional build arguments that can be set to the internal
build
+ (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: build.template.buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: build.template.envs
+ - description: Resources optional compute resource requirements for the
builder
+ displayName: Resources
+ path: build.template.resources
+ - description: Timeout defines the Build maximum execution duration. The
Build
+ deadline is set to the Build start time plus the Timeout duration.
If the
+ Build deadline is exceeded, the Build context is canceled, and its
phase
+ set to BuildPhaseFailed.
+ displayName: Timeout
+ path: build.template.timeout
+ - description: DevMode Attributes for running workflows in devmode
(immutable,
+ no build required)
+ displayName: DevMode
+ path: devMode
+ statusDescriptors:
+ - description: Cluster what kind of cluster you're running (ie, plain
Kubernetes
+ or OpenShift)
+ displayName: cluster
+ path: cluster
+ - description: Info generic information related to the build
+ displayName: info
+ path: info
+ - description: Version the operator version controlling this Platform
+ displayName: version
+ path: version
version: v1alpha08
- description: SonataFlow is the descriptor representation for a workflow
application
based on the CNCF Serverless Workflow specification.
displayName: Sonata Flow
kind: SonataFlow
name: sonataflows.sonataflow.org
+ resources:
+ - kind: Deployment
+ name: A Deployment for the Flow
+ version: apps/v1
+ - kind: Service
+ name: A Service for the Flow
+ version: v1
+ - kind: SonataFlowBuild
+ name: A SonataFlow Build
+ version: sonataflow.org/v1alpha08
+ - kind: Route
+ name: An OpenShift Route for the Flow
+ version: route.openshift.io/v1
+ - kind: ConfigMap
+ name: The ConfigMaps with Flow definition and additional configuration
files
+ version: v1
+ specDescriptors:
+ - description: Flow the workflow definition.
+ displayName: flow
+ path: flow
+ - description: Resources workflow resources that are linked to this
workflow
+ definition. For example, a collection of OpenAPI specification files.
+ displayName: resources
+ path: resources
+ statusDescriptors:
+ - description: Address is used as a part of Addressable interface
(status.address.url)
+ for knative
+ displayName: address
+ path: address
+ - description: Endpoint is an externally accessible URL of the workflow
+ displayName: endpoint
+ path: endpoint
+ - displayName: lastTimeRecoverAttempt
+ path: lastTimeRecoverAttempt
+ - description: keeps track of how many failure recovers a given workflow
had
+ so far
+ displayName: recoverFailureAttempts
+ path: recoverFailureAttempts
version: v1alpha08
description: |-
SonataFlow Kubernetes Operator for deploying workflow applications
@@ -477,8 +612,6 @@ spec:
- ALL
securityContext:
runAsNonRoot: true
- seccompProfile:
- type: RuntimeDefault
serviceAccountName: sonataflow-operator-controller-manager
terminationGracePeriodSeconds: 10
permissions:
diff --git a/bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
b/bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
index 0f268ba1..ba0a8769 100644
--- a/bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
+++ b/bundle/manifests/sonataflow.org_sonataflowbuilds.yaml
@@ -44,8 +44,7 @@ spec:
metadata:
type: object
spec:
- description: SonataFlowBuildSpec an abstraction over the actual
build
- process performed by the platform.
+ description: SonataFlowBuildSpec define the desired state of th
SonataFlowBuild.
properties:
arguments:
description: 'Arguments lists the command line arguments to
send to
@@ -336,13 +335,13 @@ spec:
description: SonataFlowBuildStatus defines the observed state of
SonataFlowBuild
properties:
buildPhase:
- description: Current phase of the build
+ description: BuildPhase Current phase of the build
type: string
error:
- description: Last error found during build
+ description: Error Last error found during build
type: string
imageTag:
- description: The final image tag produced by this build
instance
+ description: ImageTag The final image tag produced by this
build instance
type: string
innerBuild:
description: InnerBuild is a reference to an internal build
object,
diff --git a/bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
b/bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
index 4bea2cd0..08519ef7 100644
--- a/bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
+++ b/bundle/manifests/sonataflow.org_sonataflowplatforms.yaml
@@ -50,7 +50,8 @@ spec:
description: SonataFlowPlatformSpec defines the desired state of
SonataFlowPlatform
properties:
build:
- description: Attributes for building workflows in the target
platform
+ description: Build Attributes for building workflows in the
target
+ platform
properties:
config:
description: Describes the platform configuration for
building
@@ -411,7 +412,7 @@ spec:
type: object
type: object
devMode:
- description: Attributes for running workflows in devmode
(immutable,
+ description: DevMode Attributes for running workflows in
devmode (immutable,
no build required)
properties:
baseImage:
diff --git a/bundle/manifests/sonataflow.org_sonataflows.yaml
b/bundle/manifests/sonataflow.org_sonataflows.yaml
index 1fd78fd1..4d708ac8 100644
--- a/bundle/manifests/sonataflow.org_sonataflows.yaml
+++ b/bundle/manifests/sonataflow.org_sonataflows.yaml
@@ -56,16 +56,7 @@ spec:
description: SonataFlowSpec defines the desired state of SonataFlow
properties:
flow:
- description: "Flow describes the contents of the Workflow
definition
- following the CNCF Serverless Workflow Specification. The
attributes
- not part of the flow are defined by the Custom Resource
metadata
- information, as follows: \n - Id, name, and key are replaced
by
- the Custom Resource's name. Must follow the Kubernetes
naming patterns
- (RFC1123). \n - Description can be added in the CR's
annotation
- field sonataflow.org/description \n - Version is also
defined in
- the CR's annotation, field sonataflow.org/version \n -
SpecVersion
- is in the CR's apiVersion, for example v1alpha08 means that
it follows
- the specification version 0.8."
+ description: Flow the workflow definition.
properties:
annotations:
description: Annotations List of helpful terms describing
the
diff --git a/bundle/tests/scorecard/config.yaml
b/bundle/tests/scorecard/config.yaml
index 760c2d98..b12b9e6a 100644
--- a/bundle/tests/scorecard/config.yaml
+++ b/bundle/tests/scorecard/config.yaml
@@ -8,7 +8,7 @@ stages:
- entrypoint:
- scorecard-test
- basic-check-spec
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: basic
test: basic-check-spec-test
@@ -18,7 +18,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-bundle-validation
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-bundle-validation-test
@@ -28,7 +28,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-crds-have-validation
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-crds-have-validation-test
@@ -48,7 +48,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-spec-descriptors
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-spec-descriptors-test
@@ -58,7 +58,7 @@ stages:
- entrypoint:
- scorecard-test
- olm-status-descriptors
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-status-descriptors-test
diff --git a/config/crd/bases/sonataflow.org_sonataflowbuilds.yaml
b/config/crd/bases/sonataflow.org_sonataflowbuilds.yaml
index d5043d61..4e08ab23 100644
--- a/config/crd/bases/sonataflow.org_sonataflowbuilds.yaml
+++ b/config/crd/bases/sonataflow.org_sonataflowbuilds.yaml
@@ -45,8 +45,7 @@ spec:
metadata:
type: object
spec:
- description: SonataFlowBuildSpec an abstraction over the actual
build
- process performed by the platform.
+ description: SonataFlowBuildSpec define the desired state of th
SonataFlowBuild.
properties:
arguments:
description: 'Arguments lists the command line arguments to
send to
@@ -337,13 +336,13 @@ spec:
description: SonataFlowBuildStatus defines the observed state of
SonataFlowBuild
properties:
buildPhase:
- description: Current phase of the build
+ description: BuildPhase Current phase of the build
type: string
error:
- description: Last error found during build
+ description: Error Last error found during build
type: string
imageTag:
- description: The final image tag produced by this build
instance
+ description: ImageTag The final image tag produced by this
build instance
type: string
innerBuild:
description: InnerBuild is a reference to an internal build
object,
diff --git a/config/crd/bases/sonataflow.org_sonataflowplatforms.yaml
b/config/crd/bases/sonataflow.org_sonataflowplatforms.yaml
index c8196a75..30733095 100644
--- a/config/crd/bases/sonataflow.org_sonataflowplatforms.yaml
+++ b/config/crd/bases/sonataflow.org_sonataflowplatforms.yaml
@@ -51,7 +51,8 @@ spec:
description: SonataFlowPlatformSpec defines the desired state of
SonataFlowPlatform
properties:
build:
- description: Attributes for building workflows in the target
platform
+ description: Build Attributes for building workflows in the
target
+ platform
properties:
config:
description: Describes the platform configuration for
building
@@ -412,7 +413,7 @@ spec:
type: object
type: object
devMode:
- description: Attributes for running workflows in devmode
(immutable,
+ description: DevMode Attributes for running workflows in
devmode (immutable,
no build required)
properties:
baseImage:
diff --git a/config/crd/bases/sonataflow.org_sonataflows.yaml
b/config/crd/bases/sonataflow.org_sonataflows.yaml
index f4402b20..b285db1c 100644
--- a/config/crd/bases/sonataflow.org_sonataflows.yaml
+++ b/config/crd/bases/sonataflow.org_sonataflows.yaml
@@ -57,16 +57,7 @@ spec:
description: SonataFlowSpec defines the desired state of SonataFlow
properties:
flow:
- description: "Flow describes the contents of the Workflow
definition
- following the CNCF Serverless Workflow Specification. The
attributes
- not part of the flow are defined by the Custom Resource
metadata
- information, as follows: \n - Id, name, and key are replaced
by
- the Custom Resource's name. Must follow the Kubernetes
naming patterns
- (RFC1123). \n - Description can be added in the CR's
annotation
- field sonataflow.org/description \n - Version is also
defined in
- the CR's annotation, field sonataflow.org/version \n -
SpecVersion
- is in the CR's apiVersion, for example v1alpha08 means that
it follows
- the specification version 0.8."
+ description: Flow the workflow definition.
properties:
annotations:
description: Annotations List of helpful terms describing
the
diff --git a/config/default/osl/kustomization.yaml
b/config/default/osl/kustomization.yaml
new file mode 100644
index 00000000..6b68e44f
--- /dev/null
+++ b/config/default/osl/kustomization.yaml
@@ -0,0 +1,74 @@
+# Adds namespace to all resources.
+namespace: logic-operator-system
+
+# Value of this field is prepended to the
+# names of all resources, e.g. a deployment named
+# "wordpress" becomes "alices-wordpress".
+# Note that it should also match with the prefix (text before '-') of the
namespace
+# field above.
+namePrefix: logic-operator-rhel8-
+
+# Labels to add to all resources and selectors.
+#commonLabels:
+# someName: someValue
+
+bases:
+- ../../crd
+- ../../rbac
+- ../../manager/osl
+# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK]
prefix including the one in
+# crd/kustomization.yaml
+#- ../webhook
+# [CERTMANAGER] To enable cert-manager, uncomment all sections with
'CERTMANAGER'. 'WEBHOOK' components are required.
+#- ../certmanager
+# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with
'PROMETHEUS'.
+#- ../prometheus
+
+patchesStrategicMerge:
+# Protect the /metrics endpoint by putting it behind auth.
+# If you want your controller-manager to expose the /metrics
+# endpoint w/o any authn/z, please comment the following line.
+- manager_auth_proxy_patch.yaml
+
+# Mount the controller config file for loading manager configurations
+# through a ComponentConfig type
+#- manager_config_patch.yaml
+
+# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK]
prefix including the one in
+# crd/kustomization.yaml
+#- manager_webhook_patch.yaml
+
+# [CERTMANAGER] To enable cert-manager, uncomment all sections with
'CERTMANAGER'.
+# Uncomment 'CERTMANAGER' sections in crd/kustomization.yaml to enable the CA
injection in the admission webhooks.
+# 'CERTMANAGER' needs to be enabled to use ca injection
+#- webhookcainjection_patch.yaml
+
+# the following config is for teaching kustomize how to do var substitution
+vars:
+# [CERTMANAGER] To enable cert-manager, uncomment all sections with
'CERTMANAGER' prefix.
+#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
+# objref:
+# kind: Certificate
+# group: cert-manager.io
+# version: v1
+# name: serving-cert # this name should match the one in certificate.yaml
+# fieldref:
+# fieldpath: metadata.namespace
+#- name: CERTIFICATE_NAME
+# objref:
+# kind: Certificate
+# group: cert-manager.io
+# version: v1
+# name: serving-cert # this name should match the one in certificate.yaml
+#- name: SERVICE_NAMESPACE # namespace of the service
+# objref:
+# kind: Service
+# version: v1
+# name: webhook-service
+# fieldref:
+# fieldpath: metadata.namespace
+#- name: SERVICE_NAME
+# objref:
+# kind: Service
+# version: v1
+# name: webhook-service
diff --git a/config/default/osl/manager_auth_proxy_patch.yaml
b/config/default/osl/manager_auth_proxy_patch.yaml
new file mode 100644
index 00000000..dce9c71d
--- /dev/null
+++ b/config/default/osl/manager_auth_proxy_patch.yaml
@@ -0,0 +1,39 @@
+# This patch inject a sidecar container which is a HTTP proxy for the
+# controller manager, it performs RBAC authorization against the Kubernetes
API using SubjectAccessReviews.
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: controller-manager
+ namespace: system
+spec:
+ template:
+ spec:
+ containers:
+ - name: kube-rbac-proxy
+ image:
registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:4564ca3dc5bac80d6faddaf94c817fbbc270698a9399d8a21ee1005d85ceda56
+ args:
+ - "--secure-listen-address=0.0.0.0:8443"
+ - "--upstream=http://127.0.0.1:8080/"
+ - "--logtostderr=true"
+ - "--v=0"
+ ports:
+ - containerPort: 8443
+ protocol: TCP
+ name: https
+ resources:
+ limits:
+ cpu: 500m
+ memory: 128Mi
+ requests:
+ cpu: 5m
+ memory: 64Mi
+ securityContext:
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ - name: manager
+ args:
+ - "--health-probe-bind-address=:8081"
+ - "--metrics-bind-address=127.0.0.1:8080"
+ - "--leader-elect"
diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml
index b01554af..f5485cdc 100644
--- a/config/manager/manager.yaml
+++ b/config/manager/manager.yaml
@@ -26,8 +26,6 @@ spec:
spec:
securityContext:
runAsNonRoot: true
- seccompProfile:
- type: RuntimeDefault
containers:
- command:
- /usr/local/bin/manager
diff --git a/config/manager/osl/controller_manager_config.yaml
b/config/manager/osl/controller_manager_config.yaml
new file mode 100644
index 00000000..4cefd89b
--- /dev/null
+++ b/config/manager/osl/controller_manager_config.yaml
@@ -0,0 +1,11 @@
+apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
+kind: ControllerManagerConfig
+health:
+ healthProbeBindAddress: :8081
+metrics:
+ bindAddress: 127.0.0.1:8080
+webhook:
+ port: 9443
+leaderElection:
+ leaderElect: true
+ resourceName: 1be5e57d.kiegroup.org
diff --git a/config/manager/osl/kustomization.yaml
b/config/manager/osl/kustomization.yaml
new file mode 100644
index 00000000..52178c0d
--- /dev/null
+++ b/config/manager/osl/kustomization.yaml
@@ -0,0 +1,39 @@
+resources:
+- manager.yaml
+
+generatorOptions:
+ disableNameSuffixHash: true
+
+configMapGenerator:
+- files:
+ - controller_manager_config.yaml
+ name: manager-config
+- files:
+ - Dockerfile=sonataflow_builder_dockerfile.yaml
+ literals:
+ - DEFAULT_BUILDER_RESOURCE_NAME=Dockerfile
+ - DEFAULT_WORKFLOW_EXTENSION=.sw.json
+ name: builder-config
+
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+images:
+- digest:
sha256:24c2e62bff1f2f7e5579b990e44206ac019bd00f5ca546b069471fc1af34ed75
+ name: controller
+ newName:
registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8
+# Patching the manager deployment file to add an env var with the operator
namespace in
+patchesJson6902:
+- patch: |-
+ - op: add
+ path: /spec/template/spec/containers/0/env
+ value:
+ - name: POD_NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ target:
+ group: apps
+ kind: Deployment
+ name: controller-manager
+ namespace: system
+ version: v1
diff --git a/config/manager/manager.yaml b/config/manager/osl/manager.yaml
similarity index 96%
copy from config/manager/manager.yaml
copy to config/manager/osl/manager.yaml
index b01554af..f5485cdc 100644
--- a/config/manager/manager.yaml
+++ b/config/manager/osl/manager.yaml
@@ -26,8 +26,6 @@ spec:
spec:
securityContext:
runAsNonRoot: true
- seccompProfile:
- type: RuntimeDefault
containers:
- command:
- /usr/local/bin/manager
diff --git a/config/manager/osl/sonataflow_builder_dockerfile.yaml
b/config/manager/osl/sonataflow_builder_dockerfile.yaml
new file mode 100644
index 00000000..5ee5d76e
--- /dev/null
+++ b/config/manager/osl/sonataflow_builder_dockerfile.yaml
@@ -0,0 +1,31 @@
+FROM
registry.redhat.io/openshift-serverless-1-tech-preview/logic-swf-builder-rhel8:latest
AS builder
+
+# variables that can be overridden by the builder
+# To add a Quarkus extension to your application
+ARG QUARKUS_EXTENSIONS
+# Args to pass to the Quarkus CLI add extension command
+ARG QUARKUS_ADD_EXTENSION_ARGS
+
+# Copy from build context to skeleton resources project
+COPY --chmod=644 * ./resources/
+
+RUN /home/kogito/launch/build-app.sh ./resources
+
+#=============================
+# Runtime Run
+#=============================
+FROM registry.access.redhat.com/ubi8/openjdk-11:latest
+
+ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
+
+# We make four distinct layers so if there are application changes the library
layers can be re-used
+COPY --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/lib/
/deployments/lib/
+COPY --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/*.jar /deployments/
+COPY --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/app/
/deployments/app/
+COPY --from=builder --chown=185
/home/kogito/serverless-workflow-project/target/quarkus-app/quarkus/
/deployments/quarkus/
+
+EXPOSE 8080
+USER 185
+ENV AB_JOLOKIA_OFF=""
+ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0
-Djava.util.logging.manager=org.jboss.logmanager.LogManager"
+ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
diff --git
a/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml
b/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml
index d687a360..c52816fb 100644
--- a/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml
+++ b/config/manifests/bases/sonataflow-operator.clusterserviceversion.yaml
@@ -8,6 +8,7 @@ metadata:
containerImage: quay.io/kiegroup/kogito-serverless-operator-nightly:latest
description: SonataFlow Kubernetes Operator for deploying workflow
applications
based on the CNCF Serverless Workflow specification
+ operators.operatorframework.io/internal-objects:
'["sonataflowbuilds.sonataflow.org"]'
repository: https://github.com/kiegroup/kogito-serverless-operator
support: Red Hat
name: sonataflow-operator.v0.0.0
@@ -21,18 +22,142 @@ spec:
displayName: Sonata Flow Build
kind: SonataFlowBuild
name: sonataflowbuilds.sonataflow.org
+ resources:
+ - kind: BuildConfig
+ name: An Openshift Build Config
+ version: build.openshift.io/v1
+ specDescriptors:
+ - description: 'Arguments lists the command line arguments to send to
the internal
+ builder command. Depending on the build method you might set this
attribute
+ instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see
+ the SonataFlow guides.'
+ displayName: Arguments
+ path: arguments
+ - description: Optional build arguments that can be set to the internal
build
+ (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: envs
+ - description: Resources optional compute resource requirements for the
builder
+ displayName: Resources
+ path: resources
+ - description: Timeout defines the Build maximum execution duration. The
Build
+ deadline is set to the Build start time plus the Timeout duration.
If the
+ Build deadline is exceeded, the Build context is canceled, and its
phase
+ set to BuildPhaseFailed.
+ displayName: Timeout
+ path: timeout
+ statusDescriptors:
+ - description: BuildPhase Current phase of the build
+ displayName: BuildPhase
+ path: buildPhase
+ - description: Error Last error found during build
+ displayName: Error
+ path: error
+ - description: ImageTag The final image tag produced by this build
instance
+ displayName: ImageTag
+ path: imageTag
+ - description: InnerBuild is a reference to an internal build object,
which
+ can be anything known only to internal builders.
+ displayName: InnerBuild
+ path: innerBuild
version: v1alpha08
- description: SonataFlowPlatform is the descriptor for the workflow
platform
infrastructure.
displayName: Sonata Flow Platform
kind: SonataFlowPlatform
name: sonataflowplatforms.sonataflow.org
+ resources:
+ - kind: Namespace
+ name: The Namespace controlled by the platform
+ version: v1
+ specDescriptors:
+ - description: Build Attributes for building workflows in the target
platform
+ displayName: Build
+ path: build
+ - description: 'Arguments lists the command line arguments to send to
the internal
+ builder command. Depending on the build method you might set this
attribute
+ instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see
+ the SonataFlow guides.'
+ displayName: Arguments
+ path: build.template.arguments
+ - description: Optional build arguments that can be set to the internal
build
+ (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: build.template.buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: build.template.envs
+ - description: Resources optional compute resource requirements for the
builder
+ displayName: Resources
+ path: build.template.resources
+ - description: Timeout defines the Build maximum execution duration. The
Build
+ deadline is set to the Build start time plus the Timeout duration.
If the
+ Build deadline is exceeded, the Build context is canceled, and its
phase
+ set to BuildPhaseFailed.
+ displayName: Timeout
+ path: build.template.timeout
+ - description: DevMode Attributes for running workflows in devmode
(immutable,
+ no build required)
+ displayName: DevMode
+ path: devMode
+ statusDescriptors:
+ - description: Cluster what kind of cluster you're running (ie, plain
Kubernetes
+ or OpenShift)
+ displayName: cluster
+ path: cluster
+ - description: Info generic information related to the build
+ displayName: info
+ path: info
+ - description: Version the operator version controlling this Platform
+ displayName: version
+ path: version
version: v1alpha08
- description: SonataFlow is the descriptor representation for a workflow
application
based on the CNCF Serverless Workflow specification.
displayName: Sonata Flow
kind: SonataFlow
name: sonataflows.sonataflow.org
+ resources:
+ - kind: Deployment
+ name: A Deployment for the Flow
+ version: apps/v1
+ - kind: Service
+ name: A Service for the Flow
+ version: v1
+ - kind: SonataFlowBuild
+ name: A SonataFlow Build
+ version: sonataflow.org/v1alpha08
+ - kind: Route
+ name: An OpenShift Route for the Flow
+ version: route.openshift.io/v1
+ - kind: ConfigMap
+ name: The ConfigMaps with Flow definition and additional configuration
files
+ version: v1
+ specDescriptors:
+ - description: Flow the workflow definition.
+ displayName: flow
+ path: flow
+ - description: Resources workflow resources that are linked to this
workflow
+ definition. For example, a collection of OpenAPI specification files.
+ displayName: resources
+ path: resources
+ statusDescriptors:
+ - description: Address is used as a part of Addressable interface
(status.address.url)
+ for knative
+ displayName: address
+ path: address
+ - description: Endpoint is an externally accessible URL of the workflow
+ displayName: endpoint
+ path: endpoint
+ - displayName: lastTimeRecoverAttempt
+ path: lastTimeRecoverAttempt
+ - description: keeps track of how many failure recovers a given workflow
had
+ so far
+ displayName: recoverFailureAttempts
+ path: recoverFailureAttempts
version: v1alpha08
description: |-
SonataFlow Kubernetes Operator for deploying workflow applications
diff --git
a/config/manifests/osl/bases/logic-operator-rhel8.clusterserviceversion.yaml
b/config/manifests/osl/bases/logic-operator-rhel8.clusterserviceversion.yaml
new file mode 100644
index 00000000..348bc71a
--- /dev/null
+++ b/config/manifests/osl/bases/logic-operator-rhel8.clusterserviceversion.yaml
@@ -0,0 +1,207 @@
+apiVersion: operators.coreos.com/v1alpha1
+kind: ClusterServiceVersion
+metadata:
+ annotations:
+ alm-examples: '[]'
+ capabilities: Basic Install
+ categories: Application Runtime
+ description: OpenShift Serverless Logic Kubernetes Operator for deploying
workflow
+ applications based on the CNCF Serverless Workflow specification
+ operators.openshift.io/valid-subscription: '["OpenShift Container
Platform", "OpenShift
+ Platform Plus"]'
+ operators.operatorframework.io/internal-objects:
'["sonataflowbuilds.sonataflow.org"]'
+ repository: https://github.com/kiegroup/kogito-serverless-operator
+ support: Red Hat
+ name: logic-operator-rhel8.v0.0.0
+ namespace: placeholder
+spec:
+ apiservicedefinitions: {}
+ customresourcedefinitions:
+ owned:
+ - description: SonataFlowBuild is an internal custom resource to control
workflow
+ build instances in the target platform
+ displayName: Sonata Flow Build
+ kind: SonataFlowBuild
+ name: sonataflowbuilds.sonataflow.org
+ resources:
+ - kind: BuildConfig
+ name: An Openshift Build Config
+ version: build.openshift.io/v1
+ specDescriptors:
+ - description: 'Arguments lists the command line arguments to send to
the internal
+ builder command. Depending on the build method you might set this
attribute
+ instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see
+ the SonataFlow guides.'
+ displayName: Arguments
+ path: arguments
+ - description: Optional build arguments that can be set to the internal
build
+ (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: envs
+ - description: Resources optional compute resource requirements for the
builder
+ displayName: Resources
+ path: resources
+ - description: Timeout defines the Build maximum execution duration. The
Build
+ deadline is set to the Build start time plus the Timeout duration.
If the
+ Build deadline is exceeded, the Build context is canceled, and its
phase
+ set to BuildPhaseFailed.
+ displayName: Timeout
+ path: timeout
+ statusDescriptors:
+ - description: BuildPhase Current phase of the build
+ displayName: BuildPhase
+ path: buildPhase
+ - description: Error Last error found during build
+ displayName: Error
+ path: error
+ - description: ImageTag The final image tag produced by this build
instance
+ displayName: ImageTag
+ path: imageTag
+ - description: InnerBuild is a reference to an internal build object,
which
+ can be anything known only to internal builders.
+ displayName: InnerBuild
+ path: innerBuild
+ version: v1alpha08
+ - description: SonataFlowPlatform is the descriptor for the workflow
platform
+ infrastructure.
+ displayName: Sonata Flow Platform
+ kind: SonataFlowPlatform
+ name: sonataflowplatforms.sonataflow.org
+ resources:
+ - kind: Namespace
+ name: The Namespace controlled by the platform
+ version: v1
+ specDescriptors:
+ - description: Build Attributes for building workflows in the target
platform
+ displayName: Build
+ path: build
+ - description: 'Arguments lists the command line arguments to send to
the internal
+ builder command. Depending on the build method you might set this
attribute
+ instead of BuildArgs. For example: ".spec.arguments=verbose=3".
Please see
+ the SonataFlow guides.'
+ displayName: Arguments
+ path: build.template.arguments
+ - description: Optional build arguments that can be set to the internal
build
+ (e.g. Docker ARG)
+ displayName: BuildArgs
+ path: build.template.buildArgs
+ - description: Optional environment variables to add to the internal
build
+ displayName: Envs
+ path: build.template.envs
+ - description: Resources optional compute resource requirements for the
builder
+ displayName: Resources
+ path: build.template.resources
+ - description: Timeout defines the Build maximum execution duration. The
Build
+ deadline is set to the Build start time plus the Timeout duration.
If the
+ Build deadline is exceeded, the Build context is canceled, and its
phase
+ set to BuildPhaseFailed.
+ displayName: Timeout
+ path: build.template.timeout
+ - description: DevMode Attributes for running workflows in devmode
(immutable,
+ no build required)
+ displayName: DevMode
+ path: devMode
+ statusDescriptors:
+ - description: Cluster what kind of cluster you're running (ie, plain
Kubernetes
+ or OpenShift)
+ displayName: cluster
+ path: cluster
+ - description: Info generic information related to the build
+ displayName: info
+ path: info
+ - description: Version the operator version controlling this Platform
+ displayName: version
+ path: version
+ version: v1alpha08
+ - description: SonataFlow is the descriptor representation for a workflow
application
+ based on the CNCF Serverless Workflow specification.
+ displayName: Sonata Flow
+ kind: SonataFlow
+ name: sonataflows.sonataflow.org
+ resources:
+ - kind: Deployment
+ name: A Deployment for the Flow
+ version: apps/v1
+ - kind: Service
+ name: A Service for the Flow
+ version: v1
+ - kind: SonataFlowBuild
+ name: A SonataFlow Build
+ version: sonataflow.org/v1alpha08
+ - kind: Route
+ name: An OpenShift Route for the Flow
+ version: route.openshift.io/v1
+ - kind: ConfigMap
+ name: The ConfigMaps with Flow definition and additional configuration
files
+ version: v1
+ specDescriptors:
+ - description: Flow the workflow definition.
+ displayName: flow
+ path: flow
+ - description: Resources workflow resources that are linked to this
workflow
+ definition. For example, a collection of OpenAPI specification files.
+ displayName: resources
+ path: resources
+ statusDescriptors:
+ - description: Address is used as a part of Addressable interface
(status.address.url)
+ for knative
+ displayName: address
+ path: address
+ - description: Endpoint is an externally accessible URL of the workflow
+ displayName: endpoint
+ path: endpoint
+ - displayName: lastTimeRecoverAttempt
+ path: lastTimeRecoverAttempt
+ - description: keeps track of how many failure recovers a given workflow
had
+ so far
+ displayName: recoverFailureAttempts
+ path: recoverFailureAttempts
+ version: v1alpha08
+ description: |-
+ OpenShift Serverless Logic Kubernetes Operator for deploying workflow
applications
+ based on the [CNCF Serverless Workflow
specification](https://serverlessworkflow.io/):
+
+ * Deploy workflow applications using the [dev
profile](https://sonataflow.org/serverlessworkflow/latest/cloud/operator/developing-workflows.html),
suited for the your development cycle
+ * Build workflow applications based on the platform you're currently
working on.
+ displayName: SonataFlow Operator
+ install:
+ spec:
+ deployments: null
+ strategy: ""
+ installModes:
+ - supported: false
+ type: OwnNamespace
+ - supported: false
+ type: SingleNamespace
+ - supported: false
+ type: MultiNamespace
+ - supported: true
+ type: AllNamespaces
+ keywords:
+ - sonataflow
+ - cncf
+ - serverless
+ - serverlessworkflow
+ links:
+ - name: Product Page
+ url: https://sonataflow.org/serverlessworkflow/latest/index.html
+ maintainers:
+ - email: [email protected]
+ name: Red Hat
+ maturity: alpha
+ minKubeVersion: 1.23.0
+ provider:
+ name: Red Hat
+ relatedImages:
+ - image:
registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8:1.30.0
+ name: IMAGE_LOGIC_SWF_OPERATOR
+ - image:
registry.redhat.io/openshift-serverless-1-tech-preview/logic-swf-devmode-rhel8:1.30.0
+ name: IMAGE_LOGIC_SWF_DEVMODE
+ - image:
registry.redhat.io/openshift-serverless-1-tech-preview/logic-swf-builder-rhel8:1.30.0
+ name: IMAGE_LOGIC_SWF_BUILDER
+ - image:
registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:4564ca3dc5bac80d6faddaf94c817fbbc270698a9399d8a21ee1005d85ceda56
+ name: IMAGE_KUBE_RBAC_PROXY
+ version: 0.0.0
diff --git a/config/manifests/osl/kustomization.yaml
b/config/manifests/osl/kustomization.yaml
new file mode 100644
index 00000000..08de228e
--- /dev/null
+++ b/config/manifests/osl/kustomization.yaml
@@ -0,0 +1,27 @@
+# These resources constitute the fully configured set of manifests
+# used to generate the 'manifests/' directory in a bundle.
+resources:
+- bases/logic-operator-rhel8.clusterserviceversion.yaml
+- ../../default/osl
+- ../../samples
+- ../../scorecard
+
+# [WEBHOOK] To enable webhooks, uncomment all the sections with [WEBHOOK]
prefix.
+# Do NOT uncomment sections with prefix [CERTMANAGER], as OLM does not support
cert-manager.
+# These patches remove the unnecessary "cert" volume and its manager container
volumeMount.
+#patchesJson6902:
+#- target:
+# group: apps
+# version: v1
+# kind: Deployment
+# name: controller-manager
+# namespace: system
+# patch: |-
+# # Remove the manager container's "cert" volumeMount, since OLM will
create and mount a set of certs.
+# # Update the indices in this path if adding or removing
containers/volumeMounts in the manager's Deployment.
+# - op: remove
+# path: /spec/template/spec/containers/1/volumeMounts/0
+# # Remove the "cert" volume, since OLM will create and mount a set of
certs.
+# # Update the indices in this path if adding or removing volumes in the
manager's Deployment.
+# - op: remove
+# path: /spec/template/spec/volumes/0
diff --git a/config/samples/kustomization.yaml
b/config/samples/kustomization.yaml
index 73b3ae50..d4ca147b 100644
--- a/config/samples/kustomization.yaml
+++ b/config/samples/kustomization.yaml
@@ -2,4 +2,5 @@
resources:
- sonataflow.org_v1alpha08_sonataflow.yaml
- sonataflow.org_v1alpha08_sonataflowplatform.yaml
+- sonataflow.org_v1alpha08_sonataflowbuild.yaml
#+kubebuilder:scaffold:manifestskustomizesamples
diff --git a/config/samples/sonataflow.org_v1alpha08_sonataflowbuild.yaml
b/config/samples/sonataflow.org_v1alpha08_sonataflowbuild.yaml
new file mode 100644
index 00000000..f6170023
--- /dev/null
+++ b/config/samples/sonataflow.org_v1alpha08_sonataflowbuild.yaml
@@ -0,0 +1,6 @@
+apiVersion: sonataflow.org/v1alpha08
+kind: SonataFlowBuild
+metadata:
+ name: greeting
+spec:
+ timeout: 360s
\ No newline at end of file
diff --git a/config/scorecard/patches/basic.config.yaml
b/config/scorecard/patches/basic.config.yaml
index 154137ee..7d72d8ee 100644
--- a/config/scorecard/patches/basic.config.yaml
+++ b/config/scorecard/patches/basic.config.yaml
@@ -4,7 +4,7 @@
entrypoint:
- scorecard-test
- basic-check-spec
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: basic
test: basic-check-spec-test
diff --git a/config/scorecard/patches/olm.config.yaml
b/config/scorecard/patches/olm.config.yaml
index ecf7d99c..62b89ac5 100644
--- a/config/scorecard/patches/olm.config.yaml
+++ b/config/scorecard/patches/olm.config.yaml
@@ -4,7 +4,7 @@
entrypoint:
- scorecard-test
- olm-bundle-validation
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-bundle-validation-test
@@ -14,7 +14,7 @@
entrypoint:
- scorecard-test
- olm-crds-have-validation
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-crds-have-validation-test
@@ -34,7 +34,7 @@
entrypoint:
- scorecard-test
- olm-spec-descriptors
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-spec-descriptors-test
@@ -44,7 +44,7 @@
entrypoint:
- scorecard-test
- olm-status-descriptors
- image: quay.io/operator-framework/scorecard-test:v1.21.0
+ image: quay.io/operator-framework/scorecard-test:v1.25.0
labels:
suite: olm
test: olm-status-descriptors-test
diff --git a/content_sets.yaml b/content_sets.yaml
index 495b8907..919d0551 100644
--- a/content_sets.yaml
+++ b/content_sets.yaml
@@ -18,4 +18,7 @@ x86_64:
ppc64le:
- rhel-8-for-ppc64le-baseos-rpms
- rhel-8-for-ppc64le-appstream-rpms
- - rhocp-4.7-for-rhel-8-ppc64le-rpms
\ No newline at end of file
+ - rhocp-4.7-for-rhel-8-ppc64le-rpms
+aarch64:
+ - rhel-8-for-aarch64-baseos-rpms
+ - rhel-8-for-aarch64-appstream-rpms
\ No newline at end of file
diff --git a/docs/PRODUCTIZATION.md b/docs/PRODUCTIZATION.md
new file mode 100644
index 00000000..0934abac
--- /dev/null
+++ b/docs/PRODUCTIZATION.md
@@ -0,0 +1,48 @@
+# Productization notes for Red Hat OpenShift Serverless Logic Operator
+## Introduction
+
+The Kogito Servereless Ooperator is the upstream project for the Red Hat
OpenShift Serverless Logic Operator.
+
+In this document you can find some notes useful if you need to productize the
Operator image and its bundle.
+
+In order to build the Operator and its bundle in a Red Hat environment you
need to have a [CeKit](https://cekit.io/)
+installed on your machine.
+
+## Operator image
+
+
+In order to build an operator image you have to execute the following command:
+
+```shell
+make -f Makefile.osl container-build
+```
+
+This will produce a scratch build, if you would like to release it add the
`RELEASE=true` flag and so:
+
+```shell
+make -f Makefile.osl container-build RELEASE=true
+```
+
+## Bundle image
+
+
+In order to build a bundle image you have to execute the following command:
+
+```shell
+make -f Makefile.osl bundle-build
+```
+
+This will produce a scratch build, if you would like to release it add the
`RELEASE=true` flag and so:
+
+```shell
+make -f Makefile.osl bundle-build RELEASE=true
+```
+
+If you would like to realse the bundle referring to a particular operator
image digest different from the default one reported
+into the Makefile, you can do it using these commands:
+
+```shell
+make -f Makefile.osl generate-all USE_IMAGE_DIGESTS=true
VERSION=sha256:aae0198cbd4a9d92130437d3869b6da8854ba3a7c229956e172b621aac3261f3
+
+make -f Makefile.osl bundle-build RELEASE=true
+```
\ No newline at end of file
diff --git a/hack/align-osl-config.sh b/hack/align-osl-config.sh
new file mode 100755
index 00000000..bbd75a80
--- /dev/null
+++ b/hack/align-osl-config.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+# Copyright 2023 Red Hat, Inc. and/or its affiliates
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# This script will align the configuration files needed to generate the bundle
manifests
+# If someone will change one for the files that can be automatically aligned
from the community to the osl version, executing
+# this script will copy them from the community folder to the osl one.
+#
+# At the moment folders that contain files to be aligned are:
+# - config/manager (controller_manager_config.yaml, manager.yaml) ->
config/manager/osl (controller_manager_config.yaml, manager.yaml)
+#
+set -e
+
+script_dir_path=$(dirname "${BASH_SOURCE[0]}")
+config_dir_path=${script_dir_path}/../config
+
+# List of directories containing an osl sub folder with files that need to be
copied with community
+dirs=("manager")
+# List of files to be aligned with community for manager folder
+manager=("controller_manager_config.yaml" "manager.yaml")
+
+# Function to compare 2 files and in case of differences align the second one
with the first
+function compare_and_align {
+ if ! cmp -s $1 $2; then
+ echo "diff detected in $2"
+ cp $1 $2
+ fi
+}
+
+for dir in ${dirs[@]}; do
+ typeset -n d=${dir}
+ for file in ${d[@]}; do
+ compare_and_align ${config_dir_path}/${dir}/${file}
${config_dir_path}/${dir}/osl/${file}
+ done
+done
+
+
+
+
diff --git a/modules/org.kie.kogito.osl.builder.prod/module.yaml
b/modules/org.kie.kogito.osl.builder.prod/module.yaml
index 9d3a36f7..9780126a 100644
--- a/modules/org.kie.kogito.osl.builder.prod/module.yaml
+++ b/modules/org.kie.kogito.osl.builder.prod/module.yaml
@@ -1,5 +1,5 @@
name: org.kie.kogito.osl.builder.prod
-version: "1.29.0"
+version: "1.30.0"
description: Builds the operator binary
envs:
diff --git a/modules/org.kie.kogito.osl.bundleinstall/module.yaml
b/modules/org.kie.kogito.osl.bundleinstall/module.yaml
new file mode 100644
index 00000000..532cd78e
--- /dev/null
+++ b/modules/org.kie.kogito.osl.bundleinstall/module.yaml
@@ -0,0 +1,14 @@
+name: org.kie.kogito.osl.bundleinstall
+version: "1.30.0"
+description: Copy the bund files to the target image
+
+artifacts:
+ - name: manifests
+ path: "../../../../bundle.osl/manifests"
+ dest: /manifests/
+ - name: metadata
+ path: "../../../../bundle.osl/metadata"
+ dest: /metadata/
+ - name: tests-scorecard
+ path: "../../../../bundle.osl/tests/scorecard/"
+ dest: /tests/scorecard/
\ No newline at end of file
diff --git a/operator.yaml b/operator.yaml
index d8dd93d5..c32c3186 100644
--- a/operator.yaml
+++ b/operator.yaml
@@ -51,8 +51,7 @@ spec:
metadata:
type: object
spec:
- description: SonataFlowBuildSpec an abstraction over the actual
build
- process performed by the platform.
+ description: SonataFlowBuildSpec define the desired state of th
SonataFlowBuild.
properties:
arguments:
description: 'Arguments lists the command line arguments to
send to
@@ -343,13 +342,13 @@ spec:
description: SonataFlowBuildStatus defines the observed state of
SonataFlowBuild
properties:
buildPhase:
- description: Current phase of the build
+ description: BuildPhase Current phase of the build
type: string
error:
- description: Last error found during build
+ description: Error Last error found during build
type: string
imageTag:
- description: The final image tag produced by this build
instance
+ description: ImageTag The final image tag produced by this
build instance
type: string
innerBuild:
description: InnerBuild is a reference to an internal build
object,
@@ -415,7 +414,8 @@ spec:
description: SonataFlowPlatformSpec defines the desired state of
SonataFlowPlatform
properties:
build:
- description: Attributes for building workflows in the target
platform
+ description: Build Attributes for building workflows in the
target
+ platform
properties:
config:
description: Describes the platform configuration for
building
@@ -776,7 +776,7 @@ spec:
type: object
type: object
devMode:
- description: Attributes for running workflows in devmode
(immutable,
+ description: DevMode Attributes for running workflows in
devmode (immutable,
no build required)
properties:
baseImage:
@@ -901,16 +901,7 @@ spec:
description: SonataFlowSpec defines the desired state of SonataFlow
properties:
flow:
- description: "Flow describes the contents of the Workflow
definition
- following the CNCF Serverless Workflow Specification. The
attributes
- not part of the flow are defined by the Custom Resource
metadata
- information, as follows: \n - Id, name, and key are replaced
by
- the Custom Resource's name. Must follow the Kubernetes
naming patterns
- (RFC1123). \n - Description can be added in the CR's
annotation
- field sonataflow.org/description \n - Version is also
defined in
- the CR's annotation, field sonataflow.org/version \n -
SpecVersion
- is in the CR's apiVersion, for example v1alpha08 means that
it follows
- the specification version 0.8."
+ description: Flow the workflow definition.
properties:
annotations:
description: Annotations List of helpful terms describing
the
@@ -3620,7 +3611,5 @@ spec:
- ALL
securityContext:
runAsNonRoot: true
- seccompProfile:
- type: RuntimeDefault
serviceAccountName: sonataflow-operator-controller-manager
terminationGracePeriodSeconds: 10
diff --git a/osl-bundle-prod.yaml b/osl-bundle-prod.yaml
new file mode 100644
index 00000000..7c360b9f
--- /dev/null
+++ b/osl-bundle-prod.yaml
@@ -0,0 +1,70 @@
+schema_version: 1
+name: "openshift-serverless-1-tech-preview/logic-operator-bundle"
+description: "OpenShift Serverless Logic Operator Bundle"
+version: "1.30.0"
+from: "scratch"
+
+labels:
+ - name: maintainer
+ value: [email protected]
+ - name: com.redhat.component
+ value: openshift-serverless-1-logic-rhel8-operator-bundle-container
+ - name: io.k8s.description
+ value: Operator Bundle for deploying OpenShift Serverless Logic Operator
+ - name: io.k8s.display-name
+ value: Red Hat OpenShift Serverless Logic Operator Bundle
+ - name: io.openshift.tags
+ value: osl,logic,sonataflow,serverless,workflow,operator
+ - name: operators.operatorframework.io.bundle.mediatype.v1
+ value: registry+v1
+ - name: operators.operatorframework.io.bundle.manifests.v1
+ value: manifests/
+ - name: operators.operatorframework.io.bundle.metadata.v1
+ value: metadata/
+ - name: operators.operatorframework.io.bundle.package.v1
+ value: logic-operator-rhel8
+ - name: operators.operatorframework.io.bundle.channels.v1
+ value: "alpha"
+ - name: operators.operatorframework.io.bundle.channel.default.v1
+ value: alpha
+ - name: operators.operatorframework.io.metrics.mediatype.v1
+ value: metrics+v1
+ - name: operators.operatorframework.io.metrics.builder
+ value: operator-sdk-v1.25.0
+ - name: operators.operatorframework.io.metrics.project_layout
+ value: go.kubebuilder.io/v3
+ - name: operators.operatorframework.io.test.config.v1
+ value: tests/scorecard/
+ - name: operators.operatorframework.io.test.mediatype.v1
+ value: scorecard+v1
+ - name: com.redhat.delivery.operator.bundle
+ value: "true"
+ - name: com.redhat.openshift.versions
+ value: v4.10
+
+modules:
+ repositories:
+ - path: modules
+ install:
+ - name: org.kie.kogito.osl.bundleinstall
+
+packages:
+ content_sets_file: content_sets.yaml
+
+osbs:
+ configuration:
+ container:
+ operator_manifests:
+ enable_digest_pinning: true
+ enable_repo_replacements: true
+ enable_registry_replacements: true
+ manifests_dir: "manifests"
+ platforms:
+ only:
+ - x86_64
+ - ppc64le
+ - aarch64
+ extra_dir: osbs-extra
+ repository:
+ name: containers/openshift-serverless-1-logic-operator-bundle
+ branch: openshift-serverless-1.30-rhel-8
\ No newline at end of file
diff --git a/osl-image-prod.yaml b/osl-image-prod.yaml
index 59fa84a0..905bf0cf 100644
--- a/osl-image-prod.yaml
+++ b/osl-image-prod.yaml
@@ -1,6 +1,6 @@
- schema_version: 1
name: "operator-builder"
- version: "1.29.0"
+ version: "1.30.0"
from: "registry.access.redhat.com/ubi8/go-toolset:1.19.9"
description: "Golang builder image for the Red Hat OpenShift Serverless
Logic Operator"
@@ -23,9 +23,10 @@
only:
- x86_64
- ppc64le
+ - aarch64
- name: "openshift-serverless-1-tech-preview/logic-operator-rhel8"
- version: "1.29.0"
+ version: "1.30.0"
from: "registry.access.redhat.com/ubi8/ubi-micro:latest"
description: "Runtime Image for the Red Hat OpenShift Serverless Logic
Operator"
@@ -39,7 +40,7 @@
- name: io.k8s.display-name
value: Red Hat OpenShift Serverless Logic Operator
- name: io.openshift.tags
- value: osl,kogito,serverless,workflow,operator
+ value: osl,logic,sonataflow,serverless,workflow,operator
artifacts:
- path: /workspace/manager
@@ -54,7 +55,7 @@
extra_dir: osbs-extra
repository:
name: containers/openshift-serverless-1-logic-operator
- branch: openshift-serverless-1.29-rhel-8
+ branch: openshift-serverless-1.30-rhel-8
run:
user: "1001"
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]