-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Expose v1beta1 to the world ⛈ #2035
Conversation
The following is the coverage report on pkg/.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far! Will revisit once WIP is removed.
d0f98ff
to
8627424
Compare
… so close… 😓 |
2b4e209
to
f7fee33
Compare
/retest |
e81c715
to
3874ceb
Compare
/retest |
013633a
to
1a66080
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom, sbwsg 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 |
518a851
to
9219e13
Compare
9219e13
to
d28aed9
Compare
/hold cancel |
Needs rebase :S |
Signed-off-by: Vincent Demeester <[email protected]>
With this commit, the reconcilers (PipelineRun and TaskRun) now uses the v1alpha2 part of the struct instead of the old one. In a gist, this means - `TaskRun.Inputs.Params` becomes `TaskRun.Params` - `TaskRun.Inputs.Resources` becomes `TaskRun.Resources.Inputs` - `TaskRun.Outputs.Resources` becomes `TaskRun.Resources.Outputs` Kubernetes can only store one version of the CRD, and before 1.17 does not support conversion webhook per-se. *Note* that once we have conversion webhook it will be simpler ; support for conversion webhook should land soon-ish in knative.dev/pkg which will allow us to easily switch to it. > 1. Pick a conversion strategy. Since custom resource objects need to > be able to be served at both versions, that means they will > sometimes be served at a different version than their storage > version. In order for this to be possible, the custom resource > objects must sometimes be converted between the version they are > stored at and the version they are served at. If the conversion > involves schema changes and requires custom logic, a conversion > webhook should be used. If there are no schema changes, the default > None conversion strategy may be used and only the apiVersion field > will be modified when serving different versions. > 2. If using conversion webhooks, create and deploy the conversion > webhook. See the Webhook conversion for more details. As written above, we can only store one version on the CRD and we want to serve multilple. To keep the latest API the cleanest (here `v1alpha2`), we are using `v1alpha1` and making sure that `v1alpha1` struct are compatible (aka a `v1alpha2` struct can be serialized in a `v1alpha1` struct so that it can be stored). This is what the auto-conversion role is : - take a version and convert it to the most recent version (here `v1alpha2`) - then store it as the lowest version (here `v1alpha1`) For the controller this means we still work with `v1alpha1` struct *but* with only the part that is compatible with `v1alpha2`. One follow-up will be to rename the `v1alpha1` field that are not used anymore, prepending them with `Deprecated`. Signed-off-by: Vincent Demeester <[email protected]>
- move current examples in `examples/v1alpha1` - copy and migrate those examples for `v1alpha1` (in `examples/v1alpha2`) Signed-off-by: Vincent Demeester <[email protected]>
d28aed9
to
ef16b2a
Compare
Let's go directly to v1beta1 and do several RC releases 👼 Signed-off-by: Vincent Demeester <[email protected]>
ef16b2a
to
7cf986d
Compare
The following is the coverage report on pkg/.
|
- name: url | ||
value: https://github.com/tektoncd/pipeline | ||
--- | ||
apiVersion: tekton.dev/v1beta1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
re-adding the lgtm so that 🤞 it merges once tests pass /lgtm |
ERMERGERD it merged. |
Changes
This exposes
v1alpha2
to the world, hooking the webhook, auto-conversion and the controller all together, addingv1alpha2
CRD version.Still to do.
e2e
testsv1beta1
/hold
Depends on #2025Closes #1526
/cc @bobcatfish @sbwsg
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
v1alpha2
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
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