Summary
In synthesizePipeline(), when ClientAuthType == "federated-jwt", the webhook sets identity.type=spiffe unconditionally but only sets jwt_audience when JWTAudience != "". If the authbridge-config CM is hand-authored or from a pre-upgrade install without JWT_AUDIENCE, the authbridge binary will crash at startup with:
identity.type=spiffe requires identity.jwt_audience to be set
Operator-managed CMs always have JWT_AUDIENCE populated (written by buildConfigMapData), so this only affects hand-authored CMs.
Suggested fix
Add a log warning in synthesizePipeline() when identity.type=spiffe is set but JWTAudience is empty, so operators get a heads-up before the pod crashes. Failing loudly is the right behavior (wrong audience is worse than a crash), but a warning makes the root cause more discoverable.
Context
Summary
In
synthesizePipeline(), whenClientAuthType == "federated-jwt", the webhook setsidentity.type=spiffeunconditionally but only setsjwt_audiencewhenJWTAudience != "". If theauthbridge-configCM is hand-authored or from a pre-upgrade install withoutJWT_AUDIENCE, the authbridge binary will crash at startup with:Operator-managed CMs always have
JWT_AUDIENCEpopulated (written bybuildConfigMapData), so this only affects hand-authored CMs.Suggested fix
Add a log warning in
synthesizePipeline()whenidentity.type=spiffeis set butJWTAudienceis empty, so operators get a heads-up before the pod crashes. Failing loudly is the right behavior (wrong audience is worse than a crash), but a warning makes the root cause more discoverable.Context
pod_mutator.go:910jwt_audiencefix but deferred the warning