-
Notifications
You must be signed in to change notification settings - Fork 0
/
caddy.yaml
96 lines (95 loc) · 2.38 KB
/
caddy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-4.4.0
# NOTE: If you generated this yaml from an unprivileged and rootless podman container on an SELinux
# enabled system, check the podman generate kube man page for steps to follow to ensure that your pod/container
# has the right permissions to access the volumes added.
---
apiVersion: v1
kind: Service
metadata:
creationTimestamp: "2023-02-04T15:04:42Z"
labels:
app: caddy-pod
name: caddy-pod
spec:
ports:
- name: "80"
nodePort: 32761
port: 80
targetPort: 80
- name: "443"
nodePort: 31845
port: 443
targetPort: 443
selector:
app: caddy-pod
type: NodePort
---
apiVersion: v1
kind: Pod
metadata:
annotations:
bind-mount-options: /path/to/Caddyfile:Z
io.containers.autoupdate/caddy: registry
creationTimestamp: "2023-02-04T15:04:42Z"
labels:
app: caddy-pod
name: caddy-pod
spec:
containers:
- image: quay.io/jwillikers/caddy-ovh:latest
name: caddy
securityContext:
# todo Run in the user namespace once Podman supports sysctls.
# https://github.com/containers/podman/issues/16711
# sysctls:
# - name: net.ipv4.ip_unprivileged_port_start
# value: "80"
seLinuxOptions:
type: spc_t
env:
- name: OVH_ENDPOINT
value: ovh-eu
- name: OVH_APPLICATION_KEY
valueFrom:
secretKeyRef:
name: caddy-secrets
key: ovh_application_key
optional: false
- name: OVH_APPLICATION_SECRET
valueFrom:
secretKeyRef:
name: caddy-secrets
key: ovh_application_secret
optional: false
- name: OVH_CONSUMER_KEY
valueFrom:
secretKeyRef:
name: caddy-secrets
key: ovh_consumer_key
optional: false
ports:
- containerPort: 80
hostPort: 80
- containerPort: 443
hostPort: 443
volumeMounts:
- mountPath: /etc/caddy/Caddyfile
name: path-to-Caddyfile-host-0
- mountPath: /config/
name: caddy-config-pvc
- mountPath: /data/
name: caddy-data-pvc
volumes:
- hostPath:
path: /path/to/Caddyfile
type: File
name: path-to-Caddyfile-host-0
- name: caddy-config-pvc
persistentVolumeClaim:
claimName: caddy-config
- name: caddy-data-pvc
persistentVolumeClaim:
claimName: caddy-data