While updating an image is as simple as updating the version number, you may sometimes want to update your jar (for example to include a bug fix) without pushing a new image.
Updating your jar is called "patching" and here's the procedure to follow.
Updating a Stormline jar is basically updating a command-app jar. You'll need :
- To upload your new jar as a resource.
- To reference this resource in the
dependenciessettings of your stormline.
- To update your pod/stormline so that the new jar is taken into account.
To upload your new jar as a resource, you'll need to create a metadata file. Here's a basic example :
type: patch group: org.thales.punch version: <version> artifact: punch-command-app description: Patched Command Jar
You can then start the upload using
resourcectl --url <resource-manager-url> upload -f <patch-path>
To check that your jar is correctly uploaded, you can run :
resourcectl --url <resource-manager-url> list
You should see your patched jar listed.
You now need to reference this resource in the dependencies section of your stormline configuration.
dependencies: - patch:org.thales.punch:punch-command-app:<version>
patch type is the key here. Before starting the stormline, resourcectl will download a
patch resource in a
specific patch directory. Stormline will then use this patch directory instead of the default one.
You can now delete your stormline :
kubectl delete stormline/<name> -n <namespace>
And apply your new configuration :
kubectl apply -f <config-path> -n <namespace>