2022-01-19 08:59:04 +01:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: zerotier
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: zerotier
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: zerotier
|
|
|
|
spec:
|
|
|
|
initContainers:
|
|
|
|
- name: network-joiner
|
|
|
|
image: busybox
|
|
|
|
env:
|
|
|
|
- name: NETWORK_ID
|
|
|
|
value: "<replace with network id>"
|
|
|
|
command: [ "sh", "-c", "mkdir -p /mnt/networks.d && touch /mnt/networks.d/$(NETWORK_ID).conf" ]
|
|
|
|
volumeMounts:
|
|
|
|
- name: vol
|
|
|
|
subPath: config
|
|
|
|
mountPath: /mnt
|
2022-01-31 11:58:07 +01:00
|
|
|
|
2022-01-19 08:59:04 +01:00
|
|
|
containers:
|
|
|
|
- name: zerotier
|
2022-07-18 08:03:36 +02:00
|
|
|
image: zyclonite/zerotier:router
|
2022-01-19 08:59:04 +01:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
memory: "128Mi"
|
|
|
|
cpu: "500m"
|
|
|
|
ports:
|
|
|
|
- name: net
|
|
|
|
containerPort: 9993
|
|
|
|
volumeMounts:
|
|
|
|
- name: vol
|
|
|
|
subPath: config
|
|
|
|
mountPath: /var/lib/zerotier-one
|
|
|
|
- name: tun
|
|
|
|
readOnly: true
|
|
|
|
mountPath: /dev/net/tun
|
2022-01-31 11:58:07 +01:00
|
|
|
|
2022-01-19 08:59:04 +01:00
|
|
|
securityContext:
|
|
|
|
capabilities:
|
|
|
|
add:
|
|
|
|
- NET_ADMIN
|
2022-01-31 11:58:07 +01:00
|
|
|
- NET_RAW
|
2022-01-19 08:59:04 +01:00
|
|
|
- SYS_ADMIN
|
2022-01-31 11:58:07 +01:00
|
|
|
|
2022-01-19 08:59:04 +01:00
|
|
|
dnsPolicy: "None"
|
|
|
|
dnsConfig:
|
|
|
|
nameservers:
|
|
|
|
- 1.1.1.1
|
|
|
|
- 8.8.8.8
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
- name: vol
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: zerotier
|
|
|
|
- name: tun
|
|
|
|
hostPath:
|
|
|
|
path: /dev/net/tun
|
2022-01-31 11:58:07 +01:00
|
|
|
type: ''
|