Build bugzilla2fedmsg in openshift using s2i

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2019-12-10 14:49:15 +01:00 committed by Pierre-Yves Chibon
parent bacdceefb6
commit aa71ec078e
3 changed files with 19 additions and 39 deletions

View file

@ -6,26 +6,19 @@ metadata:
environment: "bugzilla2fedmsg"
spec:
source:
type: Dockerfile
dockerfile: |-
FROM fedora:31
LABEL \
name="bugzilla2fedmsg" \
vendor="Fedora Infrastructure" \
license="MIT"
RUN curl -o /etc/yum.repos.d/infra-tags.repo https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
{% if env == "staging" %}
RUN curl -o /etc/yum.repos.d/infra-tags-stg.repo https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags-stg.repo
{% endif %}
RUN dnf install -y bugzilla2fedmsg
ENV USER=openshift
ENTRYPOINT /usr/bin/bugzilla2fedmsg
type: Git
git:
uri: https://github.com/fedora-infra/bugzilla2fedmsg.git
strategy:
type: Docker
dockerStrategy:
noCache: false
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
namespace: openshift
name: python:3.6
triggers:
- type: ImageChange
- type: ConfigChange
output:
to:
kind: ImageStreamTag

View file

@ -7,6 +7,6 @@ metadata:
labels:
app: bugzilla2fedmsg
data:
fedora-messaging.toml: |-
config.toml: |-
{{ load_file('fedora-messaging.toml') | indent }}

View file

@ -2,12 +2,12 @@
apiVersion: v1
kind: DeploymentConfig
metadata:
name: bugzilla2fedmsg
labels:
app: bugzilla2fedmsg
service: bugzilla2fedmsg
name: bugzilla2fedmsg
spec:
replicas: 2
replicas: 1
selector:
app: bugzilla2fedmsg
deploymentconfig: bugzilla2fedmsg
@ -20,14 +20,13 @@ spec:
deploymentconfig: bugzilla2fedmsg
spec:
containers:
- image: bugzilla2fedmsg:latest
name: bugzilla2fedmsg
- name: bugzilla2fedmsg
image: bugzilla2fedmsg:latest
env:
- name: APP_MODULE
value: "bugzilla2fedmsg:app"
ports:
- containerPort: 8080
protocol: TCP
- name: APP_SCRIPT
value: "bugzilla2fedmsg"
# - name: FEDORA_MESSAGING_CONF
# value: "/etc/fedora-messaging/config.toml"
volumeMounts:
- name: fedora-messaging-config-volume
mountPath: /etc/fedora-messaging
@ -52,18 +51,6 @@ spec:
mountPath: /etc/pki/stomp/msg-client-fedora-prod.key
subPath: msg-client-fedora-prod.key
readOnly: true
readinessProbe:
timeoutSeconds: 1
initialDelaySeconds: 5
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 1
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
volumes:
- name: fedora-messaging-config-volume
configMap: