Skip to content

Commit b4c0bfe

Browse files
knative-prow-robotmatzewcreydr
authored
[release-1.18] Check for Auth.ServiceAccountName when the OIDC feature flag is switched on to avoid potential nil (#8582)
* broom: when the OIDC feature flag is switched on, quickly before. It might be the case that the OIDC Service Account is not reconciled at that time Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> * Update pkg/reconciler/inmemorychannel/dispatcher/inmemorychannel.go Co-authored-by: Christoph Stäbler <cstabler@redhat.com> --------- Signed-off-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Matthias Wessendorf <mwessend@redhat.com> Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
1 parent 5b7ba59 commit b4c0bfe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/reconciler/inmemorychannel/dispatcher/inmemorychannel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func newConfigForInMemoryChannel(ctx context.Context, imc *v1.InMemoryChannel) (
241241
}
242242

243243
conf.Namespace = imc.Namespace
244-
if isOIDCEnabled {
244+
if isOIDCEnabled && sub.Auth != nil && sub.Auth.ServiceAccountName != nil {
245245
conf.ServiceAccount = &types.NamespacedName{
246246
Name: *sub.Auth.ServiceAccountName,
247247
Namespace: imc.Namespace,

0 commit comments

Comments
 (0)