Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Commit

Permalink
Remove v1alpha1 Channel (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
eclipselu authored Oct 26, 2020
1 parent 0f98edc commit b4692ad
Show file tree
Hide file tree
Showing 43 changed files with 16 additions and 2,650 deletions.
16 changes: 1 addition & 15 deletions cmd/webhook/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import (
inteventsv1 "github.com/google/knative-gcp/pkg/apis/intevents/v1"
inteventsv1alpha1 "github.com/google/knative-gcp/pkg/apis/intevents/v1alpha1"
inteventsv1beta1 "github.com/google/knative-gcp/pkg/apis/intevents/v1beta1"
"github.com/google/knative-gcp/pkg/apis/messaging"
messagingv1alpha1 "github.com/google/knative-gcp/pkg/apis/messaging/v1alpha1"
messagingv1beta1 "github.com/google/knative-gcp/pkg/apis/messaging/v1beta1"
"k8s.io/apimachinery/pkg/runtime/schema"
"knative.dev/eventing/pkg/logconfig"
Expand All @@ -59,8 +57,7 @@ var types = map[schema.GroupVersionKind]resourcesemantics.GenericCRD{
brokerv1beta1.SchemeGroupVersion.WithKind("Broker"): &brokerv1beta1.Broker{},

// For group messaging.cloud.google.com.
messagingv1alpha1.SchemeGroupVersion.WithKind("Channel"): &messagingv1alpha1.Channel{},
messagingv1beta1.SchemeGroupVersion.WithKind("Channel"): &messagingv1beta1.Channel{},
messagingv1beta1.SchemeGroupVersion.WithKind("Channel"): &messagingv1beta1.Channel{},

// For group events.cloud.google.com.
eventsv1alpha1.SchemeGroupVersion.WithKind("CloudStorageSource"): &eventsv1alpha1.CloudStorageSource{},
Expand Down Expand Up @@ -191,8 +188,6 @@ func newConversionController(ctx context.Context, cmw configmap.Watcher, brokers
eventsv1alpha1_ = eventsv1alpha1.SchemeGroupVersion.Version
eventsv1beta1_ = eventsv1beta1.SchemeGroupVersion.Version
eventsv1_ = eventsv1.SchemeGroupVersion.Version
messagingv1alpha1_ = messagingv1alpha1.SchemeGroupVersion.Version
messagingv1beta1_ = messagingv1beta1.SchemeGroupVersion.Version
inteventsv1alpha1_ = inteventsv1alpha1.SchemeGroupVersion.Version
inteventsv1beta1_ = inteventsv1beta1.SchemeGroupVersion.Version
inteventsv1_ = inteventsv1.SchemeGroupVersion.Version
Expand Down Expand Up @@ -274,15 +269,6 @@ func newConversionController(ctx context.Context, cmw configmap.Watcher, brokers
inteventsv1_: &inteventsv1.Topic{},
},
},
// messaging
messagingv1alpha1.Kind("Channel"): {
DefinitionName: messaging.ChannelsResource.String(),
HubVersion: messagingv1alpha1_,
Zygotes: map[string]conversion.ConvertibleObject{
messagingv1alpha1_: &messagingv1alpha1.Channel{},
messagingv1beta1_: &messagingv1beta1.Channel{},
},
},
},
ctxFunc,
)
Expand Down
2 changes: 1 addition & 1 deletion config/core/configmaps/br-default-channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ metadata:
namespace: cloud-run-events
data:
channelTemplateSpec: |
apiVersion: messaging.cloud.google.com/v1alpha1
apiVersion: messaging.cloud.google.com/v1beta1
kind: Channel
3 changes: 1 addition & 2 deletions config/core/resources/channel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ spec:
versions:
- &version
name: v1alpha1
# TODO: Flip served bit of v1alpha1 in https://github.com/google/knative-gcp/issues/1544.
served: true
served: false
storage: false
subresources:
status: {}
Expand Down
4 changes: 2 additions & 2 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ chmod +x "${CODEGEN_PKG}"/generate-groups.sh
# instead of the $GOPATH directly. For normal projects this can be dropped.
"${CODEGEN_PKG}"/generate-groups.sh "deepcopy,client,informer,lister" \
github.com/google/knative-gcp/pkg/client github.com/google/knative-gcp/pkg/apis \
"messaging:v1alpha1 messaging:v1beta1 events:v1alpha1 events:v1beta1 events:v1 broker:v1beta1 intevents:v1alpha1 intevents:v1beta1 intevents:v1" \
"messaging:v1beta1 events:v1alpha1 events:v1beta1 events:v1 broker:v1beta1 intevents:v1alpha1 intevents:v1beta1 intevents:v1" \
--go-header-file "${REPO_ROOT_DIR}"/hack/boilerplate/boilerplate.go.txt

# Knative Injection
chmod +x "${KNATIVE_CODEGEN_PKG}"/hack/generate-knative.sh
"${KNATIVE_CODEGEN_PKG}"/hack/generate-knative.sh "injection" \
github.com/google/knative-gcp/pkg/client github.com/google/knative-gcp/pkg/apis \
"messaging:v1alpha1 messaging:v1beta1 events:v1alpha1 events:v1beta1 events:v1 duck:v1alpha1 duck:v1beta1 duck:v1 broker:v1beta1 intevents:v1alpha1 intevents:v1beta1 intevents:v1" \
"messaging:v1beta1 events:v1alpha1 events:v1beta1 events:v1 duck:v1alpha1 duck:v1beta1 duck:v1 broker:v1beta1 intevents:v1alpha1 intevents:v1beta1 intevents:v1" \
--go-header-file "${REPO_ROOT_DIR}"/hack/boilerplate/boilerplate.go.txt

# Deep copy configs.
Expand Down
87 changes: 0 additions & 87 deletions pkg/apis/messaging/v1alpha1/channel_conversion.go

This file was deleted.

160 changes: 0 additions & 160 deletions pkg/apis/messaging/v1alpha1/channel_conversion_test.go

This file was deleted.

67 changes: 0 additions & 67 deletions pkg/apis/messaging/v1alpha1/channel_defaults.go

This file was deleted.

Loading

0 comments on commit b4692ad

Please sign in to comment.