1
0
Fork 0
forked from infra/ansible

add webhook2fedmsg deployment

Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
Pedro Moura 2026-02-23 21:12:23 -03:00 committed by Kevin Fenzi
commit a2f297a82b

View file

@ -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