ApiServerSource serve v1alpha2#2872
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: n3wscott 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 |
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)
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)
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)
| // v1alpha2, please use Spec.LabelSelector. | ||
| LabelSelector metav1.LabelSelector `json:"labelSelector"` | ||
|
|
||
| // ControllerSelector restricts this source to objects with a controlling owner reference of the specified kind. |
There was a problem hiding this comment.
I agree with removing ControllerSelector (redundant). Not so sure about deprecating Controller as it has a real use case. k8s sample controller does it sightly differently (see https://github.com/kubernetes/sample-controller/blob/041853156b367ba768df5cda747e653dd98a7127/controller.go#L370) by getting the controlling owner and filtering by GVK.
There was a problem hiding this comment.
I am filtering by gvk, but the owner gvk comes from spec. If you need both resources that are owned and unowned, it would be two resources.
I think next pass is to mt the source in a namespace for the same service account.
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)
|
/hold no selector on the Owner... fixing. |
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)
|
selector is gone from owner GVK and panics are removed. /unhold |
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)
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)
| @@ -18,74 +18,52 @@ package resources | |||
|
|
|||
| import ( | |||
| "fmt" | |||
There was a problem hiding this comment.
Format Go code:
| "fmt" | |
| "fmt" | |
| "testing" | |
| import ( | ||
| "fmt" | ||
| "knative.dev/pkg/kmeta" | ||
| "testing" |
There was a problem hiding this comment.
Format Go code:
| "testing" |
|
The following is the coverage report on the affected files.
|
| - name: v1alpha2 | ||
| served: false | ||
| served: true | ||
| storage: false |
There was a problem hiding this comment.
I'm confused between this and the comments. Shouldn't this be flipped to storage = true?
There was a problem hiding this comment.
it is stored as v1alpha1 still.
There was a problem hiding this comment.
it is lossy so I think we have to do that manual upgrade touch thing. So I am leaving it as v1alpha1 stored until we fix this issue as a whole
|
/lgtm The missing controller filter can always be added later if needed. |
There is a very big API change between APIServerSource v1alpha1 and v1alpha2. Because of this we are removing the implementation of v1alpha1 and only use v1alpha2. Conversion between v1alpha1 and v1alpha2 is lossy so we are going to still store at v1alpha1, but the deprecated fields in v1alpha1 are ignored.
Proposed Changes
Release Note
Docs