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" environment: "bugzilla2fedmsg"
spec: spec:
source: source:
type: Dockerfile type: Git
dockerfile: |- git:
FROM fedora:31 uri: https://github.com/fedora-infra/bugzilla2fedmsg.git
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
strategy: strategy:
type: Docker type: Source
dockerStrategy: sourceStrategy:
noCache: false from:
kind: ImageStreamTag
namespace: openshift
name: python:3.6
triggers: triggers:
- type: ImageChange - type: ImageChange
- type: ConfigChange
output: output:
to: to:
kind: ImageStreamTag kind: ImageStreamTag

View file

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

View file

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