apiVersion: apps/v1
kind: Deployment
metadata:
  name: rybbit-cloudflared
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: rybbit
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: cloudflared
    app.kubernetes.io/version: 2026.5.0
    helm.sh/chart: cloudflared-3.3.1
  namespace: rybbit
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: cloudflared
      app.kubernetes.io/instance: rybbit
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: rybbit
        app.kubernetes.io/name: cloudflared
    spec:
      enableServiceLinks: false
      serviceAccountName: rybbit-cloudflared
      automountServiceAccountToken: false
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - args:
            - tunnel
            - --protocol
            - auto
            - --no-autoupdate
            - --metrics
            - 0.0.0.0:20241
            - run
            - --token
            - $(CF_MANAGED_TUNNEL_TOKEN)
          env:
            - name: CF_MANAGED_TUNNEL_TOKEN
              valueFrom:
                secretKeyRef:
                  key: cf-tunnel-token
                  name: rybbit-cloudflared-secret
          image: cloudflare/cloudflared:2026.5.0@sha256:59bab8d3aceec09bf6bdb07d6beca0225ca5cd7ab79436a87ea97978fe1dc4f9
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 1m
              memory: 20Mi
