deployment updates
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: symfony
|
||||
namespace: symfony
|
||||
labels:
|
||||
app: symfony
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
|
||||
selector:
|
||||
matchLabels:
|
||||
app: symfony
|
||||
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: symfony
|
||||
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: cluster-01
|
||||
command:
|
||||
- php
|
||||
- bin/console
|
||||
- doctrine:migrations:migrate
|
||||
- --no-interaction
|
||||
|
||||
containers:
|
||||
- name: symfony
|
||||
image: symfony-k3s:dev-8
|
||||
imagePullPolicy: Never
|
||||
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
|
||||
env:
|
||||
- name: APP_ENV
|
||||
value: prod
|
||||
|
||||
- name: APP_DEBUG
|
||||
value: "0"
|
||||
|
||||
# - name: APP_ENV
|
||||
# value: dev
|
||||
|
||||
# - name: APP_DEBUG
|
||||
# value: "1"
|
||||
|
||||
- name: SERVER_NAME
|
||||
value: ":8080"
|
||||
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: symfony-database
|
||||
key: DATABASE_URL
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
+29
-5
@@ -22,9 +22,33 @@ spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: cluster-01
|
||||
|
||||
initContainers:
|
||||
- name: database-migrations
|
||||
image: symfony-k3s:dev-8
|
||||
imagePullPolicy: Never
|
||||
|
||||
env:
|
||||
- name: APP_ENV
|
||||
value: prod
|
||||
|
||||
- name: APP_DEBUG
|
||||
value: "0"
|
||||
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: symfony-database
|
||||
key: DATABASE_URL
|
||||
|
||||
command:
|
||||
- php
|
||||
- bin/console
|
||||
- doctrine:migrations:migrate
|
||||
- --no-interaction
|
||||
|
||||
containers:
|
||||
- name: symfony
|
||||
image: symfony-k3s:dev-6
|
||||
image: symfony-k3s:dev-8
|
||||
imagePullPolicy: Never
|
||||
|
||||
ports:
|
||||
@@ -38,11 +62,11 @@ spec:
|
||||
- name: APP_DEBUG
|
||||
value: "0"
|
||||
|
||||
# - name: APP_ENV
|
||||
# value: dev
|
||||
# - name: APP_ENV
|
||||
# value: dev
|
||||
|
||||
# - name: APP_DEBUG
|
||||
# value: "1"
|
||||
# - name: APP_DEBUG
|
||||
# value: "1"
|
||||
|
||||
- name: SERVER_NAME
|
||||
value: ":8080"
|
||||
|
||||
Reference in New Issue
Block a user