apiVersion: apps/v1
kind: Deployment
metadata:
  name: cloudsqlproxy
  namespace: flyte
  labels:
    app: cloudsqlproxy
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cloudsqlproxy
  template:
    metadata:
      labels:
        app: cloudsqlproxy
    spec:
      containers:
        - name: cloudsql-proxy
          image: gcr.io/cloudsql-docker/gce-proxy:1.16
          imagePullPolicy: IfNotPresent
          # TODO: replace <project-id> with the GCP project ID and <region> with the region where
          # Cloud SQL runs
          command: ["/cloud_sql_proxy", "-instances=<project-id>:<region>:flyte=tcp:0.0.0.0:5432"]
          ports:
            - containerPort: 5432
