Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
Signed-off-by: rahulii <r.sawra@gmail.com>
  • Loading branch information
rahulii committed Oct 9, 2023
1 parent 8d87bc9 commit 9800d17
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 0 additions & 7 deletions pkg/apis/sources/v1/sinkbinding_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime/schema"

"knative.dev/eventing/pkg/apis/feature"
"knative.dev/pkg/apis"
"knative.dev/pkg/apis/duck"
duckv1 "knative.dev/pkg/apis/duck/v1"
Expand Down Expand Up @@ -73,7 +72,6 @@ func (sbs *SinkBindingStatus) SetObservedGeneration(gen int64) {
// with all of its conditions configured to Unknown.
func (sbs *SinkBindingStatus) InitializeConditions() {
sbCondSet.Manage(sbs).InitializeConditions()
sbs.MarkOIDCIdentityCreatedNotSupported()
}

// MarkBindingUnavailable marks the SinkBinding's Ready condition to False with
Expand Down Expand Up @@ -114,11 +112,6 @@ func (sbs *SinkBindingStatus) MarkOIDCIdentityCreatedUnknown(reason, messageForm
sbCondSet.Manage(sbs).MarkUnknown(SinkBindingConditionOIDCIdentityCreated, reason, messageFormat, messageA...)
}

func (sbs *SinkBindingStatus) MarkOIDCIdentityCreatedNotSupported() {
// in case the OIDC feature is not supported, we mark the condition as true, to not mark the SinkBinding unready.
sbCondSet.Manage(sbs).MarkTrueWithReason(SinkBindingConditionOIDCIdentityCreated, fmt.Sprintf("%s feature not yet supported for SinkBinding", feature.OIDCAuthentication), "")
}

// Do implements psbinding.Bindable
func (sb *SinkBinding) Do(ctx context.Context, ps *duckv1.WithPod) {
// First undo so that we can just unconditionally append below.
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/sources/v1/sinkbinding_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ func TestSinkBindingStatusIsReady(t *testing.T) {
s.InitializeConditions()
s.MarkSink(sink)
s.MarkBindingAvailable()
s.MarkOIDCIdentityCreatedSucceeded()
return s
}(),
want: true,
Expand Down

0 comments on commit 9800d17

Please sign in to comment.