# License terms and conditions for Gluu Cloud Native Edition:
# https://www.apache.org/licenses/LICENSE-2.0
apiVersion: apps/v1
kind: Deployment
metadata:
  name: oxd-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: oxd-server
  template:
    spec:
      containers:
      - name: oxd-server
        imagePullPolicy: Always
        image: gluufederation/oxd-server:4.1.0_01
        command:
          - /bin/sh
          - -c
          - |
              /usr/bin/python /scripts/update-lb-ip.py &
              /app/scripts/entrypoint.sh
        ports:
        - containerPort: 8443
        - containerPort: 8444
        envFrom:
        - configMapRef:
            name: oxd-server-cm
        volumeMounts:
          #- mountPath: /opt/oxd-server/conf/oxd-server.keystore
          #  name: oxd-keystore-file
          #  subPath: oxd-server.keystore
          - mountPath: /scripts
            name: update-lb-ip
        resources:
          requests:
            memory: "700Mi"
            cpu: "300m"
          limits:
            memory: "1000Mi"
            cpu: "500m"
      volumes:
      #- name: oxd-keystore-file
      #  secret:
      #    secretName: oxdkeystorecm
      - name: update-lb-ip
        configMap:
          name: updatelbip
      hostAliases:
      - ip: NGINX_IP
        hostnames:
        - FQDN