-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdaemonset.yml
76 lines (75 loc) · 1.92 KB
/
daemonset.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
# Copyright (c) 2017-present SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: velero-node-agent
name: node-agent
spec:
selector:
matchLabels:
k8s-app: velero-node-agent
name: node-agent
component: velero
template:
metadata:
labels:
k8s-app: velero-node-agent
name: node-agent
component: velero
spec:
containers:
- args:
- node-agent
- server
command:
- /velero
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: VELERO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: VELERO_SCRATCH_DIR
value: /scratch
- name: AZURE_CREDENTIALS_FILE
value: /credentials/cloud
- name: GOOGLE_APPLICATION_CREDENTIALS
value: /credentials/cloud
- name: AWS_SHARED_CREDENTIALS_FILE
value: /credentials/cloud
image: velero/velero
imagePullPolicy: Always
securityContext:
allowPrivilegeEscalation: false
name: node-agent
resources:
requests:
cpu: 100m
memory: 100Mi
volumeMounts:
- mountPath: /host_pods
mountPropagation: HostToContainer
name: host-pods
- mountPath: /scratch
name: scratch
- mountPath: /credentials
name: cloud-credentials
securityContext:
runAsUser: 0
serviceAccountName: velero
volumes:
- hostPath:
path: /var/lib/kubelet/pods
name: host-pods
- emptyDir: {}
name: scratch
- name: cloud-credentials
secret:
secretName: cloud-credentials