apiVersion: apps/v1
kind: Deployment
metadata:
  name: basic-server
spec:
  selector:
    matchLabels:
      app: basic-server
      tier: frontend
  replicas: 1
  template:
    metadata:
      labels:
        app: basic-server
        tier: frontend
    spec:
      containers:
        - name: basic-server
          image: gcr.io/${PROJECT_NAME}/kotlin-ktor-starter:tag1
          imagePullPolicy: Always
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
          env:
            - name: PORT
              value: '8888'
            - name: JWT_ISSUER
              value: 'https://cloud.google.com/iap'
            - name: JWT_AUDIENCE
              value: '/projects/${PROJECT_NUMBER}/global/backendServices/${BACKEND_SERVICE_ID}'
          ports:
            - containerPort: 8888