1
0
Fork 0
forked from infra/ansible

release-monitoring: moved deploymentconfig.yml to deployment.yml

Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
Pedro Moura 2026-04-23 17:54:01 -03:00 committed by Kevin Fenzi
commit d68317c6a4
2 changed files with 168 additions and 198 deletions

View file

@ -0,0 +1,168 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: release-monitoring-web
service: web
name: release-monitoring-web
spec:
replicas: 1
selector:
matchLabels:
app: release-monitoring-web
strategy:
type: Recreate
template:
metadata:
labels:
app: release-monitoring-web
service: web
annotations:
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"release-monitoring-web:latest","namespace":"release-monitoring"},"fieldPath":"spec.template.spec.containers[?(@.name==\"release-monitoring-web\")].image"}]'
spec:
initContainers:
- name: alembic-upgrade
image: image-registry.openshift-image-registry.svc:5000/release-monitoring/release-monitoring-web:latest
command: ["/usr/bin/python3", "-m", "alembic", "-c", "/etc/anitya/alembic.ini", "upgrade", "head"]
volumeMounts:
- name: config-volume
mountPath: /etc/anitya
readOnly: true
containers:
- name: release-monitoring-web
image: image-registry.openshift-image-registry.svc:5000/release-monitoring/release-monitoring-web:latest
command: ["bash"]
args: ["/etc/anitya/start.sh"]
env:
- name: ANITYA_WEB_CONFIG
value: /etc/anitya/anitya.toml
ports:
- containerPort: 8080
resources: {}
volumeMounts:
- name: config-volume
mountPath: /etc/anitya
readOnly: true
- name: fedora-messaging-config-volume
mountPath: /etc/fedora-messaging
readOnly: true
- name: fedora-messaging-ca-volume
mountPath: /etc/pki/rabbitmq/ca
readOnly: true
- name: fedora-messaging-key-volume
mountPath: /etc/pki/rabbitmq/key
readOnly: true
- name: fedora-messaging-cert-volume
mountPath: /etc/pki/rabbitmq/cert
readOnly: true
readinessProbe:
timeoutSeconds: 10
initialDelaySeconds: 15
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 10
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
volumes:
- name: config-volume
configMap:
name: release-monitoring-configmap
- name: fedora-messaging-config-volume
configMap:
name: fedora-messaging-configmap
- name: fedora-messaging-ca-volume
secret:
secretName: release-monitoring-fedora-messaging-ca
- name: fedora-messaging-key-volume
secret:
secretName: release-monitoring-fedora-messaging-key
- name: fedora-messaging-cert-volume
secret:
secretName: release-monitoring-fedora-messaging-cert
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: release-monitoring-check-service
service: web
name: release-monitoring-check-service
spec:
{% if env == 'staging' %}
replicas: 0
{% else %}
replicas: 1
{% endif %}
selector:
matchLabels:
app: release-monitoring-check-service
strategy:
type: Recreate
template:
metadata:
labels:
app: release-monitoring-check-service
service: web
annotations:
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"release-monitoring-web:latest","namespace":"release-monitoring"},"fieldPath":"spec.template.spec.containers[?(@.name==\"release-monitoring-web\")].image"}]'
spec:
initContainers:
- name: alembic-check
image: image-registry.openshift-image-registry.svc:5000/release-monitoring/release-monitoring-web:latest
command: ["/bin/bash", "-c"]
args:
- |
python3 -m alembic -c /etc/anitya/alembic.ini current | grep '(head)'
env:
- name: ANITYA_WEB_CONFIG
value: /etc/anitya/anitya.toml
volumeMounts:
- name: config-volume
mountPath: /etc/anitya
readOnly: true
containers:
- name: release-monitoring-web
image: image-registry.openshift-image-registry.svc:5000/release-monitoring/release-monitoring-web:latest
command: ["python3"]
args: ["/usr/local/bin/check_service"]
env:
- name: ANITYA_WEB_CONFIG
value: /etc/anitya/anitya.toml
resources: {}
volumeMounts:
- name: config-volume
mountPath: /etc/anitya
readOnly: true
- name: fedora-messaging-config-volume
mountPath: /etc/fedora-messaging
readOnly: true
- name: fedora-messaging-ca-volume
mountPath: /etc/pki/rabbitmq/ca
readOnly: true
- name: fedora-messaging-key-volume
mountPath: /etc/pki/rabbitmq/key
readOnly: true
- name: fedora-messaging-cert-volume
mountPath: /etc/pki/rabbitmq/cert
readOnly: true
volumes:
- name: config-volume
configMap:
name: release-monitoring-configmap
- name: fedora-messaging-config-volume
configMap:
name: fedora-messaging-configmap
- name: fedora-messaging-ca-volume
secret:
secretName: release-monitoring-fedora-messaging-ca
- name: fedora-messaging-key-volume
secret:
secretName: release-monitoring-fedora-messaging-key
- name: fedora-messaging-cert-volume
secret:
secretName: release-monitoring-fedora-messaging-cert

View file

@ -1,198 +0,0 @@
---
apiVersion: apps.openshift.io/v1
items:
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: release-monitoring-web
service: web
name: release-monitoring-web
spec:
replicas: 1
selector:
deploymentconfig: release-monitoring-web
strategy:
activeDeadlineSeconds: 900
recreateParams:
timeoutSeconds: 600
mid:
failurePolicy: Abort
execNewPod:
containerName: release-monitoring-web
command: ["/usr/bin/python3", "-m", "alembic", "-c", "/etc/anitya/alembic.ini", "upgrade", "head"]
volumes:
- config-volume
resources: {}
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
app: release-monitoring-web
deploymentconfig: release-monitoring-web
spec:
containers:
- name: release-monitoring-web
image: release-monitoring/release-monitoring-web:latest
command:
- bash
args:
- /etc/anitya/start.sh
env:
- name: ANITYA_WEB_CONFIG
value: /etc/anitya/anitya.toml
ports:
- containerPort: 8080
resources: {}
volumeMounts:
- name: config-volume
mountPath: /etc/anitya
readOnly: true
- name: fedora-messaging-config-volume
mountPath: /etc/fedora-messaging
readOnly: true
- name: fedora-messaging-ca-volume
mountPath: /etc/pki/rabbitmq/ca
readOnly: true
- name: fedora-messaging-key-volume
mountPath: /etc/pki/rabbitmq/key
readOnly: true
- name: fedora-messaging-cert-volume
mountPath: /etc/pki/rabbitmq/cert
readOnly: true
readinessProbe:
timeoutSeconds: 10
initialDelaySeconds: 15
httpGet:
path: /
port: 8080
livenessProbe:
timeoutSeconds: 10
initialDelaySeconds: 30
httpGet:
path: /
port: 8080
volumes:
- name: config-volume
configMap:
name: release-monitoring-configmap
- name: fedora-messaging-config-volume
configMap:
name: fedora-messaging-configmap
- name: fedora-messaging-ca-volume
secret:
secretName: release-monitoring-fedora-messaging-ca
- name: fedora-messaging-key-volume
secret:
secretName: release-monitoring-fedora-messaging-key
- name: fedora-messaging-cert-volume
secret:
secretName: release-monitoring-fedora-messaging-cert
triggers:
- imageChangeParams:
automatic: true
containerNames:
- release-monitoring-web
from:
kind: ImageStreamTag
name: release-monitoring-web:latest
namespace: release-monitoring
type: ImageChange
- apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
labels:
app: release-monitoring-check-service
service: web
name: release-monitoring-check-service
spec:
{% if env == 'staging' %}
replicas: 0
{% else %}
replicas: 1
{% endif %}
selector:
deploymentconfig: release-monitoring-check-service
strategy:
activeDeadlineSeconds: 900
recreateParams:
timeoutSeconds: 30
mid:
failurePolicy: Retry
execNewPod:
containerName: release-monitoring-web
command:
- /bin/bash
- -c
- |
python3 -m alembic -c /etc/anitya/alembic.ini current | grep '(head)'
env:
- name: ANITYA_WEB_CONFIG
value: /etc/anitya/anitya.toml
volumes:
- config-volume
resources: {}
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
app: release-monitoring-check-service
deploymentconfig: release-monitoring-check-service
spec:
containers:
- name: release-monitoring-web
image: release-monitoring/release-monitoring-web:latest
command:
- python3
args:
- /usr/local/bin/check_service
env:
- name: ANITYA_WEB_CONFIG
value: /etc/anitya/anitya.toml
resources: {}
volumeMounts:
- name: config-volume
mountPath: /etc/anitya
readOnly: true
- name: fedora-messaging-config-volume
mountPath: /etc/fedora-messaging
readOnly: true
- name: fedora-messaging-ca-volume
mountPath: /etc/pki/rabbitmq/ca
readOnly: true
- name: fedora-messaging-key-volume
mountPath: /etc/pki/rabbitmq/key
readOnly: true
- name: fedora-messaging-cert-volume
mountPath: /etc/pki/rabbitmq/cert
readOnly: true
volumes:
- name: config-volume
configMap:
name: release-monitoring-configmap
- name: fedora-messaging-config-volume
configMap:
name: fedora-messaging-configmap
- name: fedora-messaging-ca-volume
secret:
secretName: release-monitoring-fedora-messaging-ca
- name: fedora-messaging-key-volume
secret:
secretName: release-monitoring-fedora-messaging-key
- name: fedora-messaging-cert-volume
secret:
secretName: release-monitoring-fedora-messaging-cert
triggers:
- imageChangeParams:
automatic: true
containerNames:
- release-monitoring-web
from:
kind: ImageStreamTag
name: release-monitoring-web:latest
namespace: release-monitoring
type: ImageChange
kind: List
metadata: {}