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 5bf0b86...de3a013:
  > de3a013 Use knative/actions/setup-go to be in sync with other projects (# 740)
  > 0377f8e upgrade to latest dependencies (# 739)
bumping knative.dev/eventing a6ac811...399bb86:
  > 399bb86 Reconcile EventPolicies when features configmap changes (# 8059)
  > 4f2b53f Set APIVersion and Kind of EventPolicy manually in OwnerReference of backing channels policy (# 8031)
  > 96c30bd List applying EventPolicies in Sequence status (# 8012)
  > 3b1bfb4 feat(test): create knsubscribe rolebinding to current user in e2e test setup (# 8055)
  > beb71be Add EventPolicy Reconciler (# 8024)
  > 6992e6f Avoid fatal errors for unknown features flags that can be added in a future release (# 8051)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Jul 3, 2024
1 parent 79cd352 commit eab37a8
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 22 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ require (
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
knative.dev/eventing v0.41.1-0.20240627060150-a6ac8111e82f
knative.dev/eventing v0.41.1-0.20240703122847-399bb86dce50
knative.dev/hack v0.0.0-20240607132042-09143140a254
knative.dev/hack/schema v0.0.0-20240607132042-09143140a254
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4
knative.dev/reconciler-test v0.0.0-20240618170853-5bf0b86114f8
knative.dev/reconciler-test v0.0.0-20240702140541-de3a0139e854
)

require (
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -866,16 +866,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.20240627060150-a6ac8111e82f h1:FuJQSlda7F1Yk1eaSSvWXq7ic9h4Lo/s9EjMnKCoFcg=
knative.dev/eventing v0.41.1-0.20240627060150-a6ac8111e82f/go.mod h1:3h0QrfHELs61mrTI4GDPEQh4rwsap0YYA5XgRrNgnlc=
knative.dev/eventing v0.41.1-0.20240703122847-399bb86dce50 h1:HZa4X6L8CrwE9Mdyez35j7EPY2PJxLIrqV9NU8k9nAw=
knative.dev/eventing v0.41.1-0.20240703122847-399bb86dce50/go.mod h1:3h0QrfHELs61mrTI4GDPEQh4rwsap0YYA5XgRrNgnlc=
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/hack/schema v0.0.0-20240607132042-09143140a254 h1:b9hFHGtxx0Kpm4EEjSD72lL0jms91To3OEVBTbqfOYI=
knative.dev/hack/schema v0.0.0-20240607132042-09143140a254/go.mod h1:3pWwBLnTZSM9psSgCAvhKOHIPTzqfEMlWRpDu6IYhK0=
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4 h1:slPKf3UKdBFZlz+hFy+KXzTgY9yOePLzRuEhKzgc5a4=
knative.dev/pkg v0.0.0-20240626134149-3f6a546ac3a4/go.mod h1:Wikg4u73T6vk9TctrxZt60VXzqmGEQIx0iKfk1+9o4c=
knative.dev/reconciler-test v0.0.0-20240618170853-5bf0b86114f8 h1:A+rsitEiTX3GudM51g7zUMza+Ripj+boncmlJ2jZp50=
knative.dev/reconciler-test v0.0.0-20240618170853-5bf0b86114f8/go.mod h1:2uUx3U6kdIzgJgMGgrGmdDdcFrFiex/DjuI2gM7Tte8=
knative.dev/reconciler-test v0.0.0-20240702140541-de3a0139e854 h1:eyXZBmB8YfOzAzou00DNyS0p1g4dzISRsjGmKoDroJQ=
knative.dev/reconciler-test v0.0.0-20240702140541-de3a0139e854/go.mod h1:g+5v4Zdqt/e+172sJ1pKOqu4bS58RxxWyef7g/7nV4A=
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright 2020 The Knative Authors
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.
Expand All @@ -20,10 +20,12 @@ import (
"knative.dev/pkg/apis"
)

var eventPolicyCondSet = apis.NewLivingConditionSet()
var eventPolicyCondSet = apis.NewLivingConditionSet(EventPolicyConditionAuthenticationEnabled, EventPolicyConditionSubjectsResolved)

const (
EventPolicyConditionReady = apis.ConditionReady
EventPolicyConditionReady = apis.ConditionReady
EventPolicyConditionAuthenticationEnabled apis.ConditionType = "AuthenticationEnabled"
EventPolicyConditionSubjectsResolved apis.ConditionType = "SubjectsResolved"
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
Expand All @@ -32,21 +34,41 @@ func (*EventPolicy) GetConditionSet() apis.ConditionSet {
}

// GetCondition returns the condition currently associated with the given type, or nil.
func (et *EventPolicyStatus) GetCondition(t apis.ConditionType) *apis.Condition {
return eventPolicyCondSet.Manage(et).GetCondition(t)
func (ep *EventPolicyStatus) GetCondition(t apis.ConditionType) *apis.Condition {
return eventPolicyCondSet.Manage(ep).GetCondition(t)
}

// IsReady returns true if the resource is ready overall.
func (et *EventPolicyStatus) IsReady() bool {
return et.GetTopLevelCondition().IsTrue()
func (ep *EventPolicyStatus) IsReady() bool {
return ep.GetTopLevelCondition().IsTrue()
}

// GetTopLevelCondition returns the top level Condition.
func (et *EventPolicyStatus) GetTopLevelCondition() *apis.Condition {
return eventPolicyCondSet.Manage(et).GetTopLevelCondition()
func (ep *EventPolicyStatus) GetTopLevelCondition() *apis.Condition {
return eventPolicyCondSet.Manage(ep).GetTopLevelCondition()
}

// InitializeConditions sets relevant unset conditions to Unknown state.
func (et *EventPolicyStatus) InitializeConditions() {
eventPolicyCondSet.Manage(et).InitializeConditions()
func (ep *EventPolicyStatus) InitializeConditions() {
eventPolicyCondSet.Manage(ep).InitializeConditions()
}

// MarkOIDCAuthenticationEnabled sets EventPolicyConditionAuthenticationEnabled condition to true.
func (ep *EventPolicyStatus) MarkOIDCAuthenticationEnabled() {
eventPolicyCondSet.Manage(ep).MarkTrue(EventPolicyConditionAuthenticationEnabled)
}

// MarkOIDCAuthenticationDisabled sets EventPolicyConditionAuthenticationEnabled condition to false.
func (ep *EventPolicyStatus) MarkOIDCAuthenticationDisabled(reason, messageFormat string, messageA ...interface{}) {
eventPolicyCondSet.Manage(ep).MarkFalse(EventPolicyConditionAuthenticationEnabled, reason, messageFormat, messageA...)
}

// MarkSubjectsResolved sets EventPolicyConditionSubjectsResolved condition to true.
func (ep *EventPolicyStatus) MarkSubjectsResolvedSucceeded() {
eventPolicyCondSet.Manage(ep).MarkTrue(EventPolicyConditionSubjectsResolved)
}

// MarkSubjectsNotResolved sets EventPolicyConditionSubjectsResolved condition to false.
func (ep *EventPolicyStatus) MarkSubjectsResolvedFailed(reason, messageFormat string, messageA ...interface{}) {
eventPolicyCondSet.Manage(ep).MarkFalse(EventPolicyConditionSubjectsResolved, reason, messageFormat, messageA...)
}
4 changes: 3 additions & 1 deletion vendor/knative.dev/eventing/pkg/apis/feature/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package feature

import (
"fmt"
"log"
"strings"

corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -186,7 +187,8 @@ func NewFlagsConfigFromMap(data map[string]string) (Flags, error) {
} else if strings.Contains(k, NodeSelectorLabel) {
flags[sanitizedKey] = Flag(v)
} else {
return flags, fmt.Errorf("cannot parse the feature flag '%s' = '%s'", k, v)
flags[k] = Flag(v)
log.Printf("Warning: unknown feature flag value %q=%q\n", k, v)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ import (
duckv1 "knative.dev/pkg/apis/duck/v1"
)

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

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

// SequenceConditionEventPoliciesReady has status True when all the applying EventPolicies for this
// Sequence are ready.
SequenceConditionEventPoliciesReady apis.ConditionType = "EventPoliciesReady"
)

// GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
Expand Down Expand Up @@ -189,6 +199,22 @@ func (ss *SequenceStatus) MarkAddressableNotReady(reason, messageFormat string,
sCondSet.Manage(ss).MarkUnknown(SequenceConditionAddressable, reason, messageFormat, messageA...)
}

func (ss *SequenceStatus) MarkEventPoliciesFailed(reason, messageFormat string, messageA ...interface{}) {
sCondSet.Manage(ss).MarkFalse(SequenceConditionEventPoliciesReady, reason, messageFormat, messageA...)
}

func (ss *SequenceStatus) MarkEventPoliciesUnknown(reason, messageFormat string, messageA ...interface{}) {
sCondSet.Manage(ss).MarkUnknown(SequenceConditionEventPoliciesReady, reason, messageFormat, messageA...)
}

func (ss *SequenceStatus) MarkEventPoliciesTrue() {
sCondSet.Manage(ss).MarkTrue(SequenceConditionEventPoliciesReady)
}

func (ss *SequenceStatus) MarkEventPoliciesTrueWithReason(reason, messageFormat string, messageA ...interface{}) {
sCondSet.Manage(ss).MarkTrueWithReason(SequenceConditionEventPoliciesReady, reason, messageFormat, messageA...)
}

func (ss *SequenceStatus) setAddress(address *duckv1.Addressable) {
if address == nil || address.URL == nil {
ss.Address = duckv1.Addressable{}
Expand Down
6 changes: 3 additions & 3 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/strings/slices
k8s.io/utils/trace
# knative.dev/eventing v0.41.1-0.20240627060150-a6ac8111e82f
# knative.dev/eventing v0.41.1-0.20240703122847-399bb86dce50
## explicit; go 1.22
knative.dev/eventing/pkg/apis
knative.dev/eventing/pkg/apis/config
Expand Down Expand Up @@ -1190,8 +1190,8 @@ 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-20240618170853-5bf0b86114f8
## explicit; go 1.21
# knative.dev/reconciler-test v0.0.0-20240702140541-de3a0139e854
## explicit; go 1.22
knative.dev/reconciler-test/cmd/eventshub
knative.dev/reconciler-test/pkg/environment
knative.dev/reconciler-test/pkg/eventshub
Expand Down

0 comments on commit eab37a8

Please sign in to comment.