Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/eventing 5e245ac...631f4ec:%0A  > 631f4ec Add TLS support for mt-broker-filter (# 6940)%0A  > 45f0a19 Allow wathola components to run with Istio  (# 7011)%0A  > 65f4b1c [main] Format Go code (# 7008)%0A  > 3267b1a test SinkBinding with eventshub TLS receiver as sink (# 6979)%0A  > aad53f4 Updated eventingtls test certs to support IP addresses (# 7006)%0A  > 57d78e0 [main] Update community files (# 7004)%0A  > dfb2243 Support TLS in Trigger and Channel reconciler (# 6988)%0A  > df08b49 Eventing TLS: verify APIServerSource and PingSource sinkURI is https (# 6987)%0A  > d21c1aa [main] Upgrade to latest dependencies (# 6989)%0A  > 70113e8 Deprecate broker field and use KReference for the broker instead (# 6870)%0A  > 4e4647f test update to newest version (# 6990)%0A  > 870ac6b Update MessageDispatcher and FanoutMessageHandler to support sending events to TLS endpoints (# 6983)%0A  > 6dd5d58 Test PingSource with eventshub TLS receiver as sink (# 6965)%0A  > 55f4f28 [main] Upgrade to latest dependencies (# 6982)%0A  > 2a5a9a5 Add more items in the development getting started documentation (# 6978)%0A  > 59118a0 imc-dispatcher starts a TLS server, accepts host based routing on http receiver and path based routing on https receiver (# 6954)%0A  > ee49ada Rework kncloudevents library to support multiple clients (# 6975)%0A  > ee88094 Make ServerManager independent from kncloudevents package (# 6980)%0A  > 6a11c5f [main] Upgrade to latest dependencies (# 6969)%0A  > 8a9a532 Updated DEVELOPMENT.md to provide better instructions on setting up kubernetes (# 6977)%0A  > 390a0c8 Eventing TLS: Test ContainerSource with eventshub TLS receiver as sink (# 6957)%0Abumping knative.dev/serving a657321...5a90438:%0A  > 5a90438 Update net-istio nightly (# 14091)%0A  > dc0692a Update net-istio nightly (# 14088)%0A  > 0fbd780 Update net-certmanager nightly (# 14087)%0A  > 6f63c98 Update net-kourier nightly (# 14086)%0A  > e74f5f4 Update net-gateway-api nightly (# 14085)%0A  > 1587070 Update net-kourier nightly (# 14081)%0A  > 2e00e9f Update net-certmanager nightly (# 14080)%0A  > a3c7864 Update net-istio nightly (# 14078)%0A  > 384b889 Update net-gateway-api nightly (# 14077)%0A  > 7d0f963 Change storage version of DomainMapping to v1beta1 (# 14058)%0A  > e8b6f05 Update net-gateway-api nightly (# 14068)%0A  > 41e4212 Get certificate reconciler from `networking` instead of `control-protocol` (# 14072)%0A  > e71b933 Update net-certmanager nightly (# 14070)%0A  > 8f516b6 Update net-kourier nightly (# 14069)%0A  > a2bb4aa upgrade to latest dependencies (# 14071)%0A  > c95f17b Update community files (# 14067)%0A  > bf48e64 Remove deprecated internalEncryption dependency (# 14064)%0A  > 6b87d67 Update net-istio nightly (# 14065)%0A  > fbecf34 refactor throttler_test.go (# 14055)%0A  > 349b2d6 Change minimum TLS version to 1.3 for internal encryption (between activator and queue-proxy) (# 13887)%0A  > d07bf78 Update net-contour nightly (# 14049)%0A  > aa023e8 Update net-istio nightly (# 14048)%0A  > 8fc4bb9 Update net-gateway-api nightly (# 14047)%0A  > 135be30 Update net-certmanager nightly (# 14046)%0A  > 8da71b5 Update net-kourier nightly (# 14042)%0A  > 13a4e46 poll until timeout - don't error out if the deployment can't be found (# 14027)%0A  > 31c2b7e upgrade to latest dependencies (# 14043)%0A  > 6a6e417 Update net-istio nightly (# 14041)%0A  > 807fc2c Update net-certmanager nightly (# 14040)%0A  > 3c23945 drop safe to evict annotations (# 14035)%0A  > fca5c14 Update net-gateway-api nightly (# 14033)%0A  > c12c917 Update net-contour nightly (# 14034)%0A  > 2da856d Update net-kourier nightly (# 14032)%0A  > d7c8779 Update net-certmanager nightly (# 14031)%0A  > aaf01dc Update net-istio nightly (# 14030)%0A  > bdaa436 RandomChoice 2 policy wasn't random when the number of targets is 2 (with equal weight) (# 14028)%0A  > c91f8c4 Fix metrics reporting period (# 14019)%0A  > 9f60969 Update net-kourier nightly (# 14004)%0A  > 6020cec Update net-istio nightly (# 14025)%0A  > 88cae7f Update net-gateway-api nightly (# 14016)%0A  > a143bf8 Update net-contour nightly (# 14015)%0A  > c2be582 Update net-certmanager nightly (# 14014)%0A  > 3450f0a upgrade to latest dependencies (# 14013)%0A  > 35cfd8f [Automated] Update net-gateway-api nightly (# 14003)%0A  > 08a9708 Update net-istio nightly (# 14009)%0A  > 5074b4c Update net-contour nightly (# 14010)%0A  > e8cb343 upgrade to latest dependencies (# 13999)%0A  > 1261074 Update net-certmanager nightly (# 14002)%0A  > f987ca6 Bump kind to 0.19 (# 14008)%0A  > fbb7fa1 Update community files (# 13998)%0A  > bff1d80 Remove 1.24 kind version (# 14007)%0Abumping knative.dev/networking fcbedad...14a2bd4:%0A  > 14a2bd4 Move `pkg/certificates` from `control-protocol` to `networking` (# 802)%0A  > 2daa483 Update community files (# 813)%0A  > 0dbe4f9 upgrade to latest dependencies (# 812)%0A  > 2a2f7d2 upgrade to latest dependencies (# 810)%0Abumping knative.dev/pkg ec20442...74c4be5:%0A  > 74c4be5 Generate kresource duck type codegen (# 2754)%0A  > 4dbc312 fix boilerplate (# 2753)%0A  > 15605c7 Defaulting Controller options for all kind of webhooks (# 2738)%0A  > 94b81fc Update community files (# 2752)%0A  > 5671699 drop the dynamic type (# 2750)%0A  > 9bda38b Fix some webhook testing tech debt (# 2751)%0Abumping knative.dev/hack 5812c57...a861c8e:%0A  > a861c8e Update community files (# 294)%0A  > 5b7907f Update actions (# 289)%0A  > c133d5d Install Istio for tests (# 291)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation committed Jun 13, 2023
1 parent cc1a637 commit 893ca02
Show file tree
Hide file tree
Showing 30 changed files with 133 additions and 155 deletions.
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ require (
k8s.io/cli-runtime v0.25.2
k8s.io/client-go v0.26.5
k8s.io/code-generator v0.26.5
knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1
knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac
knative.dev/networking v0.0.0-20230524015214-fcbedadd6544
knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead
knative.dev/serving v0.37.1-0.20230523161715-a65732110abe
knative.dev/eventing v0.37.1-0.20230612151403-631f4ec968e4
knative.dev/hack v0.0.0-20230606014732-a861c8e9da08
knative.dev/networking v0.0.0-20230606132626-14a2bd466ad6
knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e
knative.dev/serving v0.37.1-0.20230609130759-5a90438bbd9d
sigs.k8s.io/yaml v1.3.0
)

Expand Down
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1063,16 +1063,16 @@ k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 h1:+70TFaan3hfJzs+7VK2o+O
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 h1:GfD9OzL11kvZN5iArC6oTS7RTj7oJOIfnislxYlqTj8=
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1 h1:SGl13bqxsUO1ay5iq8jvUN/WCOi7T4UcmHI808Jt4XA=
knative.dev/eventing v0.37.1-0.20230524084610-5e245ac60ff1/go.mod h1:y+smuOGee5eJxaZ6jqtuT93TROmEk65yVganVJPu8l4=
knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac h1:XQrhtfWPsyuxwSxv4GhcFnqZh75Nq+L1iZWhFMz4aPg=
knative.dev/hack v0.0.0-20230524013611-5812c57cc1ac/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20230524015214-fcbedadd6544 h1:vt3KiVNijeZRXCXfBv0rdL0dSNuzgww79uPStZi7YbY=
knative.dev/networking v0.0.0-20230524015214-fcbedadd6544/go.mod h1:Y0OGdDIPKUGY5WFoKBR5KKCLsnAHbYEbzfXeWs2rYJw=
knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead h1:dcBDhkP6hd9VaV9nLukg75bIrvJs4YiSVOv0h2evOFc=
knative.dev/pkg v0.0.0-20230524013411-ec20442c6ead/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk=
knative.dev/serving v0.37.1-0.20230523161715-a65732110abe h1:npo2CrMay/nbRbbU3Nc6IqN3HE5Qo+IOt2rzw6p/olI=
knative.dev/serving v0.37.1-0.20230523161715-a65732110abe/go.mod h1:dsvhn0bjCzJBhNpNCH4jsfMWxnaPVgexD9iVuRjwcgY=
knative.dev/eventing v0.37.1-0.20230612151403-631f4ec968e4 h1:YZZkKE550fLhqCg4C1bZnPfJfmtu99CgR4f9oJtO4Ss=
knative.dev/eventing v0.37.1-0.20230612151403-631f4ec968e4/go.mod h1:00ZmViqsuF5wC8D9XvPGxfrT3Fb3JIaRvIzjk+3ppHo=
knative.dev/hack v0.0.0-20230606014732-a861c8e9da08 h1:6DH2ktsj5KoKMAxPFmiDopMCVR1LzhxFNy3D/JCg7JE=
knative.dev/hack v0.0.0-20230606014732-a861c8e9da08/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/networking v0.0.0-20230606132626-14a2bd466ad6 h1:m+CUC915l+Ey1DNmMlM/5bwzt/dPQOw43KD989xDdFI=
knative.dev/networking v0.0.0-20230606132626-14a2bd466ad6/go.mod h1:Z2HjQrktBjIbiqLf69ZrqbMjaJ1peSLJZhYwG+BjXno=
knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e h1:koM+NopG2Yw738NlJhQF3ZwpyS+HHznuLm294VYlUKg=
knative.dev/pkg v0.0.0-20230612155445-74c4be5e935e/go.mod h1:dqC6IrvyBE7E+oZocs5PkVhq1G59pDTA7r8U17EAKMk=
knative.dev/serving v0.37.1-0.20230609130759-5a90438bbd9d h1:2QVcA2s0IwagfZgy+Gwvb9+SgyIwCArvE2rVT9YNoho=
knative.dev/serving v0.37.1-0.20230609130759-5a90438bbd9d/go.mod h1:qDiDL1sD4y1i5ZOUZsTcKIuNk8T3wvveqbAC/SPnEX4=
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
22 changes: 22 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/duck/v1/delivery_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,4 +154,26 @@ type DeliveryStatus struct {
// where failed events are sent to.
// +optional
DeadLetterSinkURI *apis.URL `json:"deadLetterSinkUri,omitempty"`
// DeadLetterSinkCACerts are Certification Authority (CA) certificates in PEM format
// according to https://www.rfc-editor.org/rfc/rfc7468.
// +optional
DeadLetterSinkCACerts *string `json:"deadLetterSinkCACerts,omitempty"`
}

func (ds *DeliveryStatus) IsSet() bool {
return ds.DeadLetterSinkURI != nil
}

func NewDeliveryStatusFromAddressable(addr *duckv1.Addressable) DeliveryStatus {
return DeliveryStatus{
DeadLetterSinkURI: addr.URL,
DeadLetterSinkCACerts: addr.CACerts,
}
}

func NewDestinationFromDeliveryStatus(status DeliveryStatus) duckv1.Destination {
return duckv1.Destination{
URI: status.DeadLetterSinkURI,
CACerts: status.DeadLetterSinkCACerts,
}
}

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

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

"knative.dev/pkg/apis"
v1 "knative.dev/pkg/apis/duck/v1"

eventingduck "knative.dev/eventing/pkg/apis/duck/v1"
)

const (
Expand Down Expand Up @@ -104,17 +106,17 @@ func (bs *BrokerStatus) InitializeConditions() {
bs.GetConditionSet().Manage(bs).InitializeConditions()
}

func (bs *BrokerStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSinkURI *apis.URL) {
bs.DeadLetterSinkURI = deadLetterSinkURI
func (bs *BrokerStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSink eventingduck.DeliveryStatus) {
bs.DeliveryStatus = deadLetterSink
bs.GetConditionSet().Manage(bs).MarkTrue(BrokerConditionDeadLetterSinkResolved)
}

func (bs *BrokerStatus) MarkDeadLetterSinkNotConfigured() {
bs.DeadLetterSinkURI = nil
bs.DeliveryStatus = eventingduck.DeliveryStatus{}
bs.GetConditionSet().Manage(bs).MarkTrueWithReason(BrokerConditionDeadLetterSinkResolved, "DeadLetterSinkNotConfigured", "No dead letter sink is configured.")
}

func (bs *BrokerStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat string, messageA ...interface{}) {
bs.DeadLetterSinkURI = nil
bs.DeliveryStatus = eventingduck.DeliveryStatus{}
bs.GetConditionSet().Manage(bs).MarkFalse(BrokerConditionDeadLetterSinkResolved, reason, messageFormat, messageA...)
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ package v1
import (
corev1 "k8s.io/api/core/v1"

eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"

eventingduckv1 "knative.dev/eventing/pkg/apis/duck/v1"
messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
)

type testHelper struct{}
Expand Down Expand Up @@ -61,7 +62,7 @@ func (t testHelper) ReadyBrokerStatus() *BrokerStatus {
bs.PropagateTriggerChannelReadiness(t.ReadyChannelStatus())
bs.PropagateFilterAvailability(t.AvailableEndpoints())
bs.SetAddress(apis.HTTP("example.com"))
bs.MarkDeadLetterSinkResolvedSucceeded(nil)
bs.MarkDeadLetterSinkResolvedSucceeded(eventingduckv1.DeliveryStatus{})
return bs
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package v1beta1
import (
"context"

duckv1 "knative.dev/pkg/apis/duck/v1"

"knative.dev/eventing/pkg/apis/eventing/v1beta2"

"knative.dev/pkg/apis"
Expand All @@ -33,11 +35,15 @@ func (source *EventType) ConvertTo(ctx context.Context, obj apis.Convertible) er
Status: source.Status.Status,
}
sink.Spec = v1beta2.EventTypeSpec{
Type: source.Spec.Type,
Source: source.Spec.Source,
Schema: source.Spec.Schema,
SchemaData: source.Spec.SchemaData,
Broker: source.Spec.Broker,
Type: source.Spec.Type,
Source: source.Spec.Source,
Schema: source.Spec.Schema,
SchemaData: source.Spec.SchemaData,
Reference: &duckv1.KReference{
APIVersion: "eventing.knative.dev/v1",
Kind: "Broker",
Name: source.Spec.Broker,
},
Description: source.Spec.Description,
}

Expand All @@ -61,7 +67,7 @@ func (sink *EventType) ConvertFrom(ctx context.Context, obj apis.Convertible) er
Source: source.Spec.Source,
Schema: source.Spec.Schema,
SchemaData: source.Spec.SchemaData,
Broker: source.Spec.Broker,
Broker: source.Spec.Reference.Name,
Description: source.Spec.Description,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type EventType struct {
// Status represents the current state of the EventType.
// This data may be out of date.
// +optional
// TODO might be removed https://github.com/knative/eventing/issues/2750
Status EventTypeStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -77,7 +76,6 @@ type EventTypeSpec struct {
// The contents are not validated or manipulated by the system.
// +optional
SchemaData string `json:"schemaData,omitempty"`
// TODO remove https://github.com/knative/eventing/issues/2750
// Broker refers to the Broker that can provide the EventType.
// +optional
Broker string `json:"broker,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,22 @@ limitations under the License.

package v1beta2

import "context"
import (
"context"

duckv1 "knative.dev/pkg/apis/duck/v1"
)

func (et *EventType) SetDefaults(ctx context.Context) {
et.Spec.SetDefaults(ctx)
}

func (ets *EventTypeSpec) SetDefaults(ctx context.Context) {
if ets.Broker == "" {
ets.Broker = "default"
if ets.Reference == nil {
ets.Reference = &duckv1.KReference{
APIVersion: "eventing.knative.dev/v1",
Kind: "Broker",
Name: "default",
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type EventType struct {
// Status represents the current state of the EventType.
// This data may be out of date.
// +optional
// TODO might be removed https://github.com/knative/eventing/issues/2750
Status EventTypeStatus `json:"status,omitempty"`
}

Expand Down Expand Up @@ -77,10 +76,14 @@ type EventTypeSpec struct {
// The contents are not validated or manipulated by the system.
// +optional
SchemaData string `json:"schemaData,omitempty"`
// TODO remove https://github.com/knative/eventing/issues/2750
// Broker refers to the Broker that can provide the EventType.
// Deprecated: This field is deprecated and will be removed in a future release.
// +optional
Broker string `json:"broker,omitempty"`
// Reference is a KReference to the belonging addressable.
//For example, this could be a pointer to a Broker.
// +optional
Reference *duckv1.KReference `json:"reference,omitempty"`
// Description is an optional field used to describe the EventType, in any meaningful way.
// +optional
Description string `json:"description,omitempty"`
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ package v1
import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
eventingduck "knative.dev/eventing/pkg/apis/duck/v1"
"knative.dev/pkg/apis"
duckv1 "knative.dev/pkg/apis/duck/v1"

eventingduck "knative.dev/eventing/pkg/apis/duck/v1"
)

var chCondSet = apis.NewLivingConditionSet(
Expand Down Expand Up @@ -131,17 +132,17 @@ func (cs *ChannelStatus) PropagateStatuses(chs *eventingduck.ChannelableStatus)
cs.SubscribableStatus = chs.SubscribableStatus
}

func (cs *ChannelStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSinkURI *apis.URL) {
cs.DeliveryStatus.DeadLetterSinkURI = deadLetterSinkURI
func (cs *ChannelStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSink eventingduck.DeliveryStatus) {
cs.DeliveryStatus = deadLetterSink
chCondSet.Manage(cs).MarkTrue(ChannelConditionDeadLetterSinkResolved)
}

func (cs *ChannelStatus) MarkDeadLetterSinkNotConfigured() {
cs.DeadLetterSinkURI = nil
cs.DeliveryStatus = eventingduck.DeliveryStatus{}
chCondSet.Manage(cs).MarkTrueWithReason(ChannelConditionDeadLetterSinkResolved, "DeadLetterSinkNotConfigured", "No dead letter sink is configured.")
}

func (cs *ChannelStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat string, messageA ...interface{}) {
cs.DeadLetterSinkURI = nil
cs.DeliveryStatus = eventingduck.DeliveryStatus{}
chCondSet.Manage(cs).MarkFalse(ChannelConditionDeadLetterSinkResolved, reason, messageFormat, messageA...)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
"k8s.io/utils/pointer"
"knative.dev/pkg/apis"
v1 "knative.dev/pkg/apis/duck/v1"

eventingduck "knative.dev/eventing/pkg/apis/duck/v1"
)

var imcCondSet = apis.NewLivingConditionSet(
Expand Down Expand Up @@ -97,10 +99,10 @@ func (imcs *InMemoryChannelStatus) InitializeConditions() {
imcCondSet.Manage(imcs).InitializeConditions()
}

func (imcs *InMemoryChannelStatus) SetAddress(url *apis.URL) {
imcs.Address = &v1.Addressable{URL: url}
if url != nil {
imcs.Address.Name = pointer.String(url.Scheme)
func (imcs *InMemoryChannelStatus) SetAddress(addr *v1.Addressable) {
imcs.Address = addr
if addr != nil && addr.URL != nil {
imcs.Address.Name = pointer.String(addr.URL.Scheme)
imcCondSet.Manage(imcs).MarkTrue(InMemoryChannelConditionAddressable)
} else {
imcCondSet.Manage(imcs).MarkFalse(InMemoryChannelConditionAddressable, "emptyHostname", "hostname is the empty string")
Expand Down Expand Up @@ -166,17 +168,17 @@ func (imcs *InMemoryChannelStatus) MarkEndpointsTrue() {
imcCondSet.Manage(imcs).MarkTrue(InMemoryChannelConditionEndpointsReady)
}

func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkResolvedSucceeded(deadLetterSinkURI *apis.URL) {
imcs.DeliveryStatus.DeadLetterSinkURI = deadLetterSinkURI
func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkResolvedSucceeded(ds eventingduck.DeliveryStatus) {
imcs.DeliveryStatus = ds
imcCondSet.Manage(imcs).MarkTrue(InMemoryChannelConditionDeadLetterSinkResolved)
}

func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkNotConfigured() {
imcs.DeadLetterSinkURI = nil
imcs.DeliveryStatus = eventingduck.DeliveryStatus{}
imcCondSet.Manage(imcs).MarkTrueWithReason(InMemoryChannelConditionDeadLetterSinkResolved, "DeadLetterSinkNotConfigured", "No dead letter sink is configured.")
}

func (imcs *InMemoryChannelStatus) MarkDeadLetterSinkResolvedFailed(reason, messageFormat string, messageA ...interface{}) {
imcs.DeadLetterSinkURI = nil
imcs.DeliveryStatus = eventingduck.DeliveryStatus{}
imcCondSet.Manage(imcs).MarkFalse(InMemoryChannelConditionDeadLetterSinkResolved, reason, messageFormat, messageA...)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"
duckv1 "knative.dev/pkg/apis/duck/v1"

"knative.dev/pkg/apis"
)
Expand Down Expand Up @@ -75,9 +76,10 @@ func (s *ApiServerSourceStatus) InitializeConditions() {
}

// MarkSink sets the condition that the source has a sink configured.
func (s *ApiServerSourceStatus) MarkSink(uri *apis.URL) {
s.SinkURI = uri
if uri != nil {
func (s *ApiServerSourceStatus) MarkSink(addr *duckv1.Addressable) {
if addr != nil {
s.SinkURI = addr.URL
s.SinkCACerts = addr.CACerts
apiserverCondSet.Manage(s).MarkTrue(ApiServerConditionSinkProvided)
} else {
apiserverCondSet.Manage(s).MarkFalse(ApiServerConditionSinkProvided, "SinkEmpty", "Sink has resolved to empty.%s", "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (c *Certificate) Validate(ctx context.Context) *apis.FieldError {
}

// Validate inspects and validates CertificateSpec object.
func (spec *CertificateSpec) Validate(ctx context.Context) (all *apis.FieldError) {
func (spec *CertificateSpec) Validate(_ context.Context) (all *apis.FieldError) {
// Spec must have at least one DNS Name.
if len(spec.DNSNames) == 0 {
all = all.Also(apis.ErrMissingField("dnsNames"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ func (d *Domain) SetDefaults(ctx context.Context) {
}

// SetDefaults populates default values in DomainSpec
func (*DomainSpec) SetDefaults(ctx context.Context) {
func (*DomainSpec) SetDefaults(_ context.Context) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ func (ds *DomainSpec) Validate(ctx context.Context) *apis.FieldError {
return all
}

func (lb *LoadBalancerIngressSpec) Validate(ctx context.Context) *apis.FieldError {
func (lb *LoadBalancerIngressSpec) Validate(_ context.Context) *apis.FieldError {
var all *apis.FieldError
if lb.Domain == "" && lb.DomainInternal == "" && lb.IP == "" && !lb.MeshOnly {
return all.Also(apis.ErrMissingOneOf("domain", "domainInternal", "ip", "meshOnly"))
}
return all
}

func (cfg *IngressConfig) Validate(ctx context.Context) *apis.FieldError {
func (cfg *IngressConfig) Validate(_ context.Context) *apis.FieldError {
var all *apis.FieldError
if cfg.Name == "" {
all = all.Also(apis.ErrMissingField("name"))
Expand Down
Loading

0 comments on commit 893ca02

Please sign in to comment.