operator icon indicating copy to clipboard operation
operator copied to clipboard

Automatically bump Helm chart for new releases

Open jacksgt opened this issue 3 years ago • 6 comments

The Helm chart introduced in XXX should automatically be bumped whenever there is a new operator release. (i.e. version number and image tags should be updated)

jacksgt avatar May 20 '22 10:05 jacksgt

I'm happy to tackle this issue after someone explains to me how the release flow works.

I see there are lots of scripts in ./hack but I'm not sure how they work together.

jacksgt avatar May 20 '22 10:05 jacksgt

at present the release flow is as follows.

  1. a maitainer runs this script: https://github.com/tektoncd/operator/blob/bed3d6308c6682700ba05d00e88d8d5eaf8a976a/hack/release-setup-branch.sh#L7 this script will: a. create release branch b. query and lists recent releases from projects like pipelines, triggers and lets the script runner chose 1 (fzf). c. record selected versions in test/config.sh d. changes devel label in all resources to a v.x.y.z label e. updates some platform specific resources. eg; pull some tasks for OpenShift builds f. commit changes and push release branch to tektoncd/operator g. print out pipelinerun commands (eg: here) to be run on tektoncd/plumbing cluster to create builds and make a github release

  2. run the release pipeline on plumbing cluster to build the images and release.yaml

  3. run the create release draft on plumbing cluster to create a github release.

the release pipelines and tasks are here

nikhil-thomas avatar May 25 '22 03:05 nikhil-thomas

May be the place to add changes for helm is between step 1.e and 1.f.

However, the challenge we might face is that the image references are created only during the release pipelineRun. So if we add a manifest in the helm chart which is updated before we run the release pipeline, then the image references (for operator contoller and webhook) will break.

We face the same challenge with creating update release artifacts (bundle) for operatorhub. I believe the solution for both helm chart and operator hub bundle is to add 2 more stages to our release pipeline.

That is after the release images are build and release.yaml are pushed to gcs bucket. We could run a task which updates the helm chart and pushes it to known public helm chart repository.

Similary we can add a task at the end of release pipeline, which creates an up to date operator bundle and push it to operatorhub.

note: this means that the helm chart and operator bundle in the git tree will be always outdated. The latest helm chart and operator bundle will be available publically from a helm char repository and operatorhub.

🧑‍💻👉 the tasks/steps could go before this task or after this step

🧑‍💻👉 at present runing the full release pipeline on a k8s cluster (1 core, 3.75gb nodes) will take roughly 1h. sometimes i create ephemeral 24core, 20gb clusters to get the outcome in ~5mins when im iteratively developing the release pipeline 🧑‍💻.

nikhil-thomas avatar May 25 '22 03:05 nikhil-thomas

Hi @nikhil-thomas ,

thanks for taking the time and writing all this info down! (Maybe you can also copy-paste this info into release-cheat-sheet.md?)

I followed your guidelines and came up with a draft PR. Please take a look when you have time: https://github.com/tektoncd/operator/pull/816 (I'm sure it's not fully functional yet, but I first want to have confirmation that I'm going in the right direction :-) )

jacksgt avatar May 31 '22 07:05 jacksgt

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale with a justification. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

tekton-robot avatar Aug 29 '22 08:08 tekton-robot

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten with a justification. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle rotten

Send feedback to tektoncd/plumbing.

tekton-robot avatar Sep 28 '22 08:09 tekton-robot

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

tekton-robot avatar Oct 28 '22 08:10 tekton-robot

@tekton-robot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen with a justification. Mark the issue as fresh with /remove-lifecycle rotten with a justification. If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/close

Send feedback to tektoncd/plumbing.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

tekton-robot avatar Oct 28 '22 08:10 tekton-robot