8000 remove pingsource v1alpha1 by lionelvillard · Pull Request #3837 · knative/eventing · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

remove pingsource v1alpha1 #3837

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ var ourTypes = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
// For group sources.knative.dev.
// v1alpha1
sourcesv1alpha1.SchemeGroupVersion.WithKind("ApiServerSource"): &sourcesv1alpha1.ApiServerSource{},
sourcesv1alpha1.SchemeGroupVersion.WithKind("PingSource"): &sourcesv1alpha1.PingSource{},
sourcesv1alpha1.SchemeGroupVersion.WithKind("SinkBinding"): &sourcesv1alpha1.SinkBinding{},
// v1alpha2
sourcesv1alpha2.SchemeGroupVersion.WithKind("ApiServerSource"): &sourcesv1alpha2.ApiServerSource{},
Expand Down
10 changes: 3 additions & 7 deletions config/core/resources/pingsource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ spec:
group: sources.knative.dev
versions:
- &version
name: v1alpha1
served: false
storage: false
name: v1alpha2
served: true
storage: true
subresources:
status: {}
schema:
Expand All @@ -57,10 +57,6 @@ spec:
- name: Reason
type: string
jsonPath: ".status.conditions[?(@.type=='Ready')].reason"
- << : *version
name: v1alpha2
served: true
storage: true
- <<: *version
name: v1beta1
served: true
Expand Down
13 changes: 13 additions & 0 deletions pkg/apis/sources/v1alpha1/apiserver_conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1alpha1

import (
"context"
"errors"
"reflect"
"testing"

Expand All @@ -33,6 +34,18 @@ import (
duckv1 "knative.dev/pkg/apis/duck/v1"
)

// TODO: Replace dummy some other Eventing object once they
// implement apis.Convertible
type dummy struct{}

func (*dummy) ConvertTo(ctx context.Context, obj apis.Convertible) error {
return errors.New("Won't go")
}

func (*dummy) ConvertFrom(ctx context.Context, obj apis.Convertible) error {
return errors.New("Won't go")
}

func TestApiServerSourceConversionBadType(t *testing.T) {
good, bad := &ApiServerSource{}, &dummy{}

Expand Down
2 changes: 0 additions & 2 deletions pkg/apis/sources/v1alpha1/implements_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ func TestTypesImplements(t *testing.T) {
instance interface{}
iface duck.Implementable
}{
// PingSource
{instance: &PingSource{}, iface: &duckv1.Conditions{}},
// ApiServerSource
{instance: &ApiServerSource{}, iface: &duckv1.Conditions{}},
// SinkBinding
Expand Down
88 changes: 0 additions & 88 deletions pkg/apis/sources/v1alpha1/ping_conversion.go

This file was deleted.

Loading
0