-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobc-rgw-ext.yaml
More file actions
68 lines (68 loc) · 2.09 KB
/
obc-rgw-ext.yaml
File metadata and controls
68 lines (68 loc) · 2.09 KB
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
---
apiVersion: v1
kind: Namespace
metadata:
name: webinarrgw-ext
spec: {}
---
apiVersion: objectbucket.io/v1alpha1
kind: ObjectBucketClaim
metadata:
name: webinarbucketrgw-ext
namespace: webinarrgw-ext
spec:
generateBucketName: "webinarbucketrgw-ext"
storageClassName: ocs-external-storageslcuter-ceph-rgw
---
apiVersion: batch/v1
kind: Job
metadata:
name: batch1
namespace: webinarrgw-ext
labels:
app: batch1
spec:
template:
metadata:
labels:
app: batch1
spec:
restartPolicy: OnFailure
containers:
- image: amazon/aws-cli:latest
command: ["sh"]
args:
- '-c'
- 'export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID ; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ; while true; do export mystamp=$(date +%Y%m%d_%H%M%S); dd if=/dev/urandom of=/tmp/file_${mystamp} bs=1M count=1; set -x && aws --no-verify-ssl --endpoint http://$BUCKET_HOST:$BUCKET_PORT s3 cp /tmp/file_${mystamp} s3://$BUCKET_NAME; sleep 60; rm /tmp/file_${mystamp}; done'
name: batch1
env:
- name: BUCKET_NAME
valueFrom:
configMapKeyRef:
name: webinarbucketrgw-ext
key: BUCKET_NAME
- name: BUCKET_HOST
valueFrom:
configMapKeyRef:
name: webinarbucketrgw-ext
key: BUCKET_HOST
- name: BUCKET_PORT
valueFrom:
configMapKeyRef:
name: webinarbucketrgw-ext
key: BUCKET_PORT
- name: AWS_DEFAULT_REGION
valueFrom:
configMapKeyRef:
name: webinarbucketrgw-ext
key: BUCKET_REGION
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: webinarbucketrgw-ext
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: webinarbucketrgw-ext
key: AWS_SECRET_ACCESS_KEY