Skip to content

Commit

Permalink
[KOGITO-9103] Applying Tristan's suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Davide Salerno <[email protected]>
  • Loading branch information
davidesalerno committed Sep 26, 2023
1 parent 746b4c7 commit 7e0b7c9
Show file tree
Hide file tree
Showing 16 changed files with 661 additions and 304 deletions.
2 changes: 1 addition & 1 deletion Makefile.osl
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ $(ENVTEST): $(LOCALBIN)
bundle: manifests kustomize install-operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
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 --package=logic-operator-rhel8 --output-dir=bundle.osl $(BUNDLE_GEN_FLAGS) --use-image-digests
$(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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ 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 # Copy from build context to skeleton resources project\nCOPY
* ./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
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,29 @@ metadata:
}
}
},
{
"apiVersion": "sonataflow.org/v1alpha08",
"kind": "SonataFlowBuild",
"metadata": {
"name": "greeting"
},
"spec": {
"resources": {}
}
},
{
"apiVersion": "sonataflow.org/v1alpha08",
"kind": "SonataFlowPlatform",
"metadata": {
"name": "sonataflow-platform"
},
"spec": {
"platform": {
"registry": {
"address": "quay.io/kiegroup",
"secret": "regcred"
"build": {
"config": {
"registry": {
"address": "quay.io/kiegroup",
"secret": "regcred"
}
}
}
}
Expand All @@ -97,6 +109,7 @@ metadata:
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: '["SonataFlowBuild"]'
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/kiegroup/kogito-serverless-operator
support: Red Hat
Expand All @@ -123,35 +136,13 @@ spec:
- kind: Namespace
name: The Namespace controlled by the platform
version: v1
specDescriptors:
- description: BuildTemplate specify how to build the Workflow. It's used as a template for the SonataFlowBuild
displayName: build
path: build
- description: Configuration list of configuration properties to be attached to all the Workflow built from this Platform
displayName: configuration
path: configuration
- description: DevBaseImage Base image to run the Workflow in dev mode instead of the operator's default. Optional, used for the dev profile only
displayName: devBaseImage
path: devBaseImage
- description: BuildPlatform specify how is the platform where we want to build the Workflow
displayName: platform
path: platform
statusDescriptors:
- description: Cluster what kind of cluster you're running (ie, plain Kubernetes or OpenShift)
displayName: cluster
path: cluster
- description: Conditions which are the conditions met (particularly useful when in ERROR phase)
displayName: conditions
path: conditions
- description: Info generic information related to the build
displayName: info
path: info
- description: ObservedGeneration is the most recent generation observed for this Platform.
displayName: observedGeneration
path: observedGeneration
- description: Phase defines in what phase the Platform is found
displayName: phase
path: phase
- description: Version the operator version controlling this Platform
displayName: version
path: version
Expand Down Expand Up @@ -514,7 +505,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
image: registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8@sha256:33653cf4c48121a7a0d1e109c3fe93b8050f9deb80b6bb00425b62c77917a9ad
image: registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8@sha256:24c2e62bff1f2f7e5579b990e44206ac019bd00f5ca546b069471fc1af34ed75
livenessProbe:
httpGet:
path: /healthz
Expand Down Expand Up @@ -606,6 +597,6 @@ spec:
relatedImages:
- image: registry.redhat.io/openshift4/ose-kube-rbac-proxy@sha256:4564ca3dc5bac80d6faddaf94c817fbbc270698a9399d8a21ee1005d85ceda56
name: kube-rbac-proxy
- image: registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8@sha256:33653cf4c48121a7a0d1e109c3fe93b8050f9deb80b6bb00425b62c77917a9ad
- image: registry.redhat.io/openshift-serverless-1-tech-preview/logic-operator-rhel8@sha256:24c2e62bff1f2f7e5579b990e44206ac019bd00f5ca546b069471fc1af34ed75
name: manager
version: 1.30.0
41 changes: 12 additions & 29 deletions bundle/manifests/sonataflow-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ metadata:
}
}
},
{
"apiVersion": "sonataflow.org/v1alpha08",
"kind": "SonataFlowBuild",
"metadata": {
"name": "greeting"
},
"spec": {
"resources": {}
}
},
{
"apiVersion": "sonataflow.org/v1alpha08",
"kind": "SonataFlowPlatform",
Expand All @@ -96,10 +106,11 @@ metadata:
]
capabilities: Basic Install
categories: Application Runtime
containerImage: quay.io/kiegroup/kogito-serverless-operator:0.0.0
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/builder: operator-sdk-v1.25.0
operators.operatorframework.io/internal-objects: '["SonataFlowBuild"]'
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/kiegroup/kogito-serverless-operator
support: Red Hat
Expand Down Expand Up @@ -128,42 +139,14 @@ spec:
- kind: Namespace
name: The Namespace controlled by the platform
version: v1
specDescriptors:
- description: BuildTemplate specify how to build the Workflow. It's used as
a template for the SonataFlowBuild
displayName: build
path: build
- description: Configuration list of configuration properties to be attached
to all the Workflow built from this Platform
displayName: configuration
path: configuration
- description: DevBaseImage Base image to run the Workflow in dev mode instead
of the operator's default. Optional, used for the dev profile only
displayName: devBaseImage
path: devBaseImage
- description: BuildPlatform specify how is the platform where we want to build
the Workflow
displayName: platform
path: platform
statusDescriptors:
- description: Cluster what kind of cluster you're running (ie, plain Kubernetes
or OpenShift)
displayName: cluster
path: cluster
- description: Conditions which are the conditions met (particularly useful
when in ERROR phase)
displayName: conditions
path: conditions
- description: Info generic information related to the build
displayName: info
path: info
- description: ObservedGeneration is the most recent generation observed for
this Platform.
displayName: observedGeneration
path: observedGeneration
- description: Phase defines in what phase the Platform is found
displayName: phase
path: phase
- description: Version the operator version controlling this Platform
displayName: version
path: version
Expand Down
Loading

0 comments on commit 7e0b7c9

Please sign in to comment.