apiVersion: "v1"
kind: "List"
items:
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    labels:
      environment: "infrastructure"
      project: "infinispan"
      version: "9.1.0.Final"
    name: transactions-repository
  spec:
    replicas: 1
    strategy:
      type: Rolling
      rollingParams:
        updatePeriodSeconds: 20
        intervalSeconds: 20
        timeoutSeconds: 600
        maxUnavailable: 1
        maxSurge: 1
    selector:
      environment: "infrastructure"
      project: "infinispan"
      version: "9.1.0.Final"
    template:
      metadata:
        labels:
          environment: "infrastructure"
          project: "infinispan"
          version: "9.1.0.Final"
      spec:
        containers:
        - args:
          - custom/transactions
          - -Djboss.default.jgroups.stack=kubernetes
          image: jboss/infinispan-server:9.1.0.Final-2
          imagePullPolicy: Always
          name: infinispan-server
          ports:
          - containerPort: 8181
            protocol: TCP
          - containerPort: 8888
            protocol: TCP
          - containerPort: 9990
            protocol: TCP
          - containerPort: 11211
            protocol: TCP
          - containerPort: 11222
            protocol: TCP
          - containerPort: 57600
            protocol: TCP
          - containerPort: 7600
            protocol: TCP
          - containerPort: 8080
            protocol: TCP
          env:
          - name: OPENSHIFT_KUBE_PING_NAMESPACE
            valueFrom: {fieldRef: {apiVersion: v1, fieldPath: metadata.namespace}}
          - name: JAVA_OPTS
            value: "-server -Xms1G -Xmx1G -XX:+UseConcMarkSweepGC -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -XX:+PrintGC"
          terminationMessagePath: /dev/termination-log
          terminationGracePeriodSeconds: 90
          volumeMounts:
          - mountPath: /opt/jboss/infinispan-server/standalone/configuration/custom
            name: config-volume
          - mountPath: /opt/jboss/infinispan-server/standalone/configuration/client-1-server-keystore
            name: client-1-server-keystore
          - mountPath: /opt/jboss/infinispan-server/standalone/configuration/client-2-server-keystore
            name: client-2-server-keystore
          livenessProbe:
            exec:
              command:
              - /usr/local/bin/is_running.sh
            initialDelaySeconds: 10
            timeoutSeconds: 80
            periodSeconds: 60
            successThreshold: 1
            failureThreshold: 5
          readinessProbe:
             exec:
                command:
                - /usr/local/bin/is_healthy.sh
             initialDelaySeconds: 10
             timeoutSeconds: 40
             periodSeconds: 30
             successThreshold: 2
             failureThreshold: 5
        restartPolicy: Always
        volumes:
        - configMap:
            name: transactions-configuration
          name: config-volume
        - secret:
            secretName: client-1-server-keystore
          name: client-1-server-keystore
        - secret:
            secretName: client-2-server-keystore
          name: client-2-server-keystore
    triggers:
    - type: ConfigChange