Skip to content

Commit df74d10

Browse files
committed
HTTP/3 generate QUIC listen configuration block
1 parent 84c8bcd commit df74d10

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

internal/ingress/controller/template/template.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,30 @@ func httpsListener(addresses []string, co string, tc *config.TemplateConfig) []s
15091509

15101510
out = append(out, strings.Join(lo, " "))
15111511
}
1512+
if !tc.Cfg.UseHTTP3 {
1513+
return out
1514+
}
1515+
if strings.Contains(co, "backlog=") {
1516+
klog.V(3).InfoS("Skipping HTTP/3 because of incompatible backlog parameter")
1517+
return out
1518+
}
1519+
if tc.IsSSLPassthroughEnabled {
1520+
klog.V(3).InfoS("Skipping HTTP/3 in SSL Passthrough mode")
1521+
return out
1522+
}
1523+
for _, address := range addresses {
1524+
lo := []string{"listen"}
1525+
1526+
if address == "" {
1527+
lo = append(lo, fmt.Sprintf("%v", tc.ListenPorts.QUIC))
1528+
} else {
1529+
lo = append(lo, fmt.Sprintf("%v:%v", address, tc.ListenPorts.QUIC))
1530+
}
1531+
1532+
lo = append(lo, co, "quic;")
1533+
1534+
out = append(out, strings.Join(lo, " "))
1535+
}
15121536

15131537
return out
15141538
}

0 commit comments

Comments
 (0)