apiVersion: apps/v1
kind: Deployment
metadata:
  name: functionize-tunnel
spec:
  replicas: 1
  selector:
    matchLabels:
      app: functionize-tunnel
  template:
    metadata:
      labels:
        app: functionize-tunnel
    spec:
      serviceAccountName: functionize-tunnel-sa
      containers:
      - name: functionize-tunnel
        image: us-central1-docker.pkg.dev/functionize-customer/tunnel/ws-tunnel:latest
        env:
        - name: FUNCTIONIZE_ENDPOINT
          value: "app.functionize.com"
        - name: TUNNEL_ENDPOINT
          value: "<FQDN provided by Functionize>"
        - name: CLIENT_ID
          value: "<YOUR_CLIENT_ID>"
        - name: CLIENT_SECRET
          value: "<YOUR_CLIENT_SECRET>"
        # Optional logging configuration
        - name: LOG_FILE
          value: "/var/log/logfile.log" #doesn't need to be stored in permanent storage
        - name: LOG_ROTATION_INTERVAL
          value: "720"
        - name: LOG_ROTATION_RETENTION
          value: "5"

