diff --git a/playbooks/openshift-apps/maubot.yml b/playbooks/openshift-apps/maubot.yml index d74981db0d..0ae3cbda2a 100644 --- a/playbooks/openshift-apps/maubot.yml +++ b/playbooks/openshift-apps/maubot.yml @@ -110,6 +110,14 @@ app: maubot file: deploymentconfig.yml objectname: deploymentconfig.yml + when: env == "production" + + - role: openshift/object + app: maubot + file: deploymentconfig.yml + objectname: deployment.yml + when: env != "production" + - role: openshift/rollout app: maubot diff --git a/roles/openshift-apps/maubot/files/deployment.yml b/roles/openshift-apps/maubot/files/deployment.yml new file mode 100644 index 0000000000..6bba26a561 --- /dev/null +++ b/roles/openshift-apps/maubot/files/deployment.yml @@ -0,0 +1,88 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: maubot + labels: + app: maubot + service: maubot +spec: + replicas: 1 + selector: + matchLabels: + app: maubot + service: maubot + template: + metadata: + labels: + app: maubot + service: maubot + spec: + containers: + - name: maubot + image: maubot:latest + ports: + - containerPort: 8080 + volumeMounts: + - name: config + mountPath: /config + readOnly: true + - name: meetbot-logs + mountPath: /meetbot_logs + - name: ipa-config-volume + mountPath: /etc/ipa + readOnly: true + - name: keytab-volume + mountPath: /etc/keytabs + readOnly: true + - name: fedora-messaging-config-volume + mountPath: /etc/fedora-messaging/ + readOnly: true + - name: fedora-messaging-ca-volume + mountPath: /etc/pki/rabbitmq/ca + readOnly: true + - name: fedora-messaging-key-volume + mountPath: /etc/pki/rabbitmq/key + readOnly: true + - name: fedora-messaging-crt-volume + mountPath: /etc/pki/rabbitmq/crt + readOnly: true + readinessProbe: + timeoutSeconds: 1 + initialDelaySeconds: 5 + httpGet: + path: / + port: 8080 + livenessProbe: + timeoutSeconds: 1 + initialDelaySeconds: 20 + httpGet: + path: / + port: 8080 + securityContext: + supplementalGroups: [2] + volumes: + - name: config + configMap: + name: config + - name: meetbot-logs + persistentVolumeClaim: + claimName: meetbot-logs + - name: ipa-config-volume + configMap: + name: ipa-client-config + - name: keytab-volume + secret: + secretName: maubot-keytab + - name: fedora-messaging-config-volume + configMap: + name: fedora-messaging-configmap + - name: fedora-messaging-ca-volume + secret: + secretName: maubot-fedora-messaging-ca + - name: fedora-messaging-key-volume + secret: + secretName: maubot-fedora-messaging-key + - name: fedora-messaging-crt-volume + secret: + secretName: maubot-fedora-messaging-crt