-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathpackit-service-fedmsg.yml.j2
84 lines (83 loc) · 2.45 KB
/
packit-service-fedmsg.yml.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: packit-service-fedmsg
annotations:
# https://docs.openshift.com/container-platform/4.11/openshift_images/triggering-updates-on-imagestream-changes.html
image.openshift.io/triggers: >-
[{"from":{"kind":"ImageStreamTag","name":"packit-service-fedmsg:{{ deployment }}"},"fieldPath":"spec.template.spec.containers[?(@.name==\"packit-service-fedmsg\")].image"}]
{% if managed_platform %}
labels:
app-code: "{{ appcode }}"
service-phase: "{{ servicephase }}"
cost-center: "{{ costcenter }}"
{% endif %}
spec:
selector:
matchLabels:
component: packit-service-fedmsg
template:
metadata:
labels:
component: packit-service-fedmsg
{% if managed_platform %}
paas.redhat.com/appcode: {{ appcode }}
{% endif %}
spec:
volumes:
- name: packit-config
secret:
secretName: packit-config
containers:
- name: packit-service-fedmsg
image: packit-service-fedmsg:{{ deployment }}
env:
- name: FEDORA_MESSAGING_CONF
value: /home/packit/.config/fedora.toml
- name: REDIS_SERVICE_HOST
value: {{ redis_hostname }}
- name: PROJECT
value: {{ project }}
- name: DEPLOYMENT
value: {{ deployment }}
- name: SENTRY_SECRET
valueFrom: {secretKeyRef: {name: sentry, key: dsn}}
volumeMounts:
- name: packit-config
mountPath: /home/packit/.config
resources:
requests:
memory: "88Mi"
cpu: "5m"
limits:
memory: "128Mi"
cpu: "50m"
livenessProbe:
exec:
command:
- liveness.sh
initialDelaySeconds: 300
periodSeconds: 60
replicas: 1
strategy:
type: Recreate
---
kind: ImageStream
apiVersion: image.openshift.io/v1
metadata:
name: packit-service-fedmsg
spec:
tags:
- name: {{ deployment }}
from:
kind: DockerImage
name: {{ image_fedmsg }}
importPolicy:
# Periodically query registry to synchronize tag and image metadata.
scheduled: {{ auto_import_images }}
lookupPolicy:
# allows all resources pointing to this image stream to use it in the image field
local: true