wmedvede commented on PR #2790:
URL: 
https://github.com/apache/incubator-kie-tools/pull/2790#issuecomment-2692103188

   @rhkp 
   **Persistence configuration at the SonataFlowPlatform not working:**
   
   When we configure a platform like below, the migrator job creation procedure 
is calculating wrong the namespaces for the ID and JS respectively.
   
   ```
   apiVersion: sonataflow.org/v1alpha08
   kind: SonataFlowPlatform
   metadata:
     name: sonataflow-platform
   spec:
     services:
       dataIndex:
         enabled: true
         persistence:
           dbMigrationStrategy: job
         podTemplate:
           initContainers:
             - name: init-postgres
               image: registry.access.redhat.com/ubi9/ubi-minimal:latest
               imagePullPolicy: IfNotPresent
               command: [ 'sh', '-c', 'until (echo 1 > /dev/tcp/postgres.$(cat 
/var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local/5432)
 >/dev/null 2>&1; do echo "Waiting for postgres server"; sleep 3; done;' ]
       jobService:
         enabled: true
         persistence:
           dbMigrationStrategy: job
         podTemplate:
           initContainers:
             - name: init-postgres
               image: registry.access.redhat.com/ubi9/ubi-minimal:latest
               imagePullPolicy: IfNotPresent
               command: [ 'sh', '-c', 'until (echo 1 > /dev/tcp/postgres.$(cat 
/var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local/5432)
 >/dev/null 2>&1; do echo "Waiting for postgres server"; sleep 3; done;' ]
     persistence:
       postgresql:
         secretRef:
           name: postgres-secrets
           userKey: POSTGRESQL_USER
           passwordKey: POSTGRESQL_PASSWORD
         serviceRef:
           name: postgres
           databaseName: sonataflow
   ```
   
   Migrator job generator configures this:
   
   
![image](https://github.com/user-attachments/assets/5019473b-2007-43aa-b137-bddf6168bad7)
   
   The regular deployment procedure in that particular use case calculates this 
for each service:
   
   
   
![image](https://github.com/user-attachments/assets/3caa7ffb-92b2-478a-9143-d8d7f49fe102)
   
   
![image](https://github.com/user-attachments/assets/b2d79116-0f9c-45d6-8627-7cf3df502025)
   
   


-- 
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]

Reply via email to