File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ function get_image_tag() {
1010}
1111
1212function build_images() {
13+ oss_emulator_img=${IMG_REPO} /oss-emulator:e2e
1314 images=(
1415 ${IMG_REPO} /dataset-controller:${IMAGE_TAG}
1516 ${IMG_REPO} /application-controller:${IMAGE_TAG}
@@ -24,9 +25,11 @@ function build_images() {
2425 ${IMG_REPO} /fluid-csi:${IMAGE_TAG}
2526 ${IMG_REPO} /fluid-webhook:${IMAGE_TAG}
2627 ${IMG_REPO} /fluid-crd-upgrader:${IMAGE_TAG}
28+ ${oss_emulator_img}
2729 )
2830
2931 make docker-build-all
32+ docker build -t ${oss_emulator_img} test/gha-e2e/jindo/oss-emulator
3033
3134 for img in ${images[@]} ; do
3235 echo " Loading image $img to kind cluster..."
Original file line number Diff line number Diff line change 99 restartPolicy : Never
1010 containers :
1111 - name : busybox
12- image : busybox
12+ image : registry-cn-hongkong.ack.aliyuncs.com/acs/smartdata:6.9.1-202509151826
13+ imagePullPolicy : IfNotPresent
1314 resources :
1415 limits :
1516 ephemeral-storage : " 5Gi"
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ apiVersion: v1
22kind : Service
33metadata :
44 name : minio
5+ labels :
6+ app : minio
7+ app.kubernetes.io/part-of : jindo-e2e-minio
58spec :
69 type : ClusterIP
710 clusterIP : None
@@ -11,31 +14,38 @@ spec:
1114 protocol : TCP
1215 selector :
1316 app : minio
17+ app.kubernetes.io/part-of : jindo-e2e-minio
1418---
1519apiVersion : apps/v1
1620kind : Deployment
1721metadata :
1822 # This name uniquely identifies the Deployment
1923 name : minio
24+ labels :
25+ app : minio
26+ app.kubernetes.io/part-of : jindo-e2e-minio
2027spec :
2128 replicas : 1
2229 selector :
2330 matchLabels :
2431 app : minio
32+ app.kubernetes.io/part-of : jindo-e2e-minio
2533 strategy :
2634 type : Recreate
2735 template :
2836 metadata :
2937 labels :
3038 # Label is used as selector in the service.
3139 app : minio
40+ app.kubernetes.io/part-of : jindo-e2e-minio
3241 spec :
3342 hostname : mybucket
3443 subdomain : minio
3544 containers :
3645 - name : minio
3746 # Pulls the default Minio image from Docker Hub
3847 image : minio/minio
48+ imagePullPolicy : IfNotPresent
3949 resources :
4050 limits :
4151 memory : " 512Mi"
5767 value : " minioadmin"
5868 ports :
5969 - containerPort : 9000
60- hostPort : 9000
6170 automountServiceAccountToken : false
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Secret
3+ metadata :
4+ name : access-key-a
5+ namespace : default
6+ type : Opaque
7+ stringData :
8+ fs.oss.accessKeyId : __ACCESS_KEY_ID_A__
9+ fs.oss.accessKeySecret : __ACCESS_KEY_SECRET_A__
10+ ---
11+ apiVersion : v1
12+ kind : Secret
13+ metadata :
14+ name : access-key-b
15+ namespace : default
16+ type : Opaque
17+ stringData :
18+ fs.oss.accessKeyId : __ACCESS_KEY_ID_B__
19+ fs.oss.accessKeySecret : __ACCESS_KEY_SECRET_B__
20+ ---
21+ apiVersion : data.fluid.io/v1alpha1
22+ kind : Dataset
23+ metadata :
24+ name : jindo-multi-oss-demo
25+ spec :
26+ mounts :
27+ - mountPoint : oss://__BUCKET_A__/subpath/
28+ options :
29+ fs.oss.endpoint : " __ENDPOINT_A__"
30+ encryptOptions :
31+ - name : fs.oss.accessKeyId
32+ valueFrom :
33+ secretKeyRef :
34+ name : access-key-a
35+ key : fs.oss.accessKeyId
36+ - name : fs.oss.accessKeySecret
37+ valueFrom :
38+ secretKeyRef :
39+ name : access-key-a
40+ key : fs.oss.accessKeySecret
41+ name : bucket-a
42+ path : /bucket-a
43+ - mountPoint : oss://__BUCKET_B__/subpath/
44+ options :
45+ fs.oss.endpoint : " __ENDPOINT_B__"
46+ encryptOptions :
47+ - name : fs.oss.accessKeyId
48+ valueFrom :
49+ secretKeyRef :
50+ name : access-key-b
51+ key : fs.oss.accessKeyId
52+ - name : fs.oss.accessKeySecret
53+ valueFrom :
54+ secretKeyRef :
55+ name : access-key-b
56+ key : fs.oss.accessKeySecret
57+ name : bucket-b
58+ path : /bucket-b
59+ accessModes :
60+ - ReadOnlyMany
61+ ---
62+ apiVersion : data.fluid.io/v1alpha1
63+ kind : JindoRuntime
64+ metadata :
65+ name : jindo-multi-oss-demo
66+ spec :
67+ jindoVersion :
68+ imagePullPolicy : IfNotPresent
69+ fuse :
70+ imagePullPolicy : IfNotPresent
71+ replicas : 1
72+ tieredstore :
73+ levels :
74+ - mediumtype : SSD
75+ path : /var/lib/docker/jindo
76+ quota : 1Gi
77+ high : " 0.99"
78+ low : " 0.95"
Original file line number Diff line number Diff line change 1+ apiVersion : batch/v1
2+ kind : Job
3+ metadata :
4+ name : fluid-multi-oss-test
5+ spec :
6+ backoffLimit : 1
7+ template :
8+ spec :
9+ restartPolicy : Never
10+ containers :
11+ - name : busybox
12+ image : registry-cn-hongkong.ack.aliyuncs.com/acs/smartdata:6.9.1-202509151826
13+ imagePullPolicy : IfNotPresent
14+ resources :
15+ limits :
16+ ephemeral-storage : " 5Gi"
17+ command : ["/bin/sh"]
18+ args :
19+ - -c
20+ - |
21+ set -ex
22+ for i in $(seq 1 24); do
23+ if test "$(cat /data/bucket-a/testfile 2>/dev/null)" = "__EXPECTED_DATA_A__" && \
24+ test "$(cat /data/bucket-b/testfile 2>/dev/null)" = "__EXPECTED_DATA_B__"; then
25+ exit 0
26+ fi
27+ sleep 5
28+ done
29+ exit 1
30+ volumeMounts :
31+ - mountPath : /data
32+ name : fluid-vol
33+ automountServiceAccountToken : false
34+ volumes :
35+ - name : fluid-vol
36+ persistentVolumeClaim :
37+ claimName : jindo-multi-oss-demo
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : Service
3+ metadata :
4+ name : oss-a
5+ labels :
6+ app : oss-a
7+ app.kubernetes.io/part-of : jindo-e2e-oss
8+ spec :
9+ clusterIP : None
10+ ports :
11+ - port : 9000
12+ targetPort : 9000
13+ selector :
14+ app : oss-a
15+ app.kubernetes.io/part-of : jindo-e2e-oss
16+ ---
17+ apiVersion : apps/v1
18+ kind : Deployment
19+ metadata :
20+ name : oss-a
21+ labels :
22+ app : oss-a
23+ app.kubernetes.io/part-of : jindo-e2e-oss
24+ spec :
25+ replicas : 1
26+ selector :
27+ matchLabels :
28+ app : oss-a
29+ app.kubernetes.io/part-of : jindo-e2e-oss
30+ template :
31+ metadata :
32+ labels :
33+ app : oss-a
34+ app.kubernetes.io/part-of : jindo-e2e-oss
35+ spec :
36+ hostname : bucket-a
37+ subdomain : oss-a
38+ containers :
39+ - name : emulator
40+ image : fluidcloudnative/oss-emulator:e2e
41+ imagePullPolicy : IfNotPresent
42+ env :
43+ - name : BUCKET_NAME
44+ value : bucket-a
45+ - name : OBJECT_KEY
46+ value : subpath/testfile
47+ - name : OBJECT_VALUE
48+ value : bucket-a-data
49+ ports :
50+ - containerPort : 9000
51+ automountServiceAccountToken : false
52+ ---
53+ apiVersion : v1
54+ kind : Service
55+ metadata :
56+ name : oss-b
57+ labels :
58+ app : oss-b
59+ app.kubernetes.io/part-of : jindo-e2e-oss
60+ spec :
61+ clusterIP : None
62+ ports :
63+ - port : 9000
64+ targetPort : 9000
65+ selector :
66+ app : oss-b
67+ app.kubernetes.io/part-of : jindo-e2e-oss
68+ ---
69+ apiVersion : apps/v1
70+ kind : Deployment
71+ metadata :
72+ name : oss-b
73+ labels :
74+ app : oss-b
75+ app.kubernetes.io/part-of : jindo-e2e-oss
76+ spec :
77+ replicas : 1
78+ selector :
79+ matchLabels :
80+ app : oss-b
81+ app.kubernetes.io/part-of : jindo-e2e-oss
82+ template :
83+ metadata :
84+ labels :
85+ app : oss-b
86+ app.kubernetes.io/part-of : jindo-e2e-oss
87+ spec :
88+ hostname : bucket-b
89+ subdomain : oss-b
90+ containers :
91+ - name : emulator
92+ image : fluidcloudnative/oss-emulator:e2e
93+ imagePullPolicy : IfNotPresent
94+ env :
95+ - name : BUCKET_NAME
96+ value : bucket-b
97+ - name : OBJECT_KEY
98+ value : subpath/testfile
99+ - name : OBJECT_VALUE
100+ value : bucket-b-data
101+ ports :
102+ - containerPort : 9000
103+ automountServiceAccountToken : false
Original file line number Diff line number Diff line change 1+ FROM golang:1.24.12-bookworm AS builder
2+ WORKDIR /src
3+ COPY main.go .
4+ RUN CGO_ENABLED=0 go build -o /oss-emulator main.go
5+
6+ FROM scratch
7+ COPY --from=builder /oss-emulator /oss-emulator
8+ EXPOSE 9000
9+ ENTRYPOINT ["/oss-emulator" ]
You can’t perform that action at this time.
0 commit comments