Skip to content

Commit 966ddd0

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

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
@@ -240,7 +240,7 @@ func newConfigForInMemoryChannel(ctx context.Context, imc *v1.InMemoryChannel) (
240240
}
241241

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

0 commit comments

Comments
 (0)