eclipse-openj9 / openj9-utils

Other
16 stars 29 forks source link

Helm Chart: Version upgrade for new OpenJ9 releases #46

Open chrisc66 opened 3 years ago

chrisc66 commented 3 years ago

The JITServer helm chart version needs to follow every OpenJ9 release to include the latest Adopt release images. This issue keeps track of changes that need to be applied to the helm chart.

There are three files that require updates for every version upgrade.

chrisc66 commented 3 years ago

This comment summarizes the changes need to be applied to values.yaml. Using version upgrade from 0.24 to 0.25 as an example.

This file contains the image repository and tag that the helm chart pulls and deploys. The image tag needs to match the latest OpenJ9 release image on Adopt Docker Hub.

chrisc66 commented 3 years ago

This comment summarizes the changes need to be applied to Chart.yaml. Using version upgrade from 0.24 to 0.25 as an example.

Once the image tag is updated and points to the latest release image, the chart version needs to be updated. This file contains the helm chart metadata, which includes version and appVersion. We have decided to keep these two fields same for consistency in the previous discussion.

chrisc66 commented 3 years ago

This comment summarizes the changes need to be applied to index.yaml. Using version upgrade from 0.24 to 0.25 as an example.

Once above two changes are applied, the next step is to package the helm chart into binary files, then point index.yaml to the new chart with updated version.

  1. Have helm CLI v3.x installed.

  2. Package helm chart directory into a binary file.

    root@mucked1:~/JITServer/openj9-utils/helm-chart# helm package openj9-jitserver-chart/
    Successfully packaged chart and saved it to: /root/JITServer/openj9-utils/helm-chart/openj9-jitserver-chart-0.25.0.tgz

    This generates the packaged binary helm chart with format of openj9-jitserver-chart-VERSION.tgz.

    root@mucked1:~/JITServer/openj9-utils/helm-chart# ls
    index.yaml  openj9-jitserver-chart  openj9-jitserver-chart-0.25.0.tgz
  3. Upload the binary helm chart to the PR for version upgrades. See example. Record the URL to binary helm chart, which will be used in the next step as URL_TO_BINARY_CHART. Delete the binary helm chart from local directory and do not include the binary chart in git commit.

  4. Generate the new index.yaml.

    root@mucked1:~/JITServer/openj9-utils/helm-chart# helm repo index --merge index.yaml --url URL_TO_BINARY_CHART .

    This generates the index for the new version with URL of the uploaded binary chart, then automatically merges into index.yaml. Note: The copyright header will be removed, and needs to be added back manually.