split up the flyimg files to make it more readable

This commit is contained in:
Lee 2024-09-23 08:31:47 +01:00
parent 2ff3027cd7
commit 2012254805
5 changed files with 72 additions and 70 deletions

View File

@ -152,72 +152,3 @@ data:
time: '00:00:01'
colorspace: 'sRGB'
monochrome: null
---
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
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
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flyimg-pvc
namespace: public-services
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: v1
kind: Service
metadata:
name: flyimg-service
namespace: public-services
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
selector:
app: flyimg

View File

@ -0,0 +1,43 @@
---
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
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

View File

@ -3,5 +3,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: public-services
resources:
- flyimg.yaml
- config.yaml
- pvc.yaml
- deployment.yaml
- service.yaml
- ingress.yaml

View File

@ -0,0 +1,12 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: flyimg-pvc
namespace: public-services
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi

View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: flyimg-service
namespace: public-services
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
selector:
app: flyimg