Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm Chart: Version upgrade for new OpenJ9 releases #46

Open
chrisc66 opened this issue Mar 13, 2021 · 3 comments
Open

Helm Chart: Version upgrade for new OpenJ9 releases #46

chrisc66 opened this issue Mar 13, 2021 · 3 comments

Comments

@chrisc66
Copy link
Contributor

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.

  • values.yaml
  • Chart.yaml
  • index.yaml
@chrisc66
Copy link
Contributor Author

chrisc66 commented Mar 13, 2021

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.

  • Old version is using 0.24 image tag
image:
  repository: adoptopenjdk
  tag: 8u282-b08-jdk-openj9-0.24.0
  pullPolicy: Always
  • Update to 0.25 image tag
image:
  repository: adoptopenjdk
  tag: 0.25_IMAGE_TAG
  pullPolicy: Always

@chrisc66
Copy link
Contributor Author

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.

  • Old version from 0.24 chart
version: 0.24.0
appVersion: 0.24.0
  • Update two version fields to 0.25
version: 0.25.0
appVersion: 0.25.0

@chrisc66
Copy link
Contributor Author

chrisc66 commented Mar 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants