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

push images to quay.io with canary tag #302

Merged
merged 1 commit into from
Apr 29, 2019

Conversation

Madhu-1
Copy link
Collaborator

@Madhu-1 Madhu-1 commented Apr 4, 2019

updated deploy.sh script to push images to quay.io with canary tag.
Once we merge a PR against master and csi-v0.3 branches we need to build and push the latest
image with canary tag. by doing this we can avoid the accidental update of the images which
are already deployed with stable tags (i.e v1.0.0 or v0.3.0).

Signed-off-by: Madhu Rajanna madhupr007@gmail.com

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Apr 4, 2019

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Apr 4, 2019

#266

@humblec
Copy link
Collaborator

humblec commented Apr 4, 2019

Lgtm. Thanks

Copy link
Contributor

@ShyamsundarR ShyamsundarR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with the changes, just a couple of questions/suggestions.

Further, shouldn't we change the deploy script in the 0.3 branch for the canary to take effect, as any PR merged to that branch would use the deploy script from its branch and hence the change needs to be reflected there as well?

@@ -17,10 +17,10 @@
CONTAINER_CMD?=docker

RBD_IMAGE_NAME=$(if $(ENV_RBD_IMAGE_NAME),$(ENV_RBD_IMAGE_NAME),quay.io/cephcsi/rbdplugin)
RBD_IMAGE_VERSION=$(if $(ENV_RBD_IMAGE_VERSION),$(ENV_RBD_IMAGE_VERSION),v1.0.0)
RBD_IMAGE_VERSION=$(if $(ENV_RBD_IMAGE_VERSION),$(ENV_RBD_IMAGE_VERSION),v1.0.0-canary)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) should the defaults be something else other than canary? like "test" or "dev" or so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

canary looks fine for me.

am not sure about the changes in 0.3 branch, people like @rootfs @gman0 who is having more idea on this can answer the question

deploy.sh Outdated
export CEPHFS_IMAGE_VERSION='v0.3.0-canary'
elif [ "${TRAVIS_BRANCH}" == 'master' ]; then
export RBD_IMAGE_VERSION='v1.0.0-canary'
export CEPHFS_IMAGE_VERSION='v1.0.0-canary'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Question) What happens to Helm charts, do these get canary versions as well automatically when they are pushed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helm chats will be pushed only if there is a change in version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried joining the dots, but was unable to, so here are my questions,

  • Assume we do 'canary' builds for the plugins, and one of the PRs changed the version in the helm charts, how will this be published here, for use with the appropriate plugin version?

  • When we make a release, i.e move a version out of 'canary', we would need to push the helm charts for that release as well, even if there are no changes, right?

  • As a user, how do I know which helm chart brings in what release of the plugins into my cluster?

Copy link
Collaborator Author

@Madhu-1 Madhu-1 Apr 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried joining the dots, but was unable to, so here are my questions,

  • Assume we do 'canary' builds for the plugins, and one of the PRs changed the version in the helm charts, how will this be published here, for use with the appropriate plugin version?

this is not there yet to figure out which helm version is support for ce[h-csi version, need to figure it out.

  • When we make a release, i.e move a version out of 'canary', we would need to push the

helm charts for that release as well, even if there are no changes, right?
if we are including the helm chats in the release, yes we have to

  • As a user, how do I know which helm chart brings in what release of the plugins into my cluster?

need to add a document section for this one, one thing what we can do is we can have the same release version number for helm chat and csi plugin

Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit confusing to apply a -canary name on a tagged version, I think it's confusing become people won't probably realize that v0.3 is not the ceph-csi version but the csi spec version.
I believe we should rethink that a little bit.

What's the strategy to let's say push a new version of our ceph-csi driver for the csi v0.3 spec. Are we going to increment? v0.3.x?

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Apr 4, 2019

It's a bit confusing to apply a -canary name on a tagged version, I think it's confusing become people won't probably realize that v0.3 is not the ceph-csi version but the csi spec version.
I believe we should rethink that a little bit.

added -canary at last to avoid tagging canary for both v0.3.0 and v1.0.0 images.
any suggestion for image tag?

What's the strategy to let's say push a new version of our ceph-csi driver for the csi v0.3 spec. Are we going to increment? v0.3.x?
i think we need to increment the tag, once we do the new releases

@leseb
Copy link
Member

leseb commented Apr 4, 2019

It's uggly but typically a tag for ceph-csi might look like REPO/IMAGE:CSI_SPEC_VERSION-CEPH_CSI_VERSION, which might translate to:

ceph/csi-rbd:v0.3.0-v0.1.0.

With that we can easily increment like ...-v0.1.1, ...-v0.1.2 and also have a latest version such as: ceph/csi-rbd:v0.3.0-latest.

@ShyamsundarR
Copy link
Contributor

It's uggly but typically a tag for ceph-csi might look like REPO/IMAGE:CSI_SPEC_VERSION-CEPH_CSI_VERSION, which might translate to:

ceph/csi-rbd:v0.3.0-v0.1.0.

With that we can easily increment like ...-v0.1.1, ...-v0.1.2 and also have a latest version such as: ceph/csi-rbd:v0.3.0-latest.

It is useful to have a CSI version and then the ceph-csi plugin version, so what is suggested above looks good.

latest would point to latest released version, right?

What about per PR builds per version, this is where IMO the canary for that version helps for whoever wants to test/use the bleeding edge. IOW, like what is used in kubernetes-csi.

We can again adopt (or use our own rules) as to when a canary is released, and we up the "z" version for the next release.

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Apr 5, 2019

@ShyamsundarR @leseb IMO we can follow REPO/IMAGE:CSI_SPEC_VERSION-CEPH_CSI_VERSION for the ceph-csi release version.
I think we can have canary as the image tag for PR build version
any other suggestions?

@ShyamsundarR
Copy link
Contributor

With the possibility that in the future we maybe compatible to multiple CSI spec versions with the same plugin binaries, I now think we should NOT specialize our plugin version using the CSI spec that it supports. Instead we can call out a supported version matrix on the README.md and retain the compatibility information there. This seems like a more prudent approach at the moment.

Considering this, versioning and other process artifacts can look as follows,

RELEASE-VER: vx.y.z

  • z +1 for minor releases
  • y +1 for major releases
  • x +1 for breaking change type releases

Branch: csi-v0.3

  • Version value is: v0.3
  • Minor-Version is: 0
  • Latest is: v0.3-latest (points to) v0.3.0
  • Next-minor value is: 1
  • Per PR revision: never pushed to the image repository
  • Per PR merge version: update v0.3-canary image
    • What happens when 2 PRs merge at the same time, is there a guarantee that the latter job publishes the images after the former PR job?
  • Per release candidate release: v0.3.1-rci (i: 0..n) (or, Version.Next-minor-rci)
    • Or, rethink RCs as alpha, beta and final version?
  • When released:
    • Minor-Version becomes: 1
    • Latest moves: v0.3-latest (points to) v0.3.1
    • Next-minor value is: 2

NOTE: All future branches adopt the same strategy as above. Branches are created per major (or above) release number changes.

Branch: master

  • Version: no current version as master is for the next release
  • Latest: no latest image, as there is nothing stable we release from master branch
  • Next-release: v1.0.0
  • Per PR revision: never pushed to the image repository
  • Per PR merge version: canary updated (no versions with canary here)
  • When released:
    • Next-release becomes: v1.1.0 (for now at least)
  • Branching occurs just before first RC or alpha is ready to release, and hence master never has the RC related tags

This would possibly lead to the next set of questions on when releases are made, and life-cycle of releases etc. we possibly need to tackle that next.

@ShyamsundarR
Copy link
Contributor

Ping @leseb @Madhu-1 @humblec any further thoughts on this one?

@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Apr 16, 2019

whats pending on this PR? making canary tag without version for the master branch?

@ShyamsundarR
Copy link
Contributor

whats pending on this PR? making canary tag without version for the master branch?

That is one if we agree to what is proposed, I would like to understand if the proposal is fine and what we need to tune for the same?

updated deploy.sh script to push images
to quay.io with canary tag.
Once we merge a PR against master and csi-v0.3
branches we need to build and push the latest
image with canary tag. by doing this we can
avoid the accidental update of the images which
are already deployed with stable tags
(i.e v1.0.0 or v0.3.0).

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Apr 17, 2019

updated PR

@ShyamsundarR
Copy link
Contributor

@leseb @humblec @gman0 Request one of you to review and add the second approval if changes look fine, Thanks.

@humblec
Copy link
Collaborator

humblec commented Apr 24, 2019

Lgtm. Thanks

@ShyamsundarR ShyamsundarR merged commit fa40c1c into ceph:master Apr 29, 2019
Madhu-1 pushed a commit to Madhu-1/ceph-csi that referenced this pull request Jun 20, 2024
Syncing latest changes from upstream devel for ceph-csi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants