2022-08-27 23:56:41 +01:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: cloudflared
|
2024-05-04 15:27:04 +01:00
|
|
|
namespace: cloudflare
|
|
|
|
|
2022-08-27 23:56:41 +01:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: cloudflared
|
2024-05-04 15:27:04 +01:00
|
|
|
replicas: 2
|
2022-08-27 23:56:41 +01:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: cloudflared
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: cloudflared
|
2024-07-05 17:24:10 +01:00
|
|
|
image: cloudflare/cloudflared:2024.6.1
|
2022-08-27 23:56:41 +01:00
|
|
|
args:
|
|
|
|
- tunnel
|
|
|
|
- --config
|
|
|
|
- /etc/cloudflared/config/config.yaml
|
|
|
|
- run
|
2024-03-22 21:41:37 +00:00
|
|
|
ports:
|
|
|
|
- containerPort: 2000
|
|
|
|
name: metrics
|
2022-08-27 23:56:41 +01:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
# Cloudflared has a /ready endpoint which returns 200 if and only if
|
|
|
|
# it has an active connection to the edge.
|
|
|
|
path: /ready
|
|
|
|
port: 2000
|
|
|
|
failureThreshold: 1
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
periodSeconds: 10
|
|
|
|
volumeMounts:
|
|
|
|
- name: config
|
|
|
|
mountPath: /etc/cloudflared/config
|
|
|
|
readOnly: true
|
|
|
|
- name: creds
|
|
|
|
mountPath: /etc/cloudflared/creds
|
|
|
|
readOnly: true
|
|
|
|
volumes:
|
|
|
|
- name: creds
|
|
|
|
secret:
|
|
|
|
secretName: tunnel-credentials
|
|
|
|
- name: config
|
|
|
|
configMap:
|
|
|
|
name: cloudflared
|
|
|
|
items:
|
|
|
|
- key: config.yaml
|
|
|
|
path: config.yaml
|
2024-03-22 21:41:37 +00:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: cloudflared-metrics
|
2024-05-04 15:27:04 +01:00
|
|
|
namespace: cloudflare
|
|
|
|
|
2024-03-22 21:41:37 +00:00
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: cloudflared
|
|
|
|
ports:
|
|
|
|
- name: metrics
|
|
|
|
port: 2000
|
|
|
|
targetPort: 2000
|
|
|
|
---
|
|
|
|
apiVersion: monitoring.coreos.com/v1
|
|
|
|
kind: PodMonitor
|
|
|
|
metadata:
|
|
|
|
name: cloudflared
|
2024-05-04 15:27:04 +01:00
|
|
|
namespace: cloudflare
|
2024-03-22 21:41:37 +00:00
|
|
|
labels:
|
|
|
|
release: prometheus
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: cloudflared
|
|
|
|
podMetricsEndpoints:
|
|
|
|
- port: metrics
|
|
|
|
interval: 30s
|