mirror of
https://github.com/gravitl/netmaker.git
synced 2025-02-26 17:15:23 +08:00
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
|
apiVersion: apps/v1
|
||
|
kind: DaemonSet
|
||
|
metadata:
|
||
|
name: netclient
|
||
|
labels:
|
||
|
app: netclient
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: netclient
|
||
|
replicas: 1
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: netclient
|
||
|
spec:
|
||
|
hostNetwork: true
|
||
|
containers:
|
||
|
- name: netclient
|
||
|
image: gravitl/netclient:v0.5.5
|
||
|
command: ['bash', '-c', "netclient checkin -n $NETWORK; sleep $SLEEP"]
|
||
|
env:
|
||
|
- name: ACCESS_TOKEN
|
||
|
value: "XXXX"
|
||
|
- name: NETWORK
|
||
|
value: "default"
|
||
|
- name: SLEEP
|
||
|
value: 30
|
||
|
volumeMounts:
|
||
|
- mountPath: /etc/netclient
|
||
|
name: etc-netclient
|
||
|
- mountPath: /usr/bin/wg
|
||
|
name: wg
|
||
|
securityContext:
|
||
|
privileged: true
|
||
|
initContainers:
|
||
|
- name: netclient-join
|
||
|
image: gravitl/netclient:v0.5.5
|
||
|
command: ['bash', '-c', "netclient join -t $ACCESS_TOKEN --daemon off"]
|
||
|
env:
|
||
|
- name: ACCESS_TOKEN
|
||
|
value: "XXXX"
|
||
|
volumeMounts:
|
||
|
- mountPath: /etc/netclient
|
||
|
name: etc-netclient
|
||
|
- mountPath: /usr/bin/wg
|
||
|
name: wg
|
||
|
securityContext:
|
||
|
privileged: true
|
||
|
volumes:
|
||
|
- hostPath:
|
||
|
path: /etc/netclient
|
||
|
type: DirectoryOrCreate
|
||
|
name: etc-netclient
|
||
|
- hostPath:
|
||
|
path: /usr/bin/wg
|
||
|
type: File
|
||
|
name: wg
|