apiVersion: v1
items:
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    labels:
      app: bodhi
      service: web
    name: bodhi-web
  spec:
{% if env == "staging" %}
    replicas: {{ hostvars[groups['bodhi2-stg'][0]]['openshift_pods'] }}
{% else %}
    replicas: {{ hostvars[groups['bodhi2'][0]]['openshift_pods'] }}
{% endif %}
    selector:
      deploymentconfig: bodhi-web
    strategy:
      activeDeadlineSeconds: 21600
      recreateParams:
        timeoutSeconds: 600
      resources: {}
      rollingParams:
        intervalSeconds: 1
        maxSurge: 25%
        maxUnavailable: 25%
        timeoutSeconds: 600
        updatePeriodSeconds: 1
      type: Rolling
    template:
      metadata:
        creationTimestamp: null
        labels:
          app: bodhi-web
          deploymentconfig: bodhi-web
      spec:
        containers:
        - name: bodhi-web
          image: bodhi-web:latest
          ports:
          - containerPort: 8080
          resources: {}
          volumeMounts:
          - name: config-volume
            mountPath: /etc/bodhi
            readOnly: true
          - name: keytab-volume
            mountPath: /etc/keytabs
            readOnly: true
          - name: httpdir-volume
            mountPath: /httpdir
          - name: fedmsg-config-volume
            mountPath: /etc/bodhi-fedmsg.d
            readOnly: true
          - name: fedmsg-key-volume
            mountPath: /etc/pki/fedmsg/key
            readOnly: true
          - name: fedmsg-crt-volume
            mountPath: /etc/pki/fedmsg/crt
            readOnly: true
          readinessProbe:
            timeoutSeconds: 10
            initialDelaySeconds: 5
            httpGet:
              path: /
              port: 8080
          livenessProbe:
            timeoutSeconds: 10
            initialDelaySeconds: 30
            httpGet:
              path: /
              port: 8080
        volumes:
        - name: config-volume
          configMap:
            name: bodhi-configmap
        - name: keytab-volume
          secret:
            secretName: bodhi-keytab
        - name: httpdir-volume
          emptyDir: {}
        - name: fedmsg-config-volume
          configMap:
            name: fedmsg-configmap
        - name: fedmsg-key-volume
          secret:
            secretName: bodhi-fedmsg-key
        - name: fedmsg-crt-volume
          secret:
            secretName: bodhi-fedmsg-crt
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - bodhi-web
        from:
          kind: ImageStreamTag
          name: bodhi-web:latest
          namespace: bodhi
      type: ImageChange
    - type: ConfigChange
kind: List
metadata: {}
