-
Notifications
You must be signed in to change notification settings - Fork 3
/
forge-pod.yml
132 lines (129 loc) · 3.88 KB
/
forge-pod.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# uBlue-OS forge podman deployment
## variables will be replaces with envsubst when invoked via forge.sh
---
apiVersion: v1
kind: Pod
metadata:
name: ${FORGE_POD_NAME_REVERSE_PROXY}
labels:
traefik.enable: true
traefik.http.routers.traefik-dashboard.entrypoints: web,websecure
traefik.http.routers.traefik-dashboard.rule: Host(`traefik.${FORGE_DOMAIN_NAME}`)
traefik.http.services.traefik-dashboard.loadbalancer.server.port: 8080
traefik.http.routers.traefik-dashboard.service: api@internal
spec:
securityContext:
seLinuxOptions:
type: "container_runtime_t" # needed for podman.sock access
restartPolicy: OnFailure
volumes:
- name: podman-socket
hostPath:
path: ${FORGE_PODMAN_SOCKET_PATH}
type: Socket
- name: ublue-os_forge-certs-pvc
persistentVolumeClaim:
claimName: ublue-os_forge-certs
containers:
- name: traefik.${FORGE_DOMAIN_NAME}
image: traefik # will be built on pod start
volumeMounts:
- mountPath: /var/run/podman.sock
name: podman-socket
readOnly: true
- mountPath: /certs
name: ublue-os_forge-certs-pvc
ports:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
- containerPort: 8080
hostPort: 8080
protocol: TCP
initContainers:
- name: minica.${FORGE_DOMAIN_NAME}
image: minica
volumeMounts:
- mountPath: /certs
name: ublue-os_forge-certs-pvc
---
apiVersion: v1
kind: Pod
metadata:
name: ${FORGE_POD_NAME_REGISTRY}
labels:
traefik.enable: true
traefik.http.routers.registry.entryPoints: web,websecure
traefik.http.services.registry.loadbalancer.server.port: 5000
traefik.http.services.registry.loadbalancer.server.scheme: https
traefik.http.routers.registry.rule: Host(`registry.${FORGE_DOMAIN_NAME}`)
spec:
restartPolicy: OnFailure
volumes:
- name: ublue-os_forge-certs-pvc
persistentVolumeClaim:
claimName: ublue-os_forge-certs
- name: ublue-os_forge-registry-pvc
persistentVolumeClaim:
claimName: ublue-os_forge-registry
containers:
- name: docker.${FORGE_DOMAIN_NAME}
image: registry # will be built on pod start
volumeMounts:
- mountPath: /certs
name: ublue-os_forge-certs-pvc
subPath: _.${FORGE_DOMAIN_NAME}
- mountPath: /var/lib/registry
name: ublue-os_forge-registry-pvc
ports:
- containerPort: 5000
protocol: TCP
---
apiVersion: v1
kind: Pod
metadata:
name: ${FORGE_POD_NAME_ANVIL}
labels:
traefik.enable: true
traefik.http.routers.forge.entrypoints: web,websecure
traefik.http.routers.forge.rule: Host(`forge.${FORGE_DOMAIN_NAME}`)
traefik.http.services.forge.loadbalancer.server.port: 3000
spec:
restartPolicy: OnFailure
volumes:
- name: ublue-os_forge-certs-pvc
persistentVolumeClaim:
claimName: ublue-os_forge-certs
- name: ublue-os_forge-data-pvc
persistentVolumeClaim:
claimName: ublue-os_forge-data
hostAliases:
- ip: ${FORGE_HOST_IP_ADDRESS}
hostnames:
- registry.${FORGE_DOMAIN_NAME}
containers:
- name: ansible.${FORGE_DOMAIN_NAME}
image: anvil # will be built on pod start
volumeMounts:
- mountPath: /certs
name: ublue-os_forge-certs-pvc
readOnly: true
- mountPath: /data
name: ublue-os_forge-data-pvc
env:
- name: ANSIBLE_HOST_USER
valueFrom:
secretKeyRef:
name: ublue-os_forge-secure
key: ANSIBLE_HOST_USER
- name: ANSIBLE_HOST_BECOME_PASSWORD
valueFrom:
secretKeyRef:
name: ublue-os_forge-secure
key: ANSIBLE_HOST_BECOME_PASSWORD
ports:
- containerPort: 3000
protocol: TCP