Files
infra-k8/deploy/k8s/40-cloudflared.yaml
Noel Sabia e8e048866c
infra-ci / manifests (push) Successful in 8s
infra-ci / manifests (pull_request) Successful in 8s
ci: run manifest checks on the Gitea runner
The node:20-bookworm runner has python3 but no pip, so the PyYAML install failed before any check ran. Install python3-yaml with apt instead, remove the duplicate cluster-only kubectl step, and keep the two cluster-free Make targets.

Also remove the stale v1.0/pending-review claims, drop the old api.pulse hostname, and move the deploy status below the runbook.
2026-11-14 09:13:27 +01:00

108 lines
3.1 KiB
YAML

# Cloudflare Tunnel is the only public exposure path.
# Routes are configured in the Cloudflare Zero Trust dashboard:
# pulse.noelsabia.dev -> http://web:3000
# api-pulse.noelsabia.dev -> http://api:8080
# The token lives in the `cloudflared` Secret, created by the human; never in git.
apiVersion: apps/v1
kind: Deployment
metadata:
name: cloudflared
namespace: fch26-onemanarmy
labels:
app.kubernetes.io/name: cloudflared
app.kubernetes.io/component: tunnel
app.kubernetes.io/part-of: pulsecast
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: cloudflared
template:
metadata:
labels:
app.kubernetes.io/name: cloudflared
app.kubernetes.io/component: tunnel
app.kubernetes.io/part-of: pulsecast
spec:
automountServiceAccountToken: false
securityContext:
seccompProfile:
type: RuntimeDefault
# cloudflared's image user is 65532:65532; set it numerically.
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
containers:
- name: cloudflared
# Docker Hub image; pinned so an upstream change cannot break Gate 1.
image: cloudflare/cloudflared:2026.11.0
imagePullPolicy: IfNotPresent
args:
- tunnel
- --no-autoupdate
# SKE smoke confirmed TCP/443 to Cloudflare but did not test
# UDP/7844 (QUIC). HTTP/2 avoids depending on untested UDP.
- --protocol
- http2
- --metrics
- 0.0.0.0:2000
- run
- --token
- $(TUNNEL_TOKEN)
env:
- name: TUNNEL_TOKEN
valueFrom:
secretKeyRef:
name: cloudflared
key: TUNNEL_TOKEN
- name: HOME
value: /tmp
ports:
- name: metrics
containerPort: 2000
protocol: TCP
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumeMounts:
- name: tmp
mountPath: /tmp
startupProbe:
httpGet:
path: /ready
port: metrics
periodSeconds: 2
failureThreshold: 30
livenessProbe:
httpGet:
path: /ready
port: metrics
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
readinessProbe:
httpGet:
path: /ready
port: metrics
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 2
terminationGracePeriodSeconds: 30
volumes:
- name: tmp
emptyDir: {}