apiVersion: apps/v1
kind: Deployment
metadata:
  name: homepage-dev-cloudflared
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: homepage-dev
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: cloudflared
    app.kubernetes.io/version: 2026.2.0
    helm.sh/chart: cloudflared-2.3.0
  namespace: homepage-dev
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: cloudflared
      app.kubernetes.io/instance: homepage-dev
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: homepage-dev
        app.kubernetes.io/name: cloudflared
    spec:
      enableServiceLinks: false
      serviceAccountName: default
      automountServiceAccountToken: true
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - args:
            - tunnel
            - --protocol
            - http2
            - --no-autoupdate
            - run
            - --token
            - $(CF_MANAGED_TUNNEL_TOKEN)
          env:
            - name: CF_MANAGED_TUNNEL_TOKEN
              valueFrom:
                secretKeyRef:
                  key: cf-tunnel-token
                  name: homepage-dev-cloudflared-secret
          image: cloudflare/cloudflared:2026.2.0
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            requests:
              cpu: 10m
              memory: 128Mi
