-
Notifications
You must be signed in to change notification settings - Fork 1
/
miniodeploy.yml
64 lines (64 loc) · 2.1 KB
/
miniodeploy.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
# This name uniquely identifies the Deployment
name: minio-client-deployment
spec:
strategy:
type: Recreate
template:
metadata:
labels:
# Label is used as selector in the service.
app: minio-client
spec:
containers:
- name: pluto
image: docker.io/opsmx11/minio-client:v2
imagePullPolicy: Always
env:
- name: minio1Endpoint
valueFrom:
configMapKeyRef:
name: mcclient
key: minio1endpoint
- name: minio1Accesskey
valueFrom:
configMapKeyRef:
name: mcclient
key: minio1accesskey
- name: minio1Secretaccess
valueFrom:
configMapKeyRef:
name: mcclient
key: minio1secretaccess
- name: minio2Endpoint
valueFrom:
configMapKeyRef:
name: mcclient
key: minio2endpoint
- name: minio2Accesskey
valueFrom:
configMapKeyRef:
name: mcclient
key: minio2accesskey
- name: minio2Secretaccess
valueFrom:
configMapKeyRef:
name: mcclient
key: minio2secretaccess
- name: bucket
valueFrom:
configMapKeyRef:
name: mcclient
key: bucket
- name: bucket2
valueFrom:
configMapKeyRef:
name: mcclient
key: bucketsecond
command: [ "/bin/sh", "-c"]
args: [ "./mc --config-folder /root config host add minio1 $(minio1Endpoint) $(minio1Accesskey) $(minio1Secretaccess);
./mc --config-folder /root config host add minio2 $(minio2Endpoint) $(minio2Accesskey) $(minio2Secretaccess);
./mc --config-folder /root mirror -w minio1/$(bucket) minio2/$(bucket2) " ]
restartPolicy: Never