1
0
Fork 0
forked from infra/ansible

elections: moved deploymentconfig.yml to deployment.yml

Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
Pedro Moura 2026-04-15 18:35:01 -03:00 committed by Kevin Fenzi
commit a9d3b403bc

View file

@ -1,6 +1,6 @@
---
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: elections
@ -9,35 +9,42 @@ metadata:
spec:
replicas: 1
selector:
app: elections
deploymentconfig: elections
matchLabels:
app: elections
strategy:
type: Recreate
recreateParams:
mid:
failurePolicy: Abort
execNewPod:
containerName: elections
command: ["/opt/app-root/src/alembic_upgrade.sh"]
env:
- name: PYTHONPATH
value: /opt/app-root/src
- name: KRB5_CONFIG
value: /etc/ipa/krb5.conf
volumes:
- config-volume
- elections-secret-volume
- ipa-config-volume
- keytab-volume
template:
metadata:
labels:
app: elections
deploymentconfig: elections
annotations:
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"elections:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"elections\")].image"}]'
spec:
initContainers:
- name: alembic-upgrade
image: image-registry.openshift-image-registry.svc:5000/elections/elections:latest
command: ["/opt/app-root/src/alembic_upgrade.sh"]
env:
- name: PYTHONPATH
value: /opt/app-root/src
- name: KRB5_CONFIG
value: /etc/ipa/krb5.conf
volumeMounts:
- name: config-volume
mountPath: /opt/app-root/config/
readOnly: true
- name: elections-secret-volume
mountPath: /opt/app-root/secret/
readOnly: true
- name: ipa-config-volume
mountPath: /etc/ipa
readOnly: true
- name: keytab-volume
mountPath: /etc/keytabs
readOnly: true
containers:
- name: elections
image: elections:latest
image: image-registry.openshift-image-registry.svc:5000/elections/elections:latest
ports:
- containerPort: 8000
resources: {}
@ -102,14 +109,3 @@ spec:
- name: keytab-volume
secret:
secretName: elections-keytab
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- elections
from:
kind: ImageStreamTag
name: elections:latest