Upgrade pingsource storage to v1alpha2#3274
Conversation
mattmoor
left a comment
There was a problem hiding this comment.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
|
The following jobs failed:
Failed non-flaky tests preventing automatic retry of pull-knative-eventing-integration-tests: |
mattmoor
left a comment
There was a problem hiding this comment.
Produced via:
gofmt -s -w $(find -path './vendor' -prune -o -path './third_party' -prune -o -type f -name '*.go' -print)
| pingsourceinformer "knative.dev/eventing/pkg/client/injection/informers/sources/v1alpha1/pingsource" | ||
| pingsourcereconciler "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha1/pingsource" | ||
| "knative.dev/eventing/pkg/apis/sources/v1alpha2" | ||
| "knative.dev/pkg/client/injection/kube/informers/rbac/v1/rolebinding" |
There was a problem hiding this comment.
Format Go code:
| "knative.dev/pkg/client/injection/kube/informers/rbac/v1/rolebinding" |
| pingsourcereconciler "knative.dev/eventing/pkg/client/injection/reconciler/sources/v1alpha2/pingsource" | ||
| kubeclient "knative.dev/pkg/client/injection/kube/client" | ||
| deploymentinformer "knative.dev/pkg/client/injection/kube/informers/apps/v1/deployment" | ||
| "knative.dev/pkg/client/injection/kube/informers/core/v1/serviceaccount" |
There was a problem hiding this comment.
Format Go code:
| "knative.dev/pkg/client/injection/kube/informers/core/v1/serviceaccount" | |
| "knative.dev/pkg/client/injection/kube/informers/core/v1/serviceaccount" | |
| "knative.dev/pkg/client/injection/kube/informers/rbac/v1/rolebinding" |
72beb86 to
6c90da6
Compare
| - name: v1alpha1 | ||
| served: true | ||
| storage: true | ||
| served: false |
There was a problem hiding this comment.
Does this work like this? I thought you needed both v1alpha1 / v1alpha2 to be served since the storage migration reads v1alpha1 then upgrades to v1alpha2, so if you remove the serving, not sure it will work?
There was a problem hiding this comment.
served: false means you cannot do kubeclt get pingsources.v1alpha1.sources.knative.dev but kubeclt get pingsources.sources.knative.dev works because of the conversion webhook. Anyway I don't know the details but it works
There was a problem hiding this comment.
Hm, ok, well, wow, I'm really confused then :) I thought it would exactly use the pingsources.v1alpha1.sources.knative.dev (as in versioned read) of v1alpha1, then patch using v1alpha2. I think pingsources.sources.knative.dev will give you the v1alpha2 already converted. But, if you've already verified that the actual conversion happens and the storage version gets bumped, 👍
There was a problem hiding this comment.
The migration tools list all resources and perform an empty patch which triggers a migration on the K8s API server.
I did it twice and it works.
d7b6485 to
3d8803b
Compare
| @@ -0,0 +1 @@ | |||
| core/roles/pingsource-adapter-clusterrole.yaml No newline at end of file | |||
There was a problem hiding this comment.
Add trailing newline:
| core/roles/pingsource-adapter-clusterrole.yaml | |
| core/roles/pingsource-adapter-clusterrole.yaml | |
|
The following is the coverage report on the affected files.
|
|
ping |
|
/lgtm Are there any documentation related tasks that should be done as part of this, or did they all get resolved when the API was upgraded. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lionelvillard, vaikas The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposed Changes
Release Note
Docs