apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: oxshibboleth
spec:
  serviceName: oxshibboleth
  replicas: 1
  selector:
    matchLabels:
      app: oxshibboleth
  volumeClaimTemplates: []
  template:
    spec:
      containers:
      - name: oxshibboleth
        imagePullPolicy: Always
        image: gluufederation/oxshibboleth:4.0.0
        volumeMounts:
          # name must match the volume name below
          - name: shared-shib
            mountPath: "/opt/shared-shibboleth-idp"
          - name: cb-pass
            mountPath: "/etc/gluu/conf/couchbase_password"
            subPath: couchbase_password
          - name: cb-crt
            mountPath: "/etc/certs/couchbase.crt"
            subPath: couchbase.crt
        resources:
          requests:
            memory: "1500Mi"
            cpu: "1000m"
          limits:
            memory: "2000Mi"
            cpu: "1500m"
        ports:
        - containerPort: 8080
        envFrom:
        - configMapRef:
            name: oxshibboleth-cm
        livenessProbe:
          httpGet:
            path: /idp
            port: 8080
          initialDelaySeconds: 30
          periodSeconds: 30
        readinessProbe:
          httpGet:
            path: /idp
            port: 8080
          initialDelaySeconds: 25
          periodSeconds: 25
      hostAliases:
      - ip: NGINX_IP
        hostnames:
        - FQDN
      volumes:
      - name: shared-shib
        persistentVolumeClaim:
          claimName: shared-shib-pvc
      - name: cb-pass
        secret:
          secretName: cb-pass
      - name: cb-crt
        secret:
          secretName: cb-crt