forked from infra/ansible
add noggin deployment
Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
parent
aaa3c9403f
commit
dce2333bb1
1 changed files with 114 additions and 0 deletions
114
roles/openshift-apps/noggin/templates/deployment.yml.j2
Normal file
114
roles/openshift-apps/noggin/templates/deployment.yml.j2
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: noggin
|
||||
labels:
|
||||
app: {{ object_app }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ object_app }}
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ object_app }}
|
||||
annotations:
|
||||
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"noggin:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"noggin\")].image"}]'
|
||||
spec:
|
||||
containers:
|
||||
- name: noggin
|
||||
image: noggin:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: noggin-config-volume
|
||||
mountPath: "/etc/noggin"
|
||||
readOnly: true
|
||||
- name: noggin-templates-volume
|
||||
mountPath: "/etc/noggin-templates"
|
||||
readOnly: true
|
||||
- name: noggin-secrets-volume
|
||||
mountPath: "/etc/noggin-secrets"
|
||||
readOnly: true
|
||||
- name: wsgi-script-volume
|
||||
mountPath: "/opt/app-root/src/deploy"
|
||||
readOnly: true
|
||||
- name: fedora-messaging-config-volume
|
||||
mountPath: "/etc/fedora-messaging"
|
||||
readOnly: true
|
||||
- name: fedora-messaging-ca-volume
|
||||
mountPath: /etc/pki/fedora-messaging/cacert.pem
|
||||
subPath: cacert.pem
|
||||
readOnly: true
|
||||
- name: fedora-messaging-crt-volume
|
||||
mountPath: /etc/pki/fedora-messaging/noggin-cert.pem
|
||||
subPath: noggin-cert.pem
|
||||
readOnly: true
|
||||
- name: fedora-messaging-key-volume
|
||||
mountPath: /etc/pki/fedora-messaging/noggin-key.pem
|
||||
subPath: noggin-key.pem
|
||||
readOnly: true
|
||||
- name: ipa-config-volume
|
||||
mountPath: "/etc/ipa"
|
||||
readOnly: true
|
||||
env:
|
||||
- name: NOGGIN_CONFIG_PATH
|
||||
value: "/etc/noggin/noggin.cfg"
|
||||
- name: APP_MODULE
|
||||
value: "deploy.wsgi"
|
||||
- name: APP_CONFIG
|
||||
value: "/etc/noggin/gunicorn.conf.py"
|
||||
{% if subdir is defined %}
|
||||
- name: SCRIPT_NAME
|
||||
value: "{{ subdir }}"
|
||||
{% endif %}
|
||||
readinessProbe:
|
||||
timeoutSeconds: 10
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 60
|
||||
httpGet:
|
||||
path: "{{ subdir|default('') }}/healthz/ready"
|
||||
port: 8080
|
||||
livenessProbe:
|
||||
timeoutSeconds: 10
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 60
|
||||
httpGet:
|
||||
path: "{{ subdir|default('') }}/healthz/live"
|
||||
port: 8080
|
||||
volumes:
|
||||
- name: noggin-config-volume
|
||||
configMap:
|
||||
name: noggin-config
|
||||
- name: noggin-templates-volume
|
||||
configMap:
|
||||
name: noggin-templates
|
||||
- name: noggin-secrets-volume
|
||||
secret:
|
||||
secretName: noggin-secrets
|
||||
- name: wsgi-script-volume
|
||||
configMap:
|
||||
name: wsgi-script
|
||||
- name: fedora-messaging-config-volume
|
||||
configMap:
|
||||
name: fedora-messaging-config
|
||||
- name: fedora-messaging-ca-volume
|
||||
secret:
|
||||
secretName: fedora-messaging-ca
|
||||
- name: fedora-messaging-crt-volume
|
||||
secret:
|
||||
secretName: fedora-messaging-crt
|
||||
- name: fedora-messaging-key-volume
|
||||
secret:
|
||||
secretName: fedora-messaging-key
|
||||
- name: ipa-config-volume
|
||||
configMap:
|
||||
name: ipa-client-config
|
||||
Loading…
Add table
Add a link
Reference in a new issue