forked from infra/ansible
add poddlers deployment
Signed-off-by: Pedro Moura <pmoura@redhat.com>
This commit is contained in:
parent
85b34d77e8
commit
9f4fc542e4
1 changed files with 51 additions and 0 deletions
51
roles/openshift-apps/poddlers/templates/deployment.yml.j2
Normal file
51
roles/openshift-apps/poddlers/templates/deployment.yml.j2
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{% from "_macros.yml.j2" import common_volume_mounts, common_volumes, common_env %}
|
||||
{% for toddler in poddlers_toddlers %}
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ toddler.name }}
|
||||
labels:
|
||||
app: poddlers
|
||||
spec:
|
||||
replicas: {{ toddler.replicas|default(1) }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: poddlers
|
||||
deployment: {{ toddler.name }}
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: poddlers
|
||||
deployment: {{ toddler.name }}
|
||||
annotations:
|
||||
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"toddlers:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"toddlers\")].image"}]'
|
||||
spec:
|
||||
containers:
|
||||
- name: toddlers
|
||||
image: toddlers:latest
|
||||
env:
|
||||
- name: FEDORA_MESSAGING_CONF
|
||||
value: /etc/fedora-messaging/{{ toddler.name }}.toml
|
||||
{% if toddler.name == "cleaning-packager-groups" -%}
|
||||
- name: KRB5_CLIENT_KTNAME
|
||||
value: /etc/sync-group-keytabs/sync-group.keytab
|
||||
{% endif -%}
|
||||
{{ common_env() }}
|
||||
volumeMounts:
|
||||
{{ common_volume_mounts() }}
|
||||
{% if toddler.name == "cleaning-packager-groups" -%}
|
||||
- name: sync-group-keytab-volume
|
||||
mountPath: /etc/sync-group-keytabs
|
||||
readOnly: true
|
||||
{% endif %}
|
||||
volumes:
|
||||
{{ common_volumes() }}
|
||||
{% if toddler.name == "cleaning-packager-groups" -%}
|
||||
- name: sync-group-keytab-volume
|
||||
secret:
|
||||
secretName: sync-group-keytab
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue