diff --git a/docs/developer-guide/README.md b/docs/developer-guide/README.md index f79b1bb..4b81b16 100644 --- a/docs/developer-guide/README.md +++ b/docs/developer-guide/README.md @@ -75,14 +75,14 @@ kubectl create secret generic currents-rustfs-user \ Install RustFS ```sh -helm install rustfs rustfs --repo https://charts.rustfs.com -f samples/rustfs-helm-config.yaml +helm install rustfs rustfs --repo https://charts.rustfs.com --version 1.0.1 -f samples/rustfs-helm-config.yaml ``` Create the `currents` bucket ```sh kubectl apply -f samples/rustfs-create-bucket-job.yaml -kubectl wait --for=condition=complete job/rustfs-create-bucket --timeout=60s +kubectl wait --for=condition=complete job/rustfs-create-bucket --timeout=120s ``` Create an ingress for RustFS diff --git a/docs/eks/dependencies.md b/docs/eks/dependencies.md index c70b559..d303225 100644 --- a/docs/eks/dependencies.md +++ b/docs/eks/dependencies.md @@ -218,6 +218,11 @@ Creates a single Pod instance of RustFS with 10Gi of storage. secret: existingSecret: "currents-rustfs-user" + # Let the dashboard and trace.playwright.dev fetch objects from the browser + extraEnv: + - name: RUSTFS_CORS_ALLOWED_ORIGINS + value: "*" + # Service configuration service: type: ClusterIP @@ -250,9 +255,9 @@ Creates a single Pod instance of RustFS with 10Gi of storage. memory: "128Mi" ``` -3. Install RustFS +3. Install RustFS. The chart version also sets the RustFS image version. ```sh - helm install rustfs rustfs --repo https://charts.rustfs.com -f rustfs-helm-config.yaml + helm install rustfs rustfs --repo https://charts.rustfs.com --version 1.0.1 -f rustfs-helm-config.yaml ``` 4. Create an Ingress Resource to expose the RustFS S3 API @@ -290,7 +295,7 @@ Creates a single Pod instance of RustFS with 10Gi of storage. pathType: Prefix backend: service: - name: rustfs + name: rustfs-svc port: number: 9000 ``` @@ -299,7 +304,7 @@ Creates a single Pod instance of RustFS with 10Gi of storage. kubectl apply -f rustfs-eks-ingress.yaml ``` -5. Create the `currents` bucket by applying a Job that uses mc (MinIO client) +5. Create the `currents` bucket by applying a Job that uses the AWS CLI `rustfs-create-bucket-job.yaml` ```yaml @@ -313,30 +318,33 @@ Creates a single Pod instance of RustFS with 10Gi of storage. spec: restartPolicy: Never containers: - - name: mc - image: minio/mc:latest + - name: aws-cli + image: amazon/aws-cli:2.32.31 env: - - name: RUSTFS_ACCESS_KEY + - name: AWS_ACCESS_KEY_ID valueFrom: secretKeyRef: name: currents-rustfs-user key: RUSTFS_ACCESS_KEY - - name: RUSTFS_SECRET_KEY + - name: AWS_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: currents-rustfs-user key: RUSTFS_SECRET_KEY + - name: AWS_DEFAULT_REGION + value: us-east-1 + - name: AWS_ENDPOINT_URL + value: http://rustfs-svc:9000 command: - /bin/sh - -c - | - mc alias set rustfs http://rustfs-svc:9000 $RUSTFS_ACCESS_KEY $RUSTFS_SECRET_KEY - mc mb --ignore-existing rustfs/currents + aws s3api head-bucket --bucket currents 2>/dev/null || aws s3 mb s3://currents ``` ```sh kubectl apply -f rustfs-create-bucket-job.yaml - kubectl wait --for=condition=complete job/rustfs-create-bucket --timeout=60s + kubectl wait --for=condition=complete job/rustfs-create-bucket --timeout=120s ``` ### SMTP Email diff --git a/docs/eks/quickstart.md b/docs/eks/quickstart.md index 61fb125..c136d52 100644 --- a/docs/eks/quickstart.md +++ b/docs/eks/quickstart.md @@ -121,7 +121,7 @@ Configure and install the Currents Helm Chart once all the services are ready. # secretAccessKey: RUSTFS_SECRET_KEY # Set the endpoint to your RustFS route # endpoint: https://storage.eks.example.com - # internalEndpoint: http://rustfs + # internalEndpoint: http://rustfs-svc:9000 # bucket: currents # pathStyle: true diff --git a/samples/eks/eks-config.yaml b/samples/eks/eks-config.yaml index 85578bb..d5fae97 100644 --- a/samples/eks/eks-config.yaml +++ b/samples/eks/eks-config.yaml @@ -41,7 +41,7 @@ currents: host: clickhouse-clickhouse objectStorage: endpoint: https://storage.eks.currents-sandbox.work - internalEndpoint: http://rustfs + internalEndpoint: http://rustfs-svc:9000 secretName: currents-rustfs-user secretIdKey: RUSTFS_ACCESS_KEY secretAccessKey: RUSTFS_SECRET_KEY diff --git a/samples/local/chart-config.yaml b/samples/local/chart-config.yaml index 7877eb6..3d1cb6d 100644 --- a/samples/local/chart-config.yaml +++ b/samples/local/chart-config.yaml @@ -46,7 +46,7 @@ currents: host: clickhouse-clickhouse objectStorage: endpoint: http://rustfs.localhost - internalEndpoint: http://rustfs + internalEndpoint: http://rustfs-svc:9000 secretName: currents-rustfs-user secretIdKey: RUSTFS_ACCESS_KEY secretAccessKey: RUSTFS_SECRET_KEY diff --git a/samples/rustfs-create-bucket-job.yaml b/samples/rustfs-create-bucket-job.yaml index 33b0b50..45f7f8a 100644 --- a/samples/rustfs-create-bucket-job.yaml +++ b/samples/rustfs-create-bucket-job.yaml @@ -8,22 +8,25 @@ spec: spec: restartPolicy: Never containers: - - name: mc - image: minio/mc:latest + - name: aws-cli + image: amazon/aws-cli:2.32.31 env: - - name: RUSTFS_ACCESS_KEY + - name: AWS_ACCESS_KEY_ID valueFrom: secretKeyRef: name: currents-rustfs-user key: RUSTFS_ACCESS_KEY - - name: RUSTFS_SECRET_KEY + - name: AWS_SECRET_ACCESS_KEY valueFrom: secretKeyRef: name: currents-rustfs-user key: RUSTFS_SECRET_KEY + - name: AWS_DEFAULT_REGION + value: us-east-1 + - name: AWS_ENDPOINT_URL + value: http://rustfs-svc:9000 command: - /bin/sh - -c - | - mc alias set rustfs http://rustfs-svc:9000 $RUSTFS_ACCESS_KEY $RUSTFS_SECRET_KEY - mc mb --ignore-existing rustfs/currents + aws s3api head-bucket --bucket currents 2>/dev/null || aws s3 mb s3://currents diff --git a/samples/rustfs-helm-config.yaml b/samples/rustfs-helm-config.yaml index cbced67..d61fbb9 100644 --- a/samples/rustfs-helm-config.yaml +++ b/samples/rustfs-helm-config.yaml @@ -11,6 +11,13 @@ mode: secret: existingSecret: "currents-rustfs-user" +# The dashboard and https://trace.playwright.dev fetch objects from the +# browser through presigned URLs. RustFS sends no CORS headers unless this +# or a bucket CORS rule is set. +extraEnv: + - name: RUSTFS_CORS_ALLOWED_ORIGINS + value: "*" + # Service configuration service: type: ClusterIP