Skip to content

Commit fd24f8a

Browse files
knative-prow-robotmatzewcreydr
authored
[release-1.17] Check for Auth.ServiceAccountName when the OIDC feature flag is switched on to avoid potential nil (#8583)
* 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 <[email protected]> * Update pkg/reconciler/inmemorychannel/dispatcher/inmemorychannel.go Co-authored-by: Christoph Stäbler <[email protected]> --------- Signed-off-by: Matthias Wessendorf <[email protected]> Co-authored-by: Matthias Wessendorf <[email protected]> Co-authored-by: Christoph Stäbler <[email protected]>
1 parent a5b1628 commit fd24f8a

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)