Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing 291c0a8...7bca815:
  > 7bca815 IntegrationSource CRD (# 8238)
  > c859efd [main] Format Go code (# 8289)
  > 7c97e6f Schduler: MAXFILLUP strategy will spread vreplicas across multiple pods (# 8263)
  > ef6b31a fix: et autocreate makes eventtype id required (# 8288)
  > 4faf9c8 [main] Upgrade to latest dependencies (# 8287)
  > 65aeab5 [main] Upgrade to latest dependencies (# 8275)
  > 03ba8f4 feat: autocreate v1beta3 eventtypes (# 8276)
bumping knative.dev/hack 05b2fb3...ef6e7e9:
  > ef6e7e9 Export KO_FLAGS for consuming scripts (# 401)
  > 2191456 Update community files (# 400)
bumping knative.dev/pkg 9b9d535...25f6002:
  > 25f6002 upgrade to latest dependencies (# 3111)
  > 6af2bf9 upgrade to latest dependencies (# 3110)
  > 76cfa12 Fix `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3107)
  > 6d10851 Add `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3103)
  > 6eb75e8 Update community files (# 3105)
bumping knative.dev/reconciler-test 09111f0...aae114c:
  > aae114c upgrade to latest dependencies (# 771)
  > 9d5e1c0 Update community files (# 770)
  > 22c241b upgrade to latest dependencies (# 769)
  > 3e8ae56 Update community files (# 768)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Nov 1, 2024
1 parent c3d648d commit 8297c50
Show file tree
Hide file tree
Showing 32 changed files with 1,691 additions and 28 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ require (
k8s.io/client-go v0.31.0
k8s.io/code-generator v0.31.0
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8
knative.dev/eventing v0.43.0
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad
knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364
knative.dev/eventing v0.43.1-0.20241031141551-7bca81597eee
knative.dev/hack v0.0.0-20241025103803-ef6e7e983a60
knative.dev/pkg v0.0.0-20241026180704-25f6002b00f3
knative.dev/reconciler-test v0.0.0-20241024141702-aae114c1c0e3
sigs.k8s.io/controller-runtime v0.19.0
)

Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -826,14 +826,14 @@ k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 h1:1Wof1cGQgA5pqgo8MxKPtf
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8/go.mod h1:Os6V6dZwLNii3vxFpxcNaTmH8LJJBkOTg1N0tOA0fvA=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.43.0 h1:GELHZ0yYosMeV78l4alMsd7HJciEu6a3T2C5l7MPi3Y=
knative.dev/eventing v0.43.0/go.mod h1:pdrF+bEUfRkNn9ifWXS7DoVj5W31gA5KQVd8iwplXUo=
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d h1:aCfX7kwkvgGxXXGbso5tLqdwQmzBkJ9d+EIRwksKTvk=
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad h1:Nrjtr2H168rJeamH4QdyLMV1lEKHejNhaj1ymgQMfLk=
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad/go.mod h1:StJI72GWcm/iErmk4RqFJiOo8RLbVqPbHxUqeVwAzeo=
knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364 h1:DIc+vbaFKOSGktPXJ1MaXIXoDjlmUIXQkHiZaPcYGbQ=
knative.dev/reconciler-test v0.0.0-20241015093232-09111f0f1364/go.mod h1:PVRnK/YQo9s3foRtut00oAxvCPc9f/qV2PApZh/rMPw=
knative.dev/eventing v0.43.1-0.20241031141551-7bca81597eee h1:ICnpaqvLBul+BwSBFRjRP2WIxFeOVbm6pQmYkyN30Q4=
knative.dev/eventing v0.43.1-0.20241031141551-7bca81597eee/go.mod h1:2mdt9J66vQYzxizDz8I/F6IGzV1QgwCkacBR8X12Ssk=
knative.dev/hack v0.0.0-20241025103803-ef6e7e983a60 h1:LjBbosBvW/9/qjzIJtGpehPsbNWVvy1Fz8yZvMbFWe4=
knative.dev/hack v0.0.0-20241025103803-ef6e7e983a60/go.mod h1:R0ritgYtjLDO9527h5vb5X6gfvt5LCrJ55BNbVDsWiY=
knative.dev/pkg v0.0.0-20241026180704-25f6002b00f3 h1:uUSDGlOIkdPT4svjlhi+JEnP2Ufw7AM/F5QDYiEL02U=
knative.dev/pkg v0.0.0-20241026180704-25f6002b00f3/go.mod h1:FeMbTLlxQqSASwlRCrYEOsZ0OKUgSj52qxhECwYCJsw=
knative.dev/reconciler-test v0.0.0-20241024141702-aae114c1c0e3 h1:pa3b/0EKzONPLBHqM0RFzG5EaB+k8OTyHGaUXWPIgns=
knative.dev/reconciler-test v0.0.0-20241024141702-aae114c1c0e3/go.mod h1:W9Kmdoxelg2mswUpDKerL/4Ih1/ouVhlSMeZeJ5LX9c=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
6 changes: 6 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/sources/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,10 @@ var (
Group: GroupName,
Resource: "containersources",
}

// IntegrationSourceResource respresents a Knative Eventing Sources IntegrationSource
IntegrationSourceResource = schema.GroupResource{
Group: GroupName,
Resource: "integrationsources",
}
)
20 changes: 20 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/sources/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group.
// +k8s:deepcopy-gen=package
// +groupName=sources.knative.dev
package v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
"context"
"fmt"

"knative.dev/pkg/apis"
)

// ConvertTo implements apis.Convertible
// Converts source from v1alpha1.IntegrationSource into a higher version.
func (source *IntegrationSource) ConvertTo(ctx context.Context, obj apis.Convertible) error {
return fmt.Errorf("v1alpha1 is the highest known version, got: %T", source)
}

// ConvertFrom implements apis.Convertible
// Converts source from a higher version into v1beta2.IntegrationSource
func (source *IntegrationSource) ConvertFrom(ctx context.Context, obj apis.Convertible) error {
return fmt.Errorf("v1alpha1 is the highest known version, got: %T", source)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import "context"

func (source *IntegrationSource) SetDefaults(ctx context.Context) {
source.Spec.SetDefaults(ctx)
}

func (source *IntegrationSourceSpec) SetDefaults(ctx context.Context) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
corev1 "k8s.io/api/core/v1"
v1 "knative.dev/eventing/pkg/apis/sources/v1"
"knative.dev/pkg/apis"
)

const (
// IntegrationSourceConditionReady has status True when the IntegrationSource is ready to send events.
IntegrationSourceConditionReady = apis.ConditionReady

// IntegrationSourceConditionReceiveAdapterReady has status True when the IntegrationSource's Deployment is ready.
IntegrationSourceConditionContainerSourceReady apis.ConditionType = "ContainerSourceReady"
)

var IntegrationCondSet = apis.NewLivingConditionSet(
IntegrationSourceConditionContainerSourceReady,
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*IntegrationSource) GetConditionSet() apis.ConditionSet {
return IntegrationCondSet
}

// GetTopLevelCondition returns the top level condition.
func (s *IntegrationSourceStatus) GetTopLevelCondition() *apis.Condition {
return IntegrationCondSet.Manage(s).GetTopLevelCondition()
}

// InitializeConditions sets relevant unset conditions to Unknown state.
func (s *IntegrationSourceStatus) InitializeConditions() {
IntegrationCondSet.Manage(s).InitializeConditions()
}

func (iss *IntegrationSourceStatus) IsReady() bool {
return IntegrationCondSet.Manage(iss).IsHappy()
}

func (s *IntegrationSourceStatus) PropagateContainerSourceStatus(status *v1.ContainerSourceStatus) {
//// Do not copy conditions nor observedGeneration
s.SourceStatus = *status.SourceStatus.DeepCopy()

cond := status.GetCondition(apis.ConditionReady)
switch {
case cond == nil:
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, "", "")
case cond.Status == corev1.ConditionTrue:
IntegrationCondSet.Manage(s).MarkTrue(IntegrationSourceConditionContainerSourceReady)
case cond.Status == corev1.ConditionFalse:
IntegrationCondSet.Manage(s).MarkFalse(IntegrationSourceConditionContainerSourceReady, cond.Reason, cond.Message)
case cond.Status == corev1.ConditionUnknown:
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, cond.Reason, cond.Message)
default:
IntegrationCondSet.Manage(s).MarkUnknown(IntegrationSourceConditionContainerSourceReady, cond.Reason, cond.Message)
}

// Propagate ContainerSources AuthStatus to IntegrationSources AuthStatus
s.Auth = status.Auth
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
/*
Copyright 2020 The Knative Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"
"knative.dev/pkg/kmeta"
)

// +genclient
// +genreconciler
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// IntegrationSource is the Schema for the Integrationsources API
type IntegrationSource struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec IntegrationSourceSpec `json:"spec,omitempty"`
Status IntegrationSourceStatus `json:"status,omitempty"`
}

var (
_ runtime.Object = (*IntegrationSource)(nil)
_ kmeta.OwnerRefable = (*IntegrationSource)(nil)
_ apis.Validatable = (*IntegrationSource)(nil)
_ apis.Defaultable = (*IntegrationSource)(nil)
_ apis.HasSpec = (*IntegrationSource)(nil)
_ duckv1.KRShaped = (*IntegrationSource)(nil)
_ apis.Convertible = (*IntegrationSource)(nil)
)

// IntegrationSourceSpec defines the desired state of IntegrationSource
type IntegrationSourceSpec struct {
// inherits duck/v1 SourceSpec, which currently provides:
// * Sink - a reference to an object that will resolve to a domain name or
// a URI directly to use as the sink.
// * CloudEventOverrides - defines overrides to control the output format
// and modifications of the event sent to the sink.
duckv1.SourceSpec `json:",inline"`

Aws *Aws `json:"aws,omitempty"` // AWS source configuration
Timer *Timer `json:"timer,omitempty"` // Timer configuration
}

type Timer struct {
Period int `json:"period" default:"1000"` // Interval (in milliseconds) between producing messages
Message string `json:"message"` // Message to generate
ContentType string `json:"contentType" default:"text/plain"` // Content type of generated message
RepeatCount int `json:"repeatCount,omitempty"` // Max number of fires (optional)
}

type AWSCommon struct {
// Auth is the S3 authentication (accessKey/secretKey) configuration.
Region string `json:"region,omitempty"` // AWS region
ProfileCredentialsName string `json:"profileCredentialsName,omitempty"` // Profile name for profile credentials provider
SessionToken string `json:"sessionToken,omitempty"` // Session token
URIEndpointOverride string `json:"uriEndpointOverride,omitempty"` // Override endpoint URI
OverrideEndpoint bool `json:"overrideEndpoint" default:"false"` // Override endpoint flag
}

type AWSS3 struct {
AWSCommon `json:",inline"` // Embeds AWSCommon to inherit its fields in JSON
BucketNameOrArn string `json:"bucketNameOrArn,omitempty"` // S3 Bucket name or ARN
DeleteAfterRead bool `json:"deleteAfterRead" default:"true"` // Auto-delete objects after reading
MoveAfterRead bool `json:"moveAfterRead" default:"false"` // Move objects after reading
DestinationBucket string `json:"destinationBucket,omitempty"` // Destination bucket for moved objects
DestinationBucketPrefix string `json:"destinationBucketPrefix,omitempty"` // Prefix for moved objects
DestinationBucketSuffix string `json:"destinationBucketSuffix,omitempty"` // Suffix for moved objects
AutoCreateBucket bool `json:"autoCreateBucket" default:"false"` // Auto-create S3 bucket
Prefix string `json:"prefix,omitempty"` // S3 bucket prefix for search
IgnoreBody bool `json:"ignoreBody" default:"false"` // Ignore object body
ForcePathStyle bool `json:"forcePathStyle" default:"false"` // Force path style for bucket access
Delay int `json:"delay" default:"500"` // Delay between polls in milliseconds
MaxMessagesPerPoll int `json:"maxMessagesPerPoll" default:"10"` // Max messages to poll per request
}

type AWSSQS struct {
AWSCommon `json:",inline"` // Embeds AWSCommon to inherit its fields in JSON
QueueNameOrArn string `json:"queueNameOrArn,omitempty"` // SQS Queue name or ARN
DeleteAfterRead bool `json:"deleteAfterRead" default:"true"` // Auto-delete messages after reading
AutoCreateQueue bool `json:"autoCreateQueue" default:"false"` // Auto-create SQS queue
AmazonAWSHost string `json:"amazonAWSHost" default:"amazonaws.com"` // AWS host
Protocol string `json:"protocol" default:"https"` // Communication protocol (http/https)
QueueURL string `json:"queueURL,omitempty"` // Full SQS queue URL
Greedy bool `json:"greedy" default:"false"` // Greedy scheduler
Delay int `json:"delay" default:"500"` // Delay between polls in milliseconds
MaxMessagesPerPoll int `json:"maxMessagesPerPoll" default:"1"` // Max messages to return (1-10)
WaitTimeSeconds int `json:"waitTimeSeconds,omitempty"` // Wait time for messages
VisibilityTimeout int `json:"visibilityTimeout,omitempty"` // Visibility timeout in seconds
}

type AWSDDBStreams struct {
AWSCommon `json:",inline"` // Embeds AWSCommon to inherit its fields in JSON
Table string `json:"table,omitempty"` // The name of the DynamoDB table
StreamIteratorType string `json:"streamIteratorType,omitempty" default:"FROM_LATEST"` // Defines where in the DynamoDB stream to start getting records
Delay int `json:"delay,omitempty" default:"500"` // Delay in milliseconds before the next poll from the database
}

type Aws struct {
S3 *AWSS3 `json:"s3,omitempty"` // S3 source configuration
SQS *AWSSQS `json:"sqs,omitempty"` // SQS source configuration
DDBStreams *AWSDDBStreams `json:"ddb-streams,omitempty"` // DynamoDB Streams source configuration
Auth *Auth `json:"auth,omitempty"`
}

type Auth struct {
// Auth Secret
Secret *Secret `json:"secret,omitempty"`

// AccessKey is the AWS access key ID.
AccessKey string `json:"accessKey,omitempty"`

// SecretKey is the AWS secret access key.
SecretKey string `json:"secretKey,omitempty"`
}

func (a *Auth) HasAuth() bool {
return a != nil && a.Secret != nil &&
a.Secret.Ref != nil && a.Secret.Ref.Name != ""
}

type Secret struct {
// Secret reference for SASL and SSL configurations.
Ref *SecretReference `json:"ref,omitempty"`
}

type SecretReference struct {
// Secret name.
Name string `json:"name"`
}

// GetGroupVersionKind returns the GroupVersionKind.
func (*IntegrationSource) GetGroupVersionKind() schema.GroupVersionKind {
return SchemeGroupVersion.WithKind("IntegrationSource")
}

// IntegrationSourceStatus defines the observed state of IntegrationSource
type IntegrationSourceStatus struct {
// inherits duck/v1 SourceStatus, which currently provides:
// * ObservedGeneration - the 'Generation' of the Service that was last
// processed by the controller.
// * Conditions - the latest available observations of a resource's current
// state.
// * SinkURI - the current active sink URI that has been configured for the
// Source.
duckv1.SourceStatus `json:",inline"`
}

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// IntegrationSourceList contains a list of IntegrationSource
type IntegrationSourceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []IntegrationSource `json:"items"`
}

// GetUntypedSpec returns the spec of the IntegrationSource.
func (c *IntegrationSource) GetUntypedSpec() interface{} {
return c.Spec
}

// GetStatus retrieves the status of the IntegrationSource. Implements the KRShaped interface.
func (c *IntegrationSource) GetStatus() *duckv1.Status {
return &c.Status.Status
}
Loading

0 comments on commit 8297c50

Please sign in to comment.