mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 05:51:56 +08:00
51 lines
1.2 KiB
Django/Jinja
51 lines
1.2 KiB
Django/Jinja
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: "web"
|
|
labels:
|
|
app: "web"
|
|
annotations:
|
|
image.openshift.io/triggers: >-
|
|
[{"from":{"kind":"ImageStreamTag","name":"nginx:latest","namespace":"languages"},"fieldPath":"spec.template.spec.containers[?(@.name==\"nginx\")].image","pause":"false"}]
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: "web"
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "web"
|
|
spec:
|
|
containers:
|
|
- image: registry.access.redhat.com/ubi8/nginx-118
|
|
name: nginx
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- nginx
|
|
- "-g"
|
|
- "daemon off;"
|
|
ports:
|
|
- containerPort: 8080
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: nginx-data
|
|
mountPath: /opt/app-root/src
|
|
subPath: public
|
|
- name: nginx-data
|
|
subPath: logs
|
|
mountPath: /var/log/nginx
|
|
resources:
|
|
limits:
|
|
cpu: 20m
|
|
memory: 250Mi
|
|
requests:
|
|
cpu: '0'
|
|
memory: 10Mi
|
|
volumes:
|
|
- name: nginx-data
|
|
persistentVolumeClaim:
|
|
claimName: "languages-storage{{ '-stg' if env == 'staging' else '' }}"
|
|
restartPolicy: Always
|