adyanth / cloudflare-operator

A Kubernetes Operator to create and manage Cloudflare Tunnels and DNS records for (HTTP/TCP/UDP*) Service Resources
https://adyanth.site/posts/migration-compose-k8s/cloudflare-tunnel-operator-architecture/
Apache License 2.0
355 stars 37 forks source link

Increase receive buffer size #65

Closed acrogenesis closed 1 year ago

acrogenesis commented 2 years ago

I get this warning when cloudflared starts

failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size for details.

https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size

acrogenesis commented 2 years ago

I think something like this would solve it. https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/

apiVersion: v1
kind: Pod
metadata:
  name: sysctl-example
spec:
  securityContext:
    sysctls:
    - name: net.core.rmem_max
      value: "2500000"
  ...
adyanth commented 2 years ago

All unsafe sysctls are disabled by default and must be allowed manually by the cluster admin on a per-node basis. Pods with disabled unsafe sysctls will be scheduled, but will fail to launch.

Here they refer to one of the net.core.* sysctls as unsafe and should be enabled per node by passing it to the kubelet argument list? Looks like it might not be that straightforward. Did doing the above manually on the deployment work for you?

adyanth commented 1 year ago

52 / #39 will allow the changes to be made.