apiVersion: apps/v1
kind: Deployment
metadata:
  name: casa
spec:
  replicas: 1
  selector:
    matchLabels:
      app: casa
  template:
    spec:
      hostAliases:
      - ip: NGINX_IP
        hostnames:
        - FQDN
      volumes:
        - name: casa
          persistentVolumeClaim:
            claimName: casa-pvc
        - name: cb-pass
          secret:
            secretName: cb-pass
        - name: cb-crt
          secret:
            secretName: cb-crt
      containers:
      - name: casa
        imagePullPolicy: Always
        image: gluufederation/casa:4.0.0_dev
        volumeMounts:
          - mountPath: /etc/gluu/conf
            name: casa
            subPath: casa.json
          - name: cb-pass
            mountPath: "/etc/gluu/conf/couchbase_password"
            subPath: couchbase_password
          - name: cb-crt
            mountPath: "/etc/certs/couchbase.crt"
            subPath: couchbase.crt
#        livenessProbe:
#          httpGet:
#            path: /casa
#            port: 8080
#          initialDelaySeconds: 30
#          periodSeconds: 30
#        readinessProbe:
#          httpGet:
#            path: /casa
#            port: 8080
#          initialDelaySeconds: 25
#          periodSeconds: 25
        resources:
          requests:
            memory: "1000Mi"
            cpu: "300m"
          limits:
            memory: "1536Mi"
            cpu: "500m"
        ports:
        - containerPort: 8080
        envFrom:
        - configMapRef:
            name: casa-cm
