Today we have the KogitoApp CR to enable persistence and events like this:
apiVersion: app.kiegroup.org/v1alpha1 kind: KogitoApp metadata: name: example-quarkus spec: infra: installInfinispan: Always installKafka: Always build: envs: - name: MAVEN_ARGS_APPEND value: "-Ppersistence,events" gitSource: contextDir: jbpm-quarkus-example uri: 'https://github.com/kiegroup/kogito-examples'
Instead of relying on implementation, I propose a change focused on the capability, aligned with the Runtimes add-ons:
apiVersion: app.kiegroup.org/v1alpha1 kind: KogitoApp metadata: name: example-quarkus spec: enablePersistence: true enableEvents: true build: envs: - name: MAVEN_ARGS_APPEND value: "-Ppersistence,events" gitSource: contextDir: jbpm-quarkus-example uri: 'https://github.com/kiegroup/kogito-examples'
So the CLI will be more aligned with the Runtime Services as well like:
kogito deploy example-service --enable-persistence --enable-events
The feature won't change, meaning that if it's not enabled, the user is responsible to deploy their persistence implementation and configure their deployed service. If enabled, the Operator will deploy and configure Infinispan and Kafka for the given service.