velero/examples/azure/20-restic-daemonset.yaml

66 lines
1.8 KiB
YAML
Raw Normal View History

# Copyright 2018 the Velero contributors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: restic
namespace: velero
spec:
selector:
matchLabels:
name: restic
template:
metadata:
labels:
name: restic
spec:
serviceAccountName: velero
securityContext:
runAsUser: 0
volumes:
- name: host-pods
hostPath:
path: /var/lib/kubelet/pods
- name: scratch
emptyDir: {}
containers:
- name: velero
image: gcr.io/heptio-images/velero:latest
command:
- /velero
args:
- restic
- server
volumeMounts:
- name: host-pods
mountPath: /host_pods
mountPropagation: HostToContainer
- name: scratch
mountPath: /scratch
envFrom:
- secretRef:
name: cloud-credentials
env:
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: VELERO_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: VELERO_SCRATCH_DIR
value: /scratch