✨ Adds caddy depl
This commit is contained in:
6
caddy/.gitignore
vendored
Normal file
6
caddy/.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
config/*
|
||||
data/*
|
||||
file/*
|
||||
logs/*
|
||||
|
||||
!**/.gitkeep
|
0
caddy/config/.gitkeep
Normal file
0
caddy/config/.gitkeep
Normal file
0
caddy/data/.gitkeep
Normal file
0
caddy/data/.gitkeep
Normal file
72
caddy/depl.yaml
Normal file
72
caddy/depl.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: caddy
|
||||
labels:
|
||||
app: caddy
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: caddy
|
||||
template:
|
||||
metadata:
|
||||
name: caddy
|
||||
labels:
|
||||
app: caddy
|
||||
spec:
|
||||
hostNetwork: true
|
||||
restartPolicy: Always
|
||||
containers:
|
||||
- name: caddy
|
||||
image: caddy:latest
|
||||
imagePullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 512Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
port: 5001
|
||||
path: /
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 1
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
volumeMounts:
|
||||
- name: caddy-file
|
||||
mountPath: /etc/caddy
|
||||
readOnly: true
|
||||
- name: caddy-logs
|
||||
mountPath: /var/log/caddy
|
||||
- name: caddy-data
|
||||
mountPath: /data
|
||||
- name: caddy-config
|
||||
mountPath: /config
|
||||
securityContext:
|
||||
runAsUser: 1000
|
||||
privileged: true
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
volumes:
|
||||
- name: caddy-file
|
||||
hostPath:
|
||||
path: /mnt/Projects/k3s-testing/caddy/file
|
||||
- name: caddy-logs
|
||||
hostPath:
|
||||
path: /mnt/Projects/k3s-testing/caddy/logs
|
||||
- name: caddy-data
|
||||
hostPath:
|
||||
path: /mnt/Projects/k3s-testing/caddy/data
|
||||
- name: caddy-config
|
||||
hostPath:
|
||||
path: /mnt/Projects/k3s-testing/caddy/config
|
||||
strategy:
|
||||
type: RollingUpdate
|
||||
rollingUpdate:
|
||||
maxUnavailable: 0%
|
||||
maxSurge: 10%
|
0
caddy/file/.gitkeep
Normal file
0
caddy/file/.gitkeep
Normal file
0
caddy/logs/.gitkeep
Normal file
0
caddy/logs/.gitkeep
Normal file
18
caddy/serv.yaml
Normal file
18
caddy/serv.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: caddy
|
||||
spec:
|
||||
selector:
|
||||
app: caddy
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 5001
|
||||
targetPort: 5001
|
||||
- protocol: TCP
|
||||
port: 5002
|
||||
targetPort: 5002
|
||||
- protocol: TCP
|
||||
port: 5033
|
||||
targetPort: 5033
|
||||
type: LoadBalancer
|
Reference in New Issue
Block a user