mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-11 18:32:08 +08:00
57 lines
1.5 KiB
YAML
57 lines
1.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: DaemonSet
|
|
metadata:
|
|
name: netclient
|
|
labels:
|
|
app: netclient
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: netclient
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: netclient
|
|
spec:
|
|
hostNetwork: true
|
|
containers:
|
|
- name: netclient
|
|
image: gravitl/netclient:v0.5.11
|
|
command: ['bash', '-c', "/root/netclient join -t $ACCESS_TOKEN --daemon off --name $(echo $NODE_NAME| sed -e s/.$NETWORK//); while true; do /root/netclient checkin --dns on -n $NETWORK; sleep $SLEEP; done"]
|
|
env:
|
|
- name: ACCESS_TOKEN
|
|
value: "ACCESS_TOKEN_VALUE"
|
|
- name: NETWORK
|
|
value: "microk8s"
|
|
- name: SLEEP
|
|
value: "30"
|
|
- name: NODE_NAME
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: spec.nodeName
|
|
volumeMounts:
|
|
- mountPath: /etc/netclient
|
|
name: etc-netclient
|
|
- mountPath: /usr/bin/wg
|
|
name: wg
|
|
- mountPath: /var/run/dbus/system_bus_socket
|
|
name: systemd-bus-socket
|
|
securityContext:
|
|
privileged: true
|
|
volumes:
|
|
- hostPath:
|
|
path: /etc/netclient
|
|
type: DirectoryOrCreate
|
|
name: etc-netclient
|
|
- hostPath:
|
|
path: /usr/bin/wg
|
|
type: File
|
|
name: wg
|
|
- hostPath:
|
|
path: /usr/bin/resolvectl
|
|
type: File
|
|
name: resolvectl
|
|
- hostPath:
|
|
path: /var/run/dbus/system_bus_socket
|
|
type: ""
|
|
name: systemd-bus-socket
|