ricardozanini opened a new issue, #2601:
URL: https://github.com/apache/incubator-kie-tools/issues/2601

   Currently, users can add any open API spec files to the `specs` folder when 
they use `kn workflow create`.
   
   The problem is that those files can be huge and, when deploying to 
Kubernetes, might face the [object size 
limit](https://github.com/kubernetes/kubernetes/blob/db1990f48b92d603f469c1c89e2ad36da1b74846/test/integration/master/synthetic_master_test.go#L315).
 Source: 
https://stackoverflow.com/questions/60468110/kubernetes-object-size-limitations
   
   That said, we can add a new command to the CLI:
   
   ```shell
   # (TBD) We can explore different handlers if needed
   kn workflow specs minify openapi
   ```
   
   This command will minify the `openapi` spec files within the `specs` folder 
to the operations used by the workflows (and subflows) within the project 
context.
   
   1. Copy `openapi` specs using the pattern 
`<original-file-name>.min.yaml|json`.
   2. Cut all the operations, types, and other objects from the `min` file
   3. When deploying to the cluster, reference the `min` files instead of the 
original ones when creating the `ConfigMaps`. The `ConfigMaps` entry must use 
the original file name (since it's the reference in the `spec.flow.functions`), 
but the content should be the minified ones.
   
   Even if the user doesn't call the command manually, we should minify every 
open API spec before creating the `ConfigMaps`. The command is for users to 
debug/verify the minify process before deploying it on the cluster.
   
   > Note: don't forget also to update the relevant documentation
   
   @handreyrc, can you evaluate if the editor will be impacted? It shouldn't 
since the intellisense will still work.


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