Skip to content

Commit f333296

Browse files
committed
Fix missing TLS ServerName in Provider notifications
Updates pkg/runtime/secrets to v0.75.0 which adds targetURL and insecure parameters to TLS functions. This resolves ServerName regression that caused TLS handshake failures in virtual hosting environments. The Provider API has no insecure field, so certificates are always verified (insecure=false). This maintains secure-by-default behavior and is consistent with the original pre-pkg/runtime/secrets implementation. All 17+ notification providers automatically benefit from proper ServerName setting through the centralized TLS configuration in createNotifier(). Signed-off-by: cappyzawa <[email protected]>
1 parent 4496c6e commit f333296

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/fluxcd/pkg/cache v0.10.0
2424
github.com/fluxcd/pkg/git v0.34.0
2525
github.com/fluxcd/pkg/masktoken v0.7.0
26-
github.com/fluxcd/pkg/runtime v0.74.0
26+
github.com/fluxcd/pkg/runtime v0.75.0
2727
github.com/fluxcd/pkg/ssa v0.51.0
2828
github.com/fluxcd/pkg/ssh v0.20.0
2929
github.com/getsentry/sentry-go v0.34.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ github.com/fluxcd/pkg/git v0.34.0 h1:qTViWkfpEDnjzySyKRKliqUeGj/DznqlkmPhaDNIsFY
146146
github.com/fluxcd/pkg/git v0.34.0/go.mod h1:F9Asm3MlLW4uZx3FF92+bqho+oktdMdnTn/QmXe56NE=
147147
github.com/fluxcd/pkg/masktoken v0.7.0 h1:pitmyOg2pUVdW+nn2Lk/xqm2TaA08uxvOC0ns3sz6bM=
148148
github.com/fluxcd/pkg/masktoken v0.7.0/go.mod h1:Lc1uoDjO1GY6+YdkK+ZqqBIBWquyV58nlSJ5S1N1IYU=
149-
github.com/fluxcd/pkg/runtime v0.74.0 h1:4SxBWJSU6vKIrAoUHtaJ190pHyK445qlmIgG2XC5Tb0=
150-
github.com/fluxcd/pkg/runtime v0.74.0/go.mod h1:iGhdaEq+lMJQTJNAFEPOU4gUJ7kt3yeDcJPZy7O9IUw=
149+
github.com/fluxcd/pkg/runtime v0.75.0 h1:wIaODmU5D54nyrehTqA9oQDFoi6BbBj/24adLStXc0I=
150+
github.com/fluxcd/pkg/runtime v0.75.0/go.mod h1:iGhdaEq+lMJQTJNAFEPOU4gUJ7kt3yeDcJPZy7O9IUw=
151151
github.com/fluxcd/pkg/ssa v0.51.0 h1:sFarxKZcS0J8sjq9qvs/r+1XiJqNgRodEiPjV75F8R4=
152152
github.com/fluxcd/pkg/ssa v0.51.0/go.mod h1:v+h9RC0JxWIqMTK2Eo+8Nh700AXyZChZ2TiLVj4tf3M=
153153
github.com/fluxcd/pkg/ssh v0.20.0 h1:Ak0laIYIc/L8lEfqls/LDWRW8wYPESGaravQsCRGLb8=

internal/server/event_handlers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,8 @@ func createNotifier(ctx context.Context, kubeClient client.Client, provider *api
432432
Name: provider.Spec.CertSecretRef.Name,
433433
Namespace: provider.GetNamespace(),
434434
}
435-
tlsConfig, err := secrets.TLSConfigFromSecretRef(ctx, kubeClient, secretRef)
435+
const insecure = false // Provider API has no insecure field, always verify certificates
436+
tlsConfig, err := secrets.TLSConfigFromSecretRef(ctx, kubeClient, secretRef, webhook, insecure)
436437
if err != nil {
437438
return nil, "", fmt.Errorf("failed to get TLS config: %w", err)
438439
}

0 commit comments

Comments
 (0)