using deploy

This commit is contained in:
Ariel Sosnovsky committed 2024-03-14 17:05:39 -04:00
1 parent cc228a5fd6
commit 9d8427f0c3
1 file changed
+33 -24
+33 -24
View File
@@ -10,35 +10,44 @@ data:
index.html: {{ $staticFile.content }}
---
apiVersion: v1
kind: Pod
kind: Deployment
apiVersion: apps/v1
metadata:
name: "{{$prefix}}-host"
labels:
app: "{{$prefix}}-host"
spec:
volumes:
- name: static-files
configMap:
name: "{{$prefix}}-static-files"
containers:
- name: api
image: caddy:2.7-alpine
command:
- caddy
- file-server
- --root
- /files
- --listen
- '0.0.0.0:80'
volumeMount:
- mountPath: /files
name: static-files
resources:
limits:
memory: 1Gi
ports:
- containerPort: 80
replicas: 1
selector:
matchLabels:
app: "{{$prefix}}-host"
template:
metadata:
labels:
app: "{{$prefix}}-host"
spec:
volumes:
- name: static-files
configMap:
name: "{{$prefix}}-static-files"
containers:
- name: api
image: caddy:2.7-alpine
command:
- caddy
- file-server
- --root
- /files
- --listen
- '0.0.0.0:80'
volumeMount:
- mountPath: /files
name: static-files
resources:
limits:
memory: 1Gi
ports:
- containerPort: 80
---
kind: Service
apiVersion: v1