Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing 3ee2400...9d11598:
  > 9d11598 fix: eventing clusterrole has correct knsubscribe permissions (# 7943)
  > f9156c8 JobSink: don't start informers twice (# 7964)
  > bff65d2 Triggering long running background jobs when events occurs (# 7954)
bumping knative.dev/serving bb51203...09b4cd3:
  > 09b4cd3 use cgr.dev/chainguard/static:latest which is nonroot (# 15310)
  > 30a77d1 Add affinity-rules feature to configmap config-deployment (# 15250)
  > 10b9152 Update net-gateway-api nightly (# 15307)
  > 19055d5 upgrade to latest dependencies (# 15306)
  > 3e53acc Run system-internal-tls tests only for kourier (# 15299)
  > 5a3aa98 Update net-kourier nightly (# 15303)
  > 4c71c49 Update net-istio nightly (# 15301)
  > d3f9a04 Update net-contour nightly (# 15302)
  > 57d2a26 Update net-gateway-api nightly (# 15300)
bumping knative.dev/pkg fce44ea...58135c2:
  > 58135c2 Extra logging for leases (# 3049)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Jun 7, 2024
1 parent 946f160 commit fbe3a3c
Show file tree
Hide file tree
Showing 26 changed files with 1,130 additions and 12 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ require (
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
knative.dev/eventing v0.41.1-0.20240603163018-3ee2400189c1
knative.dev/eventing v0.41.1-0.20240606162713-9d1159862f88
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea
knative.dev/pkg v0.0.0-20240603145758-fce44ead15bd
knative.dev/serving v0.41.1-0.20240604061953-bb512037075c
knative.dev/pkg v0.0.0-20240604134003-58135c2c0694
knative.dev/serving v0.41.1-0.20240606173551-09b4cd3ec097
)

require (
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -721,16 +721,16 @@ k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/A
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.41.1-0.20240603163018-3ee2400189c1 h1:udSFPuiXYxyRErU4hs7EJ2G6MmR+OW1uKbniILcIkJQ=
knative.dev/eventing v0.41.1-0.20240603163018-3ee2400189c1/go.mod h1:FO0xttJnXLgKrAGdkEvEqL7hBpmnUKGu2wMqKUC4p78=
knative.dev/eventing v0.41.1-0.20240606162713-9d1159862f88 h1:dl+J/3zOsVmPvUzp+nO2HG16K+xqvHqxRBVBTtcDq1Q=
knative.dev/eventing v0.41.1-0.20240606162713-9d1159862f88/go.mod h1:FO0xttJnXLgKrAGdkEvEqL7hBpmnUKGu2wMqKUC4p78=
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea h1:iWW6SNMrVd2hI5Y+ltKIEzXVedoQLL86b23dS5fkvXs=
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20240603133819-41aa2087242d h1:B0psbCJrgnQLE8fibEga8NHE04Ay6L8CctdG4a+1CaY=
knative.dev/networking v0.0.0-20240603133819-41aa2087242d/go.mod h1:WS5A291Vy2unZ1L54ZSKBkz/gVzVmIy15cCcdA6PRN4=
knative.dev/pkg v0.0.0-20240603145758-fce44ead15bd h1:SxwfJkmXwxl2PT5xZjtKKHO7URgHuigOoyzelaIGb2g=
knative.dev/pkg v0.0.0-20240603145758-fce44ead15bd/go.mod h1:E5OxJHFsQiW7pL0lVJ02XEVm2QUc0ZVdSUHiarUJHrU=
knative.dev/serving v0.41.1-0.20240604061953-bb512037075c h1:22POMSdeS1m9zn3Zo6X9gu6J8qRMbZHXgz4uVXhXVTg=
knative.dev/serving v0.41.1-0.20240604061953-bb512037075c/go.mod h1:ASoO3laJpfhnxe5ofk9SOK6Pg/rZ8JWwRilmvg0RxMA=
knative.dev/pkg v0.0.0-20240604134003-58135c2c0694 h1:trbVXm0WFXxxjcuSCKrYHKQwRQCuDrE8T5+yqXAI1NA=
knative.dev/pkg v0.0.0-20240604134003-58135c2c0694/go.mod h1:E5OxJHFsQiW7pL0lVJ02XEVm2QUc0ZVdSUHiarUJHrU=
knative.dev/serving v0.41.1-0.20240606173551-09b4cd3ec097 h1:QMgemyOgb1GQJ/HS0ABNRmIj+AlFgbjCWUZVCuuWSig=
knative.dev/serving v0.41.1-0.20240606173551-09b4cd3ec097/go.mod h1:2HcdNS0hQKfa5Y1hPdqoxLNaOQAP6OXSrRFUuceUOJ8=
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
23 changes: 23 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/sinks/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright 2024 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 sinks

const (
JobSinkJobsLabelSelector = "sinks.knative.dev/job-sink=true"
JobSinkNameLabel = "sinks.knative.dev/job-sink-name"
JobSinkIDLabel = "sinks.knative.dev/job-sink-id"
)
33 changes: 33 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/sinks/register.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
Copyright 2024 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 sinks

import (
"k8s.io/apimachinery/pkg/runtime/schema"
)

const (
GroupName = "sinks.knative.dev"
)

var (
// JobSinkResource respresents a Knative Eventing sink JobSink
JobSinkResource = schema.GroupResource{
Group: GroupName,
Resource: "jobsinks",
}
)
20 changes: 20 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/sinks/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
Copyright 2024 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=sinks.knative.dev
package v1alpha1
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Copyright 2024 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.JobSink into a higher version.
func (sink *JobSink) ConvertTo(ctx context.Context, obj apis.Convertible) error {
return fmt.Errorf("v1alpha1 is the highest known version, got: %T", sink)
}

// ConvertFrom implements apis.Convertible
// Converts source from a higher version into v1beta2.JobSink
func (sink *JobSink) ConvertFrom(ctx context.Context, obj apis.Convertible) error {
return fmt.Errorf("v1alpha1 is the highest known version, got: %T", sink)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2024 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 (sink *JobSink) SetDefaults(ctx context.Context) {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
Copyright 2024 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 (
"fmt"

"k8s.io/apimachinery/pkg/runtime/schema"
"knative.dev/pkg/apis"

"knative.dev/eventing/pkg/apis/sinks"
)

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

JobSinkConditionAddressable apis.ConditionType = "Addressable"
)

var JobSinkCondSet = apis.NewLivingConditionSet(
JobSinkConditionAddressable,
)

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

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

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

// GetCondition returns the condition currently associated with the given type, or nil.
func (s *JobSinkStatus) GetCondition(t apis.ConditionType) *apis.Condition {
return JobSinkCondSet.Manage(s).GetCondition(t)
}

// GetTopLevelCondition returns the top level Condition.
func (ps *JobSinkStatus) GetTopLevelCondition() *apis.Condition {
return JobSinkCondSet.Manage(ps).GetTopLevelCondition()
}

// IsReady returns true if the resource is ready overall.
func (s *JobSinkStatus) IsReady() bool {
return JobSinkCondSet.Manage(s).IsHappy()
}

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

func (e *JobSink) SetJobStatusSelector() {
if e.Spec.Job != nil {
e.Status.JobStatus.Selector = fmt.Sprintf("%s=%s", sinks.JobSinkNameLabel, e.GetName())
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/*
Copyright 2024 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 (
batchv1 "k8s.io/api/batch/v1"
"knative.dev/pkg/apis"

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

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

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

Spec JobSinkSpec `json:"spec,omitempty"`
Status JobSinkStatus `json:"status,omitempty"`
}

// Check the interfaces that JobSink should be implementing.
var (
_ runtime.Object = (*JobSink)(nil)
_ kmeta.OwnerRefable = (*JobSink)(nil)
_ apis.Validatable = (*JobSink)(nil)
_ apis.Defaultable = (*JobSink)(nil)
_ apis.HasSpec = (*JobSink)(nil)
_ duckv1.KRShaped = (*JobSink)(nil)
)

// JobSinkSpec defines the desired state of the JobSink.
type JobSinkSpec struct {
// Job to run when an event occur.
// +optional
Job *batchv1.Job `json:"job,omitempty"`
}

// JobSinkStatus defines the observed state of JobSink.
type JobSinkStatus struct {
duckv1.Status `json:",inline"`

// AddressStatus is the part where the JobSink fulfills the Addressable contract.
// It exposes the endpoint as an URI to get events delivered.
// +optional
duckv1.AddressStatus `json:",inline"`

// +optional
JobStatus JobStatus `json:"job,omitempty"`
}

type JobStatus struct {
Selector string `json:"selector,omitempty"`
}

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

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

// GetStatus retrieves the status of the JobSink. Implements the KRShaped interface.
func (sink *JobSink) GetStatus() *duckv1.Status {
return &sink.Status.Status
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2024 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"

"knative.dev/pkg/apis"
)

func (sink *JobSink) Validate(ctx context.Context) *apis.FieldError {
return sink.Spec.Validate(ctx).ViaField("spec")
}

func (sink *JobSinkSpec) Validate(ctx context.Context) *apis.FieldError {
var errs *apis.FieldError

if sink.Job == nil {
return errs.Also(apis.ErrMissingOneOf("job"))
}

return errs
}
Loading

0 comments on commit fbe3a3c

Please sign in to comment.