Kubernetes/File/Yaml/aliyun-sync.yaml

45 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2024-08-07 10:54:39 +00:00
apiVersion: apps/v1
kind: StatefulSet
metadata:
namespace: aliyunpan
name: aliyunpan-sync
spec:
podManagementPolicy: OrderedReady
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
app: aliyunpan-sync
serviceName: aliyunpan-sync
minReadySeconds: 5
template:
metadata:
labels:
app: aliyunpan-sync
spec:
terminationGracePeriodSeconds: 5
containers:
- name: aliyunpan-sync
image: tickstep/aliyunpan-sync:v0.2.9
env:
- name: TZ
value: "Asia/Shanghai"
- name: ALIYUNPAN_PAN_DIR
value: ""
- name: ALIYUNPAN_SYNC_MODE
value: "sync"
- name: ALIYUNPAN_REFRESH_TOKEN
valueFrom:
secretKeyRef:
name: aliyunpan-token
key: ALIYUNPAN_REFRESH_TOKEN
volumeMounts:
- name: host-path-volume
mountPath: /home/app/data
volumes:
- name: host-path-volume
hostPath:
path: /data/aliyunpan/
- name: secret-volume
secret:
secretName: aliyunpan-token