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

Backport knative pgk with addressable fix and unit test #478

Merged
merged 3 commits into from
Jul 2, 2019
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
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
102 changes: 48 additions & 54 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ required = [
unused-packages = false

[[override]]
name = "github.com/knative/pkg"
branch = "release-0.7"
name = "knative.dev/pkg"
branch = "master"

[[override]]
name = "k8s.io/api"
Expand Down Expand Up @@ -65,17 +65,13 @@ required = [

[[constraint]]
name = "github.com/knative/serving"
version = "v0.5.0"

# Bring build along for serving.
[[override]]
name = "github.com/knative/build"
version = "v0.5.0"
# HEAD as of 2019-06-26. Needed to test github.
revision = "50cdf8762deae58ed89763adef26a88e7efecac7"

[[constraint]]
name = "github.com/knative/eventing"
# HEAD as of 2019-05-12. Needed to import EventType API object.
revision = "53ee52c1292bc6f6807512a9081b9e64055f2bd2"
# HEAD as of 2019-06-26. Needed to import EventType API object.
revision = "677d3d17e84b7337f006220d6bb465af4f416f81"

[[constraint]]
name="sigs.k8s.io/controller-runtime"
Expand Down
2 changes: 1 addition & 1 deletion camel/source/cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
"github.com/knative/eventing-contrib/camel/source/pkg/apis"
"github.com/knative/eventing-contrib/camel/source/pkg/install"
"github.com/knative/eventing-contrib/camel/source/pkg/reconciler"
"github.com/knative/pkg/logging/logkey"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"knative.dev/pkg/logging/logkey"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
Expand Down
4 changes: 2 additions & 2 deletions camel/source/pkg/apis/sources/v1alpha1/camelsource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ package v1alpha1

import (
"github.com/apache/camel-k/pkg/apis/camel/v1alpha1"
"github.com/knative/pkg/apis/duck"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"knative.dev/pkg/apis/duck"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

func TestCamelSourceStatusIsReady(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion camel/source/pkg/reconciler/camelsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/knative/eventing-contrib/camel/source/pkg/reconciler/resources"
"github.com/knative/eventing-contrib/pkg/controller/sdk"
"github.com/knative/eventing-contrib/pkg/controller/sinks"
"github.com/knative/pkg/logging"
"go.uber.org/zap"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/equality"
Expand All @@ -35,6 +34,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/client-go/tools/record"
"knative.dev/pkg/logging"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand Down
4 changes: 2 additions & 2 deletions camel/source/pkg/reconciler/camelsource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
sourcesv1alpha1 "github.com/knative/eventing-contrib/camel/source/pkg/apis/sources/v1alpha1"
"github.com/knative/eventing-contrib/camel/source/pkg/reconciler/resources"
controllertesting "github.com/knative/eventing-contrib/pkg/controller/testing"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
"go.uber.org/zap"
v1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
Expand All @@ -33,6 +32,7 @@ import (
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/client-go/tools/record"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

var (
Expand All @@ -55,7 +55,7 @@ const (
addressableKind = "Sink"
addressableAPIVersion = "duck.knative.dev/v1alpha1"
addressableDNS = "addressable.sink.svc.cluster.local"
addressableURI = "http://addressable.sink.svc.cluster.local/"
addressableURI = "http://addressable.sink.svc.cluster.local"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion contrib/awssqs/cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (

"github.com/knative/eventing-contrib/contrib/awssqs/pkg/apis"
"github.com/knative/eventing-contrib/contrib/awssqs/pkg/reconciler"
"github.com/knative/pkg/logging/logkey"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
"knative.dev/pkg/logging/logkey"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
Expand Down
2 changes: 1 addition & 1 deletion contrib/awssqs/cmd/receive_adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"os"

awssqs "github.com/knative/eventing-contrib/contrib/awssqs/pkg/adapter"
"github.com/knative/pkg/signals"
"knative.dev/pkg/signals"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
Expand Down
2 changes: 1 addition & 1 deletion contrib/awssqs/pkg/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (
"github.com/cloudevents/sdk-go/pkg/cloudevents/types"
sourcesv1alpha1 "github.com/knative/eventing-contrib/contrib/awssqs/pkg/apis/sources/v1alpha1"
"github.com/knative/eventing-contrib/pkg/kncloudevents"
"github.com/knative/pkg/logging"
"go.uber.org/zap"
"golang.org/x/net/context"
"knative.dev/pkg/logging"
)

// Adapter implements the AWS SQS adapter to deliver SQS messages from
Expand Down
4 changes: 2 additions & 2 deletions contrib/awssqs/pkg/apis/sources/v1alpha1/aws_sqs_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ limitations under the License.
package v1alpha1

import (
"github.com/knative/pkg/apis/duck"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"knative.dev/pkg/apis/duck"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

// +genclient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

func TestAwsSqsSourceStatusIsReady(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion contrib/awssqs/pkg/reconciler/awssqssource.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/knative/eventing-contrib/pkg/controller/sinks"
"github.com/knative/eventing-contrib/pkg/reconciler/eventtype"
eventingv1alpha1 "github.com/knative/eventing/pkg/apis/eventing/v1alpha1"
"github.com/knative/pkg/logging"
"go.uber.org/zap"
v1 "k8s.io/api/apps/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
Expand All @@ -39,6 +38,7 @@ import (
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/dynamic"
"k8s.io/client-go/rest"
"knative.dev/pkg/logging"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/manager"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gcppubsub/cmd/controller/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (

"github.com/knative/eventing-contrib/contrib/gcppubsub/pkg/apis"
controller "github.com/knative/eventing-contrib/contrib/gcppubsub/pkg/reconciler"
"github.com/knative/pkg/logging/logkey"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"knative.dev/pkg/logging/logkey"
"sigs.k8s.io/controller-runtime/pkg/client/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
"sigs.k8s.io/controller-runtime/pkg/runtime/signals"
Expand Down
2 changes: 1 addition & 1 deletion contrib/gcppubsub/pkg/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

cloudevents "github.com/cloudevents/sdk-go"
"github.com/knative/eventing-contrib/pkg/kncloudevents"
"github.com/knative/pkg/logging"
"go.uber.org/zap"
"knative.dev/pkg/logging"

// Imports the Google Cloud Pub/Sub client package.
"cloud.google.com/go/pubsub"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ package v1alpha1
import (
"fmt"

"github.com/knative/pkg/apis"
"github.com/knative/pkg/apis/duck"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"knative.dev/pkg/apis"
"knative.dev/pkg/apis/duck"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

// +genclient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
duckv1alpha1 "github.com/knative/pkg/apis/duck/v1alpha1"
corev1 "k8s.io/api/core/v1"
duckv1alpha1 "knative.dev/pkg/apis/duck/v1alpha1"
)

func TestGcpPubSubSourceStatusIsReady(t *testing.T) {
Expand Down
Loading