# https://github.com/cloudflare/argo-tunnel-examples/blob/master/named-tunnel-k8s/cloudflared.yaml --- apiVersion: apps/v1 kind: Deployment metadata: name: cloudflared namespace: kube-system spec: selector: matchLabels: app: cloudflared replicas: 0 # TODO configure a different tunnel ID before re-enabling template: metadata: labels: app: cloudflared spec: containers: - name: cloudflared image: cloudflare/cloudflared:latest args: - tunnel - --config - /etc/cloudflared/config/config.yaml - run ports: - containerPort: 2000 name: metrics livenessProbe: httpGet: 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 --- apiVersion: v1 kind: ConfigMap metadata: name: cloudflared namespace: kube-system data: config.yaml: | tunnel: example-tunnel credentials-file: /etc/cloudflared/creds/credentials.json metrics: 0.0.0.0:2000 ingress: - hostname: vaultwarden.bnuuy.org service: http://vaultwarden-service.vaultwarden.svc.cluster.local:80 - hostname: vaultwarden.bnuuy.org path: /notifications/hub.* service: http://vaultwarden-service.vaultwarden.svc.cluster.local:3012 - service: http_status:404 --- apiVersion: external-secrets.io/v1 kind: ExternalSecret metadata: name: tunnel-credentials namespace: kube-system spec: target: name: tunnel-credentials deletionPolicy: Delete template: type: Opaque data: credentials.json: |- {{ .credentials }} data: - secretKey: credentials sourceRef: storeRef: name: bitwarden-notes kind: ClusterSecretStore remoteRef: key: 4a0b91df-6fcb-4dc1-a0b7-b3f800730cc1