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

Reflect tektoncd/pipeline release version as an annotation on pod #1758

Merged
merged 1 commit into from
Jan 6, 2020

Conversation

waveywaves
Copy link
Member

@waveywaves waveywaves commented Dec 17, 2019

Signed-off-by: Vibhav Bobade [email protected]

Changes

Based on suggesstion in knative/pkg#948 have opened this PR as an alternative fix for reflecting the release version for tektoncd/pipline.

This solution reflects the version as value to the annotation tekton.dev/release on the controller pod.

Followup of #1650 and tektoncd/cli#503

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Double check this list of stuff that's easy to miss:

Reviewer Notes

If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.

Release Notes

tekton.dev/release annotation will be added to all pods created by the controller which would let us know what release of tekton is running. 
Controller Pod and Pods in general should have the following annotation after subsequent release
tekton.dev/release: <version tag>

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Dec 17, 2019
@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 17, 2019
@tekton-robot
Copy link
Collaborator

Hi @waveywaves. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 17, 2019
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 17, 2019
pkg/pod/pod.go Outdated
@@ -42,6 +43,9 @@ const (

// These are effectively const, but Go doesn't have such an annotation.
var (
releaseAnnotation = "tekon.dev/release"
Copy link
Member

Choose a reason for hiding this comment

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

Tekon - > tekton

@afrittoli
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 17, 2019
Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

This approach looks interesting! Have a couple of questions/requests:

@waveywaves
Copy link
Member Author

@dibyom Thanks for chekcing this out. I was planning on also adding it to the controller yaml file and then overriding the value there during build/release, similar to what has been done in knative/serving.

@afrittoli
Copy link
Member

@dibyom Thanks for chekcing this out. I was planning on also adding it to the controller yaml file and then overriding the value there during build/release, similar to what has been done in knative/serving.

Thanks!
I wonder if we should set the annotation on all resources i.e. Task, Pipelines, TaskRuns, PipelineRuns, Conditions, PipelineResources?
I'm not sure if the annotation would be cascaded to the pod then.
It might be useful though to know that a certain resource was created with a specific version of Tekton, when doing upgrades. @vdemeester thoughts?

@vdemeester
Copy link
Member

I wonder if we should set the annotation on all resources i.e. Task, Pipelines, TaskRuns, PipelineRuns, Conditions, PipelineResources?
I'm not sure if the annotation would be cascaded to the pod then.
It might be useful though to know that a certain resource was created with a specific version of Tekton, when doing upgrades. @vdemeester thoughts?

I think it would cascade to the pod. Honestly I think it's a nice to have to know which version of Tekton did create a certain resource, so I am 👍 on having the annotation on all the things — it doesn't cost too much either 👼 .

/cc @bobcatfish

pkg/pod/entrypoint.go Outdated Show resolved Hide resolved
pkg/pod/pod.go Outdated Show resolved Hide resolved
@waveywaves waveywaves force-pushed the update/release-label branch 4 times, most recently from 26ea656 to 97f5e07 Compare December 20, 2019 10:17
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 20, 2019
@chmouel
Copy link
Member

chmouel commented Dec 30, 2019

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 30, 2019
@vdemeester
Copy link
Member

@waveywaves needs a rebase 👼

@waveywaves waveywaves force-pushed the update/release-label branch from 51a1d6e to 7549c69 Compare January 3, 2020 03:43
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2020
@waveywaves
Copy link
Member Author

@chmouel @vdemeester Done !

@waveywaves
Copy link
Member Author

/retest

As a followup to tektoncd#1650 ,
the `tekton.dev/release` annotation is set on the pod to reflect
the value of version.PipelineVersion

Signed-off-by: Vibhav Bobade <[email protected]>
@waveywaves waveywaves force-pushed the update/release-label branch from 7549c69 to c60516e Compare January 6, 2020 05:04
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 6, 2020
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants