Closed sameh-farouk closed 3 years ago
Verified jsdk d727cf38b244c2bfd489 it is working now as expected.
JS-NG> from jumpscale.packages.vdc_dashboard.services.upgrade_traefik import UpgradeTraefik
JS-NG> UpgradeTraefik().job()
2021-09-08 15:11:04.730 | DEBUG | jumpscale.sals.kubernetes.manager:_execute:45 - kubernetes manager: helm list -A -o json
2021-09-08 15:11:05.836 | INFO | jumpscale.packages.vdc_dashboard.services.upgrade_traefik:job:20 - Upgrade Traefik Service:: Traefik using latest version 9.20.1
this was possibly the cause of #3270 too
closes as it was fixed in #3274 and verified.
Description
helm doesn't provide a straightforward way to install a chart based on a specific app version.
as the current implementation of
upgrade_traefik
we use a constant that refers to a specific app version, then in our case, we are just updating the image tag used for the Traefik container (overriding the value used elsewhere in the chart to set the container version). this is works to some degree but with drawbacks.the first con, this doesn't update the APP VERSION listed in the output of
helm ls
to find what is really deployed and running, we can describe the Traefik deployment:
so now we have our desired version, however every time the service will run and check whether the Traefik needs to update or not, it will always decide to uninstall and reinstall our desired version again although it was already installed.
this could be fixed by getting the container version for
kubectl
, however, there is another drawback using the app version to check and upgrade Traefik, which it is not convenient to upgrade to a specific chart version if it uses the same app version as a previous chart. the newer chart could have a fix we need but use the same app version. so if there are multiple chart releases with the same app version and given an app version, there is no straightforward way to tell what is the desired chart to install.as a real example, all these Traefik charts
10.0.0
,10.0.1
,10.0.2
,10.1.0
,10.1.1
all use same Trefik app version which is2.4.9
.an implementation suggestion:
we should update the implementation to incorporate a chart version instead of the app version. and install the chart using
helm
--version
option.Version information
Steps to reproduce
1 - import the UpgradeTraefik service and invoke the job method. it will always try to uninstall the current version and reinstall it.
2- note the app version report by the service (or the upgrade_traefic method). it will be incorrect. 5- note the app version reported by
helm list
. it is incorrect, due to the reason clarified above. 6- to check the actual app version deployed and running, you can describe Traefik deployment.Traceback/Logs/Alerts