apiVersion: apps/v1
kind: Deployment
metadata:
  name: metal3-ironic
spec:
  template:
    spec:
      containers:
      - name: ironic-api
        volumeMounts:
        - name: cert-ironic
          mountPath: "/certs/ironic"
          readOnly: true
        - name: cert-ironic-ca
          mountPath: "/certs/ca/ironic"
          readOnly: true
        - name: cert-ironic-inspector-ca
          mountPath: "/certs/ca/ironic-inspector"
          readOnly: true
        - name: cert-mariadb-ca
          mountPath: "/certs/ca/mariadb"
          readOnly: true
      - name: ironic-conductor
        volumeMounts:
        - name: cert-ironic
          mountPath: "/certs/ironic"
          readOnly: true
        - name: cert-ironic-ca
          mountPath: "/certs/ca/ironic"
          readOnly: true
        - name: cert-ironic-inspector-ca
          mountPath: "/certs/ca/ironic-inspector"
          readOnly: true
        - name: cert-mariadb-ca
          mountPath: "/certs/ca/mariadb"
          readOnly: true
      - name: ironic-inspector
        volumeMounts:
        - name: cert-ironic-ca
          mountPath: "/certs/ca/ironic"
          readOnly: true
        - name: cert-ironic-inspector
          mountPath: "/certs/ironic-inspector"
          readOnly: true
      - name: mariadb
        volumeMounts:
        - name: cert-mariadb
          mountPath: "/certs/mariadb"
          readOnly: true
        - name: cert-mariadb-ca
          mountPath: "/certs/ca/mariadb"
          readOnly: true
      - name: httpd-reverse-proxy
        image: quay.io/metal3-io/ironic-inspector
        imagePullPolicy: Always
        envFrom:
          - configMapRef:
              name: ironic-bmo-configmap
        command: 
          - /bin/runhttpd
        volumeMounts:
        - name: cert-ironic-ca
          mountPath: "/certs/ca/ironic"
          readOnly: true
        - name: cert-ironic-inspector
          mountPath: "/certs/ironic-inspector"
          readOnly: true
      volumes:
      - name: cert-ironic-ca
        secret:
          secretName: ironic-ca-cert
      - name: cert-ironic-inspector-ca
        secret:
          secretName: ironic-inspector-ca-cert
      - name: cert-ironic
        secret:
          secretName: ironic-cert
      - name: cert-ironic-inspector
        secret:
          secretName: ironic-inspector-cert
      - name: cert-mariadb
        secret:
          secretName: mariadb-cert
      - name: cert-mariadb-ca
        secret:
          secretName: mariadb-ca-cert
