zerotier-docker/k8s/deployment.yaml

66 lines
1.5 KiB
YAML
Raw Normal View History

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
containers:
- name: zerotier
2022-01-27 20:12:32 +01:00
image: zyclonite/zerotier-bridge:latest
2022-01-19 09:08:20 +01:00
env:
- name: BRIDGE
value: "true"
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
securityContext:
capabilities:
add:
- NET_ADMIN
- SYS_ADMIN
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
type: ''