move k8s cluster data to its own dir
This commit is contained in:
45
kubernetes/apps/production/flyimg/deployment.yaml
Normal file
45
kubernetes/apps/production/flyimg/deployment.yaml
Normal file
@ -0,0 +1,45 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: flyimg
|
||||
namespace: public-services
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: flyimg
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: flyimg
|
||||
spec:
|
||||
containers:
|
||||
- name: flyimg-container
|
||||
image: flyimg/flyimg:1.4.12
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 1000m # 1 vCPU
|
||||
memory: 200Mi
|
||||
volumeMounts:
|
||||
- name: flyimg-storage
|
||||
mountPath: /var/www/html/web/uploads
|
||||
- name: config-volume
|
||||
mountPath: /var/www/html/config/parameters.yml
|
||||
subPath: parameters.yml
|
||||
volumes:
|
||||
- name: flyimg-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: flyimg-pvc
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: flyimg-config
|
Reference in New Issue
Block a user