Skip to content

Commit

Permalink
fix: Allow cloudflared ICMP proxy feature (#165)
Browse files Browse the repository at this point in the history
When starting the cloudflared pod, the following is warning appears in
the logs:

```text
WRN The user running cloudflared process has a GID (group ID) that is not within ping_group_range. You might need to add that user to a group within that range, or instead update the range to encompass a group the user is already in by modifying /proc/sys/net/ipv4/ping_group_range. Otherwise cloudflared will not be able to ping this network error="Group ID 0 is not between ping group 1 to 0"
WRN ICMP proxy feature is disabled error="cannot create ICMPv4 proxy: Group ID 0 is not between ping group 1 to 0 nor ICMPv6 proxy: socket: permission denied"
```

Added the needed sysctl settings to the security context to enable this
feature and confirmed that the warning is removed.

cloudflare/cloudflared#1109
  • Loading branch information
cyanidium authored Oct 15, 2024
1 parent 1de2742 commit 131d363
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/controller/gateway_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,12 @@ func (r *GatewayReconciler) deploymentForGateway(
SeccompProfile: &corev1.SeccompProfile{
Type: corev1.SeccompProfileTypeRuntimeDefault,
},
Sysctls: []corev1.Sysctl{
{
Name: "net.ipv4.ping_group_range",
Value: "0 0",
},
},
},
Containers: []corev1.Container{{
Image: image,
Expand Down

0 comments on commit 131d363

Please sign in to comment.