apiVersion: apps/v1
kind: Deployment
metadata:
  name: ballerina-playground-controller-deployment
  labels:
    app: ballerina-playground-controller
spec:
  replicas: 4
  selector:
    matchLabels:
      app: ballerina-playground-controller
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 2
      maxUnavailable: 1
  minReadySeconds: 5
  template:
    metadata:
      labels:
        app: ballerina-playground-controller
    spec:
      containers:
      - name: ballerina-playground-controller-container
        imagePullPolicy: Always
        image: gcr.io/${BPG_GCP_PROJECT_ID}/playground-controller:${RELEASE_VERSION}
        env:
        -
          name: COMPILER_HOST
          value: ws://ballerina-playground-compiler-service.${BPG_NAMESPACE}.svc.cluster.local/compiler
        -
          name: EXECUTOR_HOST
          value: ws://ballerina-playground-executor-service.${BPG_NAMESPACE}.svc.cluster.local/executor
        -
          name: REDIS_READ_HOST
          value: redis-slave.${BPG_NAMESPACE}.svc.cluster.local
        -
          name: REDIS_WRITE_HOST
          value: redis-master.${BPG_NAMESPACE}.svc.cluster.local
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        ports:
        - containerPort: 9090
          