Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/reconciler-test 36fcbd0...9972366:
  > 9972366 upgrade to latest dependencies (# 631)
bumping knative.dev/eventing d964da3...dc96522:
  > dc96522 Add serviceaccount in parallel (# 7373)
  > 32d7dd8 Allow configuring whether to allow cross namespaces Brokers configuration references (# 7455)
  > 203fa93 Add deprecation warnings for EventType v1beta1 (# 7453)
  > e5f2814 support auto generation of Sequence identity service account [OIDC] (# 7361)
  > 8ebe869 Deprecate EventType v1b1 API (# 7303)
  > a9320dc Add deprecation warnings for v1b2 (# 7454)
  > 3162518 [main] Upgrade to latest dependencies (# 7450)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Nov 17, 2023
1 parent a058c1a commit 6556c62
Show file tree
Hide file tree
Showing 11 changed files with 139 additions and 12 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ require (
k8s.io/client-go v0.27.6
k8s.io/code-generator v0.27.6
k8s.io/kube-openapi v0.0.0-20230928205116-a78145627833
knative.dev/eventing v0.39.1-0.20231114180859-d964da3a8ace
knative.dev/eventing v0.39.1-0.20231117075909-dc965225f635
knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7
knative.dev/pkg v0.0.0-20231115001034-97c7258e3a98
knative.dev/reconciler-test v0.0.0-20231109234136-36fcbd054949
knative.dev/reconciler-test v0.0.0-20231115072946-99723665c94d
sigs.k8s.io/controller-runtime v0.15.2
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1870,14 +1870,14 @@ k8s.io/kube-openapi v0.0.0-20230928205116-a78145627833 h1:iFFEmmB7szQhJP42AvRD2+
k8s.io/kube-openapi v0.0.0-20230928205116-a78145627833/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI=
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
knative.dev/eventing v0.39.1-0.20231114180859-d964da3a8ace h1:zKNCpnzCVHO8YqHiKX/l3PmpEiirG0z517j3Qf1B9p4=
knative.dev/eventing v0.39.1-0.20231114180859-d964da3a8ace/go.mod h1:bG5Dzu03aolsgCmoUwCYjcQuI4Puo31dBz7Ho/ZYZg4=
knative.dev/eventing v0.39.1-0.20231117075909-dc965225f635 h1:UuDZus9PmvDRLDsPe2M8abuoorvx53SMIbqJkpmuR2w=
knative.dev/eventing v0.39.1-0.20231117075909-dc965225f635/go.mod h1:LGZfBR1ykKiLBF06aX+C7vqe4HogiNc9MmFpJz9lvtw=
knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7 h1:HXf7M7n9jwn+Hp904r0HXRSymf+DLXSciFpXVpCg+Bs=
knative.dev/hack v0.0.0-20231109190034-5deaddeb51a7/go.mod h1:yk2OjGDsbEnQjfxdm0/HJKS2WqTLEFg/N6nUs6Rqx3Q=
knative.dev/pkg v0.0.0-20231115001034-97c7258e3a98 h1:uvOLwp5Ar7oJlaYEszh51CemuZc1sRRI14xzKhUEF3U=
knative.dev/pkg v0.0.0-20231115001034-97c7258e3a98/go.mod h1:56Qcm0ai7xPWqGxpOnjRi4sAX9fZM9UDTk7fKyjUqZM=
knative.dev/reconciler-test v0.0.0-20231109234136-36fcbd054949 h1:/YkzlzrywuNVwpGyLVgFkwbmmRpXxNL1gcXQ4xkELGY=
knative.dev/reconciler-test v0.0.0-20231109234136-36fcbd054949/go.mod h1:Ps0NWuOGMxNZcnc2kpnPfySnPZ+eGc0LDEEk4qhPI6I=
knative.dev/reconciler-test v0.0.0-20231115072946-99723665c94d h1:pvpbn1jetRm2qk2nGFS0Wrujmmu+dnkEi3a3aNlVVbQ=
knative.dev/reconciler-test v0.0.0-20231115072946-99723665c94d/go.mod h1:V5dY5ZYfAwVe2JzJ6+WSwg1v9uzTrDR/vb0EHC01C+g=
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
modernc.org/cc/v3 v3.36.0/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI=
Expand Down
2 changes: 2 additions & 0 deletions vendor/knative.dev/eventing/pkg/apis/config/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ type Defaults struct {
type ClassAndBrokerConfig struct {
BrokerClass string `json:"brokerClass,omitempty"`
*BrokerConfig `json:",inline"`

DisallowDifferentNamespaceConfig *bool `json:"disallowDifferentNamespaceConfig,omitempty"`
}

// BrokerConfig contains configuration for a given namespace for broker. Allows
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 @@ -23,14 +23,31 @@ import (

"knative.dev/pkg/apis"
"knative.dev/pkg/kmp"

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

const (
BrokerClassAnnotationKey = "eventing.knative.dev/broker.class"
)

func (b *Broker) Validate(ctx context.Context) *apis.FieldError {
withNS := apis.AllowDifferentNamespace(apis.WithinParent(ctx, b.ObjectMeta))
ctx = apis.WithinParent(ctx, b.ObjectMeta)

cfg := config.FromContextOrDefaults(ctx)
var brConfig *config.ClassAndBrokerConfig
if cfg.Defaults != nil {
if c, ok := cfg.Defaults.NamespaceDefaultsConfig[b.GetNamespace()]; ok {
brConfig = c
} else {
brConfig = cfg.Defaults.ClusterDefault
}
}

withNS := ctx
if brConfig == nil || brConfig.DisallowDifferentNamespaceConfig == nil || !*brConfig.DisallowDifferentNamespaceConfig {
withNS = apis.AllowDifferentNamespace(ctx)
}

// Make sure a BrokerClassAnnotation exists
var errs *apis.FieldError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

// EventType represents a type of event that can be consumed from a Broker.
// Deprecated: use v1beta2.EventType instead.
type EventType struct {
metav1.TypeMeta `json:",inline"`
// +optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
pkgduckv1 "knative.dev/pkg/apis/duck/v1"
)

var pCondSet = apis.NewLivingConditionSet(ParallelConditionReady, ParallelConditionChannelsReady, ParallelConditionSubscriptionsReady, ParallelConditionAddressable)
var pCondSet = apis.NewLivingConditionSet(ParallelConditionReady, ParallelConditionChannelsReady, ParallelConditionSubscriptionsReady, ParallelConditionAddressable, ParallelConditionOIDCIdentityCreated)

const (
// ParallelConditionReady has status True when all subconditions below have been set to True.
Expand All @@ -41,7 +41,8 @@ const (

// ParallelConditionAddressable has status true when this Parallel meets
// the Addressable contract and has a non-empty hostname.
ParallelConditionAddressable apis.ConditionType = "Addressable"
ParallelConditionAddressable apis.ConditionType = "Addressable"
ParallelConditionOIDCIdentityCreated apis.ConditionType = "OIDCIdentityCreated"
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
Expand Down Expand Up @@ -195,6 +196,22 @@ func (ps *ParallelStatus) MarkAddressableNotReady(reason, messageFormat string,
pCondSet.Manage(ps).MarkFalse(ParallelConditionAddressable, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) MarkOIDCIdentityCreatedSucceeded() {
pCondSet.Manage(ps).MarkTrue(ParallelConditionOIDCIdentityCreated)
}

func (ps *ParallelStatus) MarkOIDCIdentityCreatedSucceededWithReason(reason, messageFormat string, messageA ...interface{}) {
pCondSet.Manage(ps).MarkTrueWithReason(ParallelConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) MarkOIDCIdentityCreatedFailed(reason, messageFormat string, messageA ...interface{}) {
pCondSet.Manage(ps).MarkFalse(ParallelConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) MarkOIDCIdentityCreatedUnknown(reason, messageFormat string, messageA ...interface{}) {
pCondSet.Manage(ps).MarkUnknown(ParallelConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}

func (ps *ParallelStatus) setAddress(address *pkgduckv1.Addressable) {
ps.Address = address
if address == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import (
duckv1 "knative.dev/pkg/apis/duck/v1"
)

var sCondSet = apis.NewLivingConditionSet(SequenceConditionReady, SequenceConditionChannelsReady, SequenceConditionSubscriptionsReady, SequenceConditionAddressable)
var sCondSet = apis.NewLivingConditionSet(SequenceConditionReady, SequenceConditionChannelsReady, SequenceConditionSubscriptionsReady, SequenceConditionAddressable,
SequenceConditionOIDCIdentityCreated)

const (
// SequenceConditionReady has status True when all subconditions below have been set to True.
Expand All @@ -45,6 +46,10 @@ const (
// SequenceConditionAddressable has status true when this Sequence meets
// the Addressable contract and has a non-empty hostname.
SequenceConditionAddressable apis.ConditionType = "Addressable"

// SequenceConditionOIDCIdentityCreated has status True when the OIDCIdentity has been created.
// This condition is only relevant if the OIDC feature is enabled.
SequenceConditionOIDCIdentityCreated apis.ConditionType = "OIDCIdentityCreated"
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
Expand Down Expand Up @@ -190,3 +195,23 @@ func (ss *SequenceStatus) setAddress(address *duckv1.Addressable) {
sCondSet.Manage(ss).MarkTrue(SequenceConditionAddressable)
}
}

// MarkOIDCIdentityCreatedSucceeded marks the OIDCIdentityCreated condition as true.
func (ss *SequenceStatus) MarkOIDCIdentityCreatedSucceeded() {
sCondSet.Manage(ss).MarkTrue(SequenceConditionOIDCIdentityCreated)
}

// MarkOIDCIdentityCreatedSucceededWithReason marks the OIDCIdentityCreated condition as true with the given reason.
func (ss *SequenceStatus) MarkOIDCIdentityCreatedSucceededWithReason(reason, messageFormat string, messageA ...interface{}) {
sCondSet.Manage(ss).MarkTrueWithReason(SequenceConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}

// MarkOIDCIdentityCreatedFailed marks the OIDCIdentityCreated condition as false with the given reason.
func (ss *SequenceStatus) MarkOIDCIdentityCreatedFailed(reason, messageFormat string, messageA ...interface{}) {
sCondSet.Manage(ss).MarkFalse(SequenceConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}

// MarkOIDCIdentityCreatedUnknown marks the OIDCIdentityCreated condition as unknown with the given reason.
func (ss *SequenceStatus) MarkOIDCIdentityCreatedUnknown(reason, messageFormat string, messageA ...interface{}) {
sCondSet.Manage(ss).MarkUnknown(SequenceConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}
30 changes: 30 additions & 0 deletions vendor/knative.dev/eventing/pkg/reconciler/testing/v1/parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ package testing

import (
"context"
"fmt"
"time"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/eventing/pkg/apis/feature"
flowsv1 "knative.dev/eventing/pkg/apis/flows/v1"
messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
duckv1 "knative.dev/pkg/apis/duck/v1"
Expand Down Expand Up @@ -113,3 +115,31 @@ func WithFlowsParallelAddressableNotReady(reason, message string) FlowsParallelO
p.Status.MarkAddressableNotReady(reason, message)
}
}

func WithFlowsParallelOIDCIdentityCreatedSucceeded() FlowsParallelOption {
return func(p *flowsv1.Parallel) {
p.Status.MarkOIDCIdentityCreatedSucceeded()
}
}

func WithFlowsParallelOIDCIdentityCreatedSucceededBecauseOIDCFeatureDisabled() FlowsParallelOption {
return func(p *flowsv1.Parallel) {
p.Status.MarkOIDCIdentityCreatedSucceededWithReason(fmt.Sprintf("%s feature disabled", feature.OIDCAuthentication), "")
}
}

func WithFlowsParallelOIDCIdentityCreatedFailed(reason, message string) FlowsParallelOption {
return func(p *flowsv1.Parallel) {
p.Status.MarkOIDCIdentityCreatedFailed(reason, message)
}
}

func WithFlowsParallelOIDCServiceAccountName(name string) FlowsParallelOption {
return func(p *flowsv1.Parallel) {
if p.Status.Auth == nil {
p.Status.Auth = &duckv1.AuthStatus{}
}

p.Status.Auth.ServiceAccountName = &name
}
}
30 changes: 30 additions & 0 deletions vendor/knative.dev/eventing/pkg/reconciler/testing/v1/sequence.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ package testing

import (
"context"
"fmt"
"time"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"knative.dev/eventing/pkg/apis/feature"
flowsv1 "knative.dev/eventing/pkg/apis/flows/v1"
messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
duckv1 "knative.dev/pkg/apis/duck/v1"
Expand Down Expand Up @@ -113,3 +115,31 @@ func WithSequenceAddressableNotReady(reason, message string) SequenceOption {
p.Status.MarkAddressableNotReady(reason, message)
}
}

func WithSequenceOIDCIdentityCreatedSucceeded() SequenceOption {
return func(s *flowsv1.Sequence) {
s.Status.MarkOIDCIdentityCreatedSucceeded()
}
}

func WithSequenceOIDCIdentityCreatedSucceededBecauseOIDCFeatureDisabled() SequenceOption {
return func(s *flowsv1.Sequence) {
s.Status.MarkOIDCIdentityCreatedSucceededWithReason(fmt.Sprintf("%s feature disabled", feature.OIDCAuthentication), "")
}
}

func WithSequenceOIDCIdentityCreatedFailed(reason, message string) SequenceOption {
return func(s *flowsv1.Sequence) {
s.Status.MarkOIDCIdentityCreatedFailed(reason, message)
}
}

func WithSequenceOIDCServiceAccountName(name string) SequenceOption {
return func(s *flowsv1.Sequence) {
if s.Status.Auth == nil {
s.Status.Auth = &duckv1.AuthStatus{}
}

s.Status.Auth.ServiceAccountName = &name
}
}
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.39.1-0.20231114180859-d964da3a8ace
# knative.dev/eventing v0.39.1-0.20231117075909-dc965225f635
## explicit; go 1.19
knative.dev/eventing/cmd/heartbeats
knative.dev/eventing/pkg/adapter/v2
Expand Down Expand Up @@ -1304,7 +1304,7 @@ knative.dev/pkg/webhook/json
knative.dev/pkg/webhook/resourcesemantics
knative.dev/pkg/webhook/resourcesemantics/defaulting
knative.dev/pkg/webhook/resourcesemantics/validation
# knative.dev/reconciler-test v0.0.0-20231109234136-36fcbd054949
# knative.dev/reconciler-test v0.0.0-20231115072946-99723665c94d
## explicit; go 1.20
knative.dev/reconciler-test/cmd/eventshub
knative.dev/reconciler-test/pkg/environment
Expand Down

0 comments on commit 6556c62

Please sign in to comment.