Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions kubernetes/components/cloudflared/resources/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ spec:
labels:
app: cloudflared
spec:
securityContext:
sysctls:
# Allows ICMP traffic (ping, traceroute) to resources behind cloudflared.
- name: net.ipv4.ping_group_range
value: "65532 65532"
automountServiceAccountToken: false
terminationGracePeriodSeconds: 60
# One connector per node limits a node failure to one connector.
# terminationGracePeriodSeconds: 60
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: cloudflared

containers:
- name: cloudflared
image: cloudflare/cloudflared
Expand All @@ -44,21 +49,21 @@ spec:
# HTTP/2 is a static transport selection. The Cloudflare edge can
# still disconnect a TCP connector, but it avoided request errors
# during the observed QUIC connection collapse.
# - --protocol
# - http2
- --protocol
- http2
- run
ports:
- name: metrics
containerPort: 2000
protocol: TCP
env:
# - name: TUNNEL_GRACE_PERIOD
# value: 50s
- name: TUNNEL_TOKEN
valueFrom:
secretKeyRef:
name: cloudflared-tunnel-token
key: token
- name: TUNNEL_GRACE_PERIOD
value: 50s
# cloudflared exits cleanly (code 0) when it cannot maintain tunnel
# connections, so no liveness probe is needed — Kubernetes restarts
# it automatically. /ready returns 503 until connections are up;
Expand Down