forked from infra/ansible
add webhook2fedmsg deployment
Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
parent
6bd6eb6365
commit
a2f297a82b
1 changed files with 99 additions and 0 deletions
|
|
@ -0,0 +1,99 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: webhook2fedmsg
|
||||
service: webhook2fedmsg
|
||||
name: app
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: webhook2fedmsg
|
||||
service: webhook2fedmsg
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: webhook2fedmsg
|
||||
service: webhook2fedmsg
|
||||
annotations:
|
||||
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"webhook2fedmsg:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"app\")].image"}]'
|
||||
spec:
|
||||
initContainers:
|
||||
- name: setup
|
||||
image: webhook2fedmsg:latest
|
||||
command: ["/opt/app-root/bin/w2fm", "setup"]
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/etc/webhook-to-fedora-messaging"
|
||||
readOnly: true
|
||||
- name: ipa-config-volume
|
||||
mountPath: /etc/ipa
|
||||
readOnly: true
|
||||
- name: keytab-volume
|
||||
mountPath: /etc/keytabs
|
||||
readOnly: true
|
||||
- name: fedora-messaging-config
|
||||
mountPath: "/etc/fedora-messaging"
|
||||
readOnly: true
|
||||
containers:
|
||||
- name: app
|
||||
image: webhook2fedmsg:latest
|
||||
env:
|
||||
- name: KRB5_CONFIG
|
||||
value: /etc/ipa/krb5.conf
|
||||
- name: KRB5_CLIENT_KTNAME
|
||||
value: /etc/keytabs/service.keytab
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/etc/webhook-to-fedora-messaging"
|
||||
readOnly: true
|
||||
- name: ipa-config-volume
|
||||
mountPath: /etc/ipa
|
||||
readOnly: true
|
||||
- name: keytab-volume
|
||||
mountPath: /etc/keytabs
|
||||
readOnly: true
|
||||
- name: fedora-messaging-config
|
||||
mountPath: "/etc/fedora-messaging"
|
||||
readOnly: true
|
||||
- name: fedora-messaging-ca
|
||||
mountPath: /etc/pki/fedora-messaging/cacert.pem
|
||||
subPath: cacert.pem
|
||||
readOnly: true
|
||||
- name: fedora-messaging-crt
|
||||
mountPath: /etc/pki/fedora-messaging/webhook2fedmsg-cert.pem
|
||||
subPath: webhook2fedmsg-cert.pem
|
||||
readOnly: true
|
||||
- name: fedora-messaging-key
|
||||
mountPath: /etc/pki/fedora-messaging/webhook2fedmsg-key.pem
|
||||
subPath: webhook2fedmsg-key.pem
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: config
|
||||
- name: ipa-config-volume
|
||||
configMap:
|
||||
name: ipa-client-config
|
||||
- name: keytab-volume
|
||||
secret:
|
||||
secretName: keytab
|
||||
- name: fedora-messaging-config
|
||||
configMap:
|
||||
name: fedora-messaging-config
|
||||
- name: fedora-messaging-ca
|
||||
secret:
|
||||
secretName: fedora-messaging-ca
|
||||
- name: fedora-messaging-crt
|
||||
secret:
|
||||
secretName: fedora-messaging-crt
|
||||
- name: fedora-messaging-key
|
||||
secret:
|
||||
secretName: fedora-messaging-key
|
||||
Loading…
Add table
Add a link
Reference in a new issue