jordigilh commented on code in PR #372:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1481178920
##########
controllers/profiles/common/object_creators.go:
##########
@@ -157,7 +159,13 @@ func defaultContainer(workflow *operatorapi.SonataFlow)
(*corev1.Container, erro
if err := mergo.Merge(defaultFlowContainer,
workflow.Spec.PodTemplate.Container.ToContainer(), mergo.WithOverride); err !=
nil {
return nil, err
}
- defaultFlowContainer = ConfigurePersistence(defaultFlowContainer,
workflow.Spec.Persistence, defaultSchemaName, workflow.Namespace)
+ if workflow.Spec.Persistence != nil {
Review Comment:
The problem is that by default it will always be nil, so it will try to
retrieve from the platform. For backwards compatibility `nil` is the best
choice as it will not change the behavior in existing workflows and doesn't
require the CR to declare the field if no persistence is required.
What @ricardozanini is proposing, in my opinion is not ideal because
label/annotations are unstructured data (map of strings), whereas with a field
we can enforce validation by defining accepted values, which we own and
control. Example is the `imagePullPolicy` in the pod schema. I see
labels/annotations useful when the values can vary depending on the use case,
such as the multus network configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]