Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 1709961...8119179:
  > 8119179 Update community files (# 3050)
  > 58135c2 Extra logging for leases (# 3049)
  > fce44ea Maybe fix controller ha (# 3046)
bumping knative.dev/networking 1b470c4...41aa208:
  > 41aa208 upgrade to latest dependencies (# 987)
bumping knative.dev/serving d1781c5...62ce45c:
  > 62ce45c Update community files (# 15315)
  > facee04 Update net-istio nightly (# 15313)
  > 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)
  > bb51203 upgrade to latest dependencies (# 15297)
  > 2fd8465 [Automated] Update net-gateway-api nightly (# 15292)
  > 8cf5aba Set controller reconcillers to the correct number in tests (# 15290)
  > 92c6a63 upgrade to latest dependencies (# 15294)
bumping knative.dev/hack 3b6d644...0914314:
  > 0914314 Update community files (# 384)
bumping knative.dev/eventing 08b0813...844dcbf:
  > 844dcbf Adding mount path as env variable in container (# 7968)
  > b8623b2 [main] Update community files (# 7969)
  > 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)
  > 3ee2400 fix: sequence updates subscription where possible, instead of recreating it (# 7948)
  > 96e0f09 Bump rekt to main (# 7958)
  > e3604b8 [main] Upgrade to latest dependencies (# 7957)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Jun 10, 2024
1 parent c1869eb commit f93454e
Show file tree
Hide file tree
Showing 27 changed files with 1,144 additions and 20 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,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.20240603072148-08b0813c5f8c
knative.dev/hack v0.0.0-20240529131459-3b6d6441e7ea
knative.dev/pkg v0.0.0-20240603080447-170996133132
knative.dev/serving v0.41.1-0.20240603121339-d1781c5073c2
knative.dev/eventing v0.41.1-0.20240607191701-844dcbf03ed2
knative.dev/hack v0.0.0-20240607132042-09143140a254
knative.dev/pkg v0.0.0-20240607130909-8119179a6091
knative.dev/serving v0.41.1-0.20240607135301-62ce45c0b305
)

require (
Expand Down Expand Up @@ -101,7 +101,7 @@ require (
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
knative.dev/networking v0.0.0-20240530052748-1b470c4f662c // indirect
knative.dev/networking v0.0.0-20240603133819-41aa2087242d // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -787,16 +787,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.20240603072148-08b0813c5f8c h1:udhB7NLtrXZUUQyXP0YrMx6GXxvK0aSDdgdCnCTOFhA=
knative.dev/eventing v0.41.1-0.20240603072148-08b0813c5f8c/go.mod h1:WjcY+l4uUwR3N/DJkuhwhJBCYZ2u9YyrzOm0T4DufLM=
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-20240530052748-1b470c4f662c h1:YeufB6la68PjSPO8xoVnVEkqIRNfLlh9DN5SmdWHRVA=
knative.dev/networking v0.0.0-20240530052748-1b470c4f662c/go.mod h1:wJvCa9TRBYi+Wrdh8fgmVeWPuwdxtCfWnnKwXVg9h1M=
knative.dev/pkg v0.0.0-20240603080447-170996133132 h1:eGfvcbwmasWHI6DRF5KEBxvFnwbrvHzCfKfvF5kWw10=
knative.dev/pkg v0.0.0-20240603080447-170996133132/go.mod h1:E5OxJHFsQiW7pL0lVJ02XEVm2QUc0ZVdSUHiarUJHrU=
knative.dev/serving v0.41.1-0.20240603121339-d1781c5073c2 h1:0GsQBdmpVG2p8O6N3qmk/9J7hjsOP5Xz3Y9lIVFE36w=
knative.dev/serving v0.41.1-0.20240603121339-d1781c5073c2/go.mod h1:Wh/DH5JHAH9Jdm8cHQPEWJ4hZSB2IS3nFEtAEqElBig=
knative.dev/eventing v0.41.1-0.20240607191701-844dcbf03ed2 h1:PrSD125KbjCnCjyk2MujyskpJOAQvjIhvtk0zXq3WB8=
knative.dev/eventing v0.41.1-0.20240607191701-844dcbf03ed2/go.mod h1:FO0xttJnXLgKrAGdkEvEqL7hBpmnUKGu2wMqKUC4p78=
knative.dev/hack v0.0.0-20240607132042-09143140a254 h1:1YFnu3U6dWZg0oxm6GU8kEdA9A+BvSWKJO7sg3N0kq8=
knative.dev/hack v0.0.0-20240607132042-09143140a254/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-20240607130909-8119179a6091 h1:islD2GxpRd5ftkkAEgJQBz3aMMGaRdxTnnC/mtAj5Yc=
knative.dev/pkg v0.0.0-20240607130909-8119179a6091/go.mod h1:E5OxJHFsQiW7pL0lVJ02XEVm2QUc0ZVdSUHiarUJHrU=
knative.dev/serving v0.41.1-0.20240607135301-62ce45c0b305 h1:rm/oc3fZTbZQXlm2EMbRv9P3UXXFFzdG6RDXkKaqdeA=
knative.dev/serving v0.41.1-0.20240607135301-62ce45c0b305/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 f93454e

Please sign in to comment.