Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KOGITO-9218] - Update SonataFlowPlatform struct #427

Merged
merged 5 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ By default, the operator will use the image distributed upstream to run the work
[source,bash,subs="attributes+"]
----
# use `kubectl get sonataflowplatform` to get the SonataFlowPlatform name
kubectl patch sonataflowplatform <name> --patch 'spec:\n plaform:\n baseImage: <your new image full name with tag>' -n <your_namespace>
kubectl patch sonataflowplatform <name> --patch 'spec:\n build:\n config:\n baseImage: <your new image full name with tag>' -n <your_namespace>
----

=== Customize the base build Dockerfile
Expand Down Expand Up @@ -93,13 +93,14 @@ metadata:
name: sonataflow-platform
spec:
build:
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
template:
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
----

Every build process will reuse this configuration and start new instances based on it from now on.
Expand All @@ -120,10 +121,10 @@ metadata:
name: my-workflow
spec:
resources:
requests:
requests:
memory: "64Mi"
cpu: "250m"
limits:
limits:
memory: "128Mi"
cpu: "500m"
----
Expand Down Expand Up @@ -197,12 +198,13 @@ kind: SonataFlowPlatform
metadata:
name: sonataflow-platform
spec:
platform:
buildStrategyOptions:
KanikoBuildCacheEnabled: "true"
registry:
address: quay.io/kiegroup <1>
secret: regcred <2>
build:
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
registry:
address: quay.io/kiegroup <1>
secret: regcred <2>
----

<1> Your registry address
Expand All @@ -218,14 +220,15 @@ kind: SonataFlowPlatform
metadata:
name: sonataflow-platform
spec:
platform:
buildStrategyOptions:
KanikoBuildCacheEnabled: "true"
build:
config:
strategyOptions:
KanikoBuildCacheEnabled: "true"
----

[TIP]
====
The `spec.platform.buildStrategyOptions.KanikoBuildCacheEnabled` enables the internal Kaniko process to cache builder images to try to speed up the bulding execution.
The `spec.build.config.strategyOptions.KanikoBuildCacheEnabled` enables the internal Kaniko process to cache builder images to try to speed up the bulding execution.
radtriste marked this conversation as resolved.
Show resolved Hide resolved
====

You can save this file locally and run the following command:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ By default, the operator will use the image distributed upstream to run the work
[source,bash,subs="attributes+"]
----
# use `kubectl get sonataflowplatform` to get the SonataFlowPlatform name
kubectl patch sonataflowplatform <name> --patch 'spec:\n devBaseImage: <your new image full name with tag>' -n <your_namespace>
kubectl patch sonataflowplatform <name> --patch 'spec:\n devMode:\n baseImage: <your new image full name with tag>' -n <your_namespace>
----

From now on, every deployment in the development profile will use this image to run the workflow.
Expand Down