diff --git a/cmd/controller/main.go b/cmd/controller/main.go index bfca7ca7896..03dd21d9c45 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -21,13 +21,14 @@ import ( // _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" "errors" - integrationSink "knative.dev/eventing/pkg/reconciler/integration/sink" - integrationSource "knative.dev/eventing/pkg/reconciler/integration/source" "log" "net/http" "os" "time" + integrationSink "knative.dev/eventing/pkg/reconciler/integration/sink" + integrationSource "knative.dev/eventing/pkg/reconciler/integration/source" + "knative.dev/pkg/injection/sharedmain" filteredFactory "knative.dev/pkg/client/injection/kube/informers/factory/filtered" diff --git a/docs/eventing-api.md b/docs/eventing-api.md index a0ec2721261..5615dfe1388 100644 --- a/docs/eventing-api.md +++ b/docs/eventing-api.md @@ -6055,7 +6055,7 @@ JobSinkStatus s3
-knative.dev/eventing/pkg/apis/common.AWSS3 +knative.dev/eventing/pkg/apis/common/integration/v1alpha1.AWSS3 @@ -6065,7 +6065,7 @@ knative.dev/eventing/pkg/apis/common.AWSS3 sqs
-knative.dev/eventing/pkg/apis/common.AWSSQS +knative.dev/eventing/pkg/apis/common/integration/v1alpha1.AWSSQS @@ -6076,7 +6076,7 @@ knative.dev/eventing/pkg/apis/common.AWSSQS auth
-knative.dev/eventing/pkg/apis/common.Auth +knative.dev/eventing/pkg/apis/common/integration/v1alpha1.Auth diff --git a/pkg/apis/sinks/v1alpha1/integration_sink_defaults_test.go b/pkg/apis/sinks/v1alpha1/integration_sink_defaults_test.go index 41bdc3137ce..fd605809c77 100644 --- a/pkg/apis/sinks/v1alpha1/integration_sink_defaults_test.go +++ b/pkg/apis/sinks/v1alpha1/integration_sink_defaults_test.go @@ -18,8 +18,9 @@ package v1alpha1 import ( "context" - "github.com/google/go-cmp/cmp" "testing" + + "github.com/google/go-cmp/cmp" ) func TestIntegrationSinkSetDefaults(t *testing.T) { diff --git a/pkg/apis/sinks/v1alpha1/integration_sink_lifecycle_test.go b/pkg/apis/sinks/v1alpha1/integration_sink_lifecycle_test.go index 4cb2902666d..a7cfeee5eb1 100644 --- a/pkg/apis/sinks/v1alpha1/integration_sink_lifecycle_test.go +++ b/pkg/apis/sinks/v1alpha1/integration_sink_lifecycle_test.go @@ -17,11 +17,12 @@ limitations under the License. package v1alpha1 import ( + "testing" + "github.com/google/go-cmp/cmp" corev1 "k8s.io/api/core/v1" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" - "testing" ) func TestIntegrationSinkGetConditionSet(t *testing.T) { diff --git a/pkg/apis/sinks/v1alpha1/integration_sink_types.go b/pkg/apis/sinks/v1alpha1/integration_sink_types.go index 95d0366cf9c..5e2dbb46fd0 100644 --- a/pkg/apis/sinks/v1alpha1/integration_sink_types.go +++ b/pkg/apis/sinks/v1alpha1/integration_sink_types.go @@ -20,7 +20,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "knative.dev/eventing/pkg/apis/common" + "knative.dev/eventing/pkg/apis/common/integration/v1alpha1" eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1" "knative.dev/pkg/apis" duckv1 "knative.dev/pkg/apis/duck/v1" @@ -74,9 +74,9 @@ type Log struct { } type Aws struct { - S3 *common.AWSS3 `json:"s3,omitempty"` // S3 source configuration - SQS *common.AWSSQS `json:"sqs,omitempty"` // SQS source configuration - Auth *common.Auth `json:"auth,omitempty"` + S3 *v1alpha1.AWSS3 `json:"s3,omitempty"` // S3 source configuration + SQS *v1alpha1.AWSSQS `json:"sqs,omitempty"` // SQS source configuration + Auth *v1alpha1.Auth `json:"auth,omitempty"` } type IntegrationSinkStatus struct { diff --git a/pkg/apis/sinks/v1alpha1/integration_sink_types_test.go b/pkg/apis/sinks/v1alpha1/integration_sink_types_test.go index d148aa28f90..c35bf599a2f 100644 --- a/pkg/apis/sinks/v1alpha1/integration_sink_types_test.go +++ b/pkg/apis/sinks/v1alpha1/integration_sink_types_test.go @@ -17,8 +17,9 @@ limitations under the License. package v1alpha1 import ( - "knative.dev/eventing/pkg/apis/common" "testing" + + "knative.dev/eventing/pkg/apis/common" ) func TestIntegrationSink_GetStatus(t *testing.T) { diff --git a/pkg/apis/sinks/v1alpha1/integration_sink_validation.go b/pkg/apis/sinks/v1alpha1/integration_sink_validation.go index 40d02310540..202df43514a 100644 --- a/pkg/apis/sinks/v1alpha1/integration_sink_validation.go +++ b/pkg/apis/sinks/v1alpha1/integration_sink_validation.go @@ -18,6 +18,7 @@ package v1alpha1 import ( "context" + "knative.dev/pkg/apis" ) diff --git a/pkg/apis/sinks/v1alpha1/integration_sink_validation_test.go b/pkg/apis/sinks/v1alpha1/integration_sink_validation_test.go index d984eadd4e6..8e346fd54f3 100644 --- a/pkg/apis/sinks/v1alpha1/integration_sink_validation_test.go +++ b/pkg/apis/sinks/v1alpha1/integration_sink_validation_test.go @@ -18,9 +18,10 @@ package v1alpha1 import ( "context" - "knative.dev/eventing/pkg/apis/common" "testing" + "knative.dev/eventing/pkg/apis/common" + "github.com/google/go-cmp/cmp" "knative.dev/pkg/apis" ) diff --git a/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go index 99dadeaaee1..3dff23adf1d 100644 --- a/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/sinks/v1alpha1/zz_generated.deepcopy.go @@ -24,7 +24,7 @@ package v1alpha1 import ( v1 "k8s.io/api/batch/v1" runtime "k8s.io/apimachinery/pkg/runtime" - common "knative.dev/eventing/pkg/apis/common" + integrationv1alpha1 "knative.dev/eventing/pkg/apis/common/integration/v1alpha1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -32,17 +32,17 @@ func (in *Aws) DeepCopyInto(out *Aws) { *out = *in if in.S3 != nil { in, out := &in.S3, &out.S3 - *out = new(common.AWSS3) + *out = new(integrationv1alpha1.AWSS3) **out = **in } if in.SQS != nil { in, out := &in.SQS, &out.SQS - *out = new(common.AWSSQS) + *out = new(integrationv1alpha1.AWSSQS) **out = **in } if in.Auth != nil { in, out := &in.Auth, &out.Auth - *out = new(common.Auth) + *out = new(integrationv1alpha1.Auth) (*in).DeepCopyInto(*out) } return diff --git a/pkg/apis/sources/v1alpha1/integration_types_test.go b/pkg/apis/sources/v1alpha1/integration_types_test.go index 4dfd20ea801..ad30b14e2ed 100644 --- a/pkg/apis/sources/v1alpha1/integration_types_test.go +++ b/pkg/apis/sources/v1alpha1/integration_types_test.go @@ -17,8 +17,9 @@ limitations under the License. package v1alpha1 import ( - "knative.dev/eventing/pkg/apis/common/integration/v1alpha1" "testing" + + "knative.dev/eventing/pkg/apis/common/integration/v1alpha1" ) func TestIntegrationSource_GetStatus(t *testing.T) { diff --git a/pkg/apis/sources/v1alpha1/integration_validation_test.go b/pkg/apis/sources/v1alpha1/integration_validation_test.go index 3281b3940fb..9b263426b61 100644 --- a/pkg/apis/sources/v1alpha1/integration_validation_test.go +++ b/pkg/apis/sources/v1alpha1/integration_validation_test.go @@ -18,9 +18,10 @@ package v1alpha1 import ( "context" - "knative.dev/eventing/pkg/apis/common/integration/v1alpha1" "testing" + "knative.dev/eventing/pkg/apis/common/integration/v1alpha1" + "github.com/google/go-cmp/cmp" "knative.dev/pkg/apis" ) diff --git a/pkg/reconciler/integration/helper.go b/pkg/reconciler/integration/helper.go index 4af8191b199..adfbf605b6d 100644 --- a/pkg/reconciler/integration/helper.go +++ b/pkg/reconciler/integration/helper.go @@ -2,10 +2,11 @@ package integration import ( "fmt" - corev1 "k8s.io/api/core/v1" "reflect" "strconv" "strings" + + corev1 "k8s.io/api/core/v1" ) const prefix = "CAMEL_KAMELET_" diff --git a/pkg/reconciler/integration/helper_test.go b/pkg/reconciler/integration/helper_test.go index a602814ac98..f35e8d42cd4 100644 --- a/pkg/reconciler/integration/helper_test.go +++ b/pkg/reconciler/integration/helper_test.go @@ -1,9 +1,10 @@ package integration import ( + "testing" + "github.com/google/go-cmp/cmp" corev1 "k8s.io/api/core/v1" - "testing" ) func TestGenerateEnvVarsFromStruct(t *testing.T) { diff --git a/pkg/reconciler/integration/sink/controller.go b/pkg/reconciler/integration/sink/controller.go index 3dda75718a9..a6b8c50d5c1 100644 --- a/pkg/reconciler/integration/sink/controller.go +++ b/pkg/reconciler/integration/sink/controller.go @@ -2,6 +2,7 @@ package sink import ( "context" + "k8s.io/client-go/tools/cache" "knative.dev/eventing/pkg/apis/feature" v1alpha1 "knative.dev/eventing/pkg/apis/sinks/v1alpha1" diff --git a/pkg/reconciler/integration/sink/integrationsink.go b/pkg/reconciler/integration/sink/integrationsink.go index 5851f667301..f313d404f3a 100644 --- a/pkg/reconciler/integration/sink/integrationsink.go +++ b/pkg/reconciler/integration/sink/integrationsink.go @@ -3,6 +3,7 @@ package sink import ( "context" "fmt" + "go.uber.org/zap" corev1 "k8s.io/api/core/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" diff --git a/test/rekt/features/integrationsink/features.go b/test/rekt/features/integrationsink/features.go index fd6c71132cd..944e1e4f89d 100644 --- a/test/rekt/features/integrationsink/features.go +++ b/test/rekt/features/integrationsink/features.go @@ -17,6 +17,8 @@ limitations under the License. package integrationsink import ( + "time" + cetest "github.com/cloudevents/sdk-go/v2/test" "github.com/google/uuid" "knative.dev/eventing/test/rekt/features/featureflags" @@ -25,7 +27,6 @@ import ( "knative.dev/reconciler-test/pkg/eventshub" "knative.dev/reconciler-test/pkg/eventshub/assert" "knative.dev/reconciler-test/pkg/feature" - "time" ) func Success() *feature.Feature { diff --git a/test/rekt/integration_sink_test.go b/test/rekt/integration_sink_test.go index f0d595735f9..7bc0394ba70 100644 --- a/test/rekt/integration_sink_test.go +++ b/test/rekt/integration_sink_test.go @@ -20,9 +20,10 @@ limitations under the License. package rekt import ( + "testing" + "knative.dev/eventing/test/rekt/features/integrationsink" "knative.dev/reconciler-test/pkg/eventshub" - "testing" "knative.dev/pkg/system" "knative.dev/reconciler-test/pkg/environment" diff --git a/test/rekt/resources/integrationsink/integrationsink.go b/test/rekt/resources/integrationsink/integrationsink.go index f2eaddc1da1..6ed054918f7 100644 --- a/test/rekt/resources/integrationsink/integrationsink.go +++ b/test/rekt/resources/integrationsink/integrationsink.go @@ -3,6 +3,8 @@ package integrationsink import ( "context" "embed" + "time" + "k8s.io/apimachinery/pkg/runtime/schema" "knative.dev/reconciler-test/pkg/environment" "knative.dev/reconciler-test/pkg/eventshub" @@ -10,7 +12,6 @@ import ( "knative.dev/reconciler-test/pkg/k8s" "knative.dev/reconciler-test/pkg/knative" "knative.dev/reconciler-test/pkg/manifest" - "time" ) //go:embed integrationsink.yaml