@@ -10,13 +10,60 @@ spec:
1010 - name : load-ny-taxi-data
1111 image : " bitnami/minio:2024-debian-12"
1212 # yamllint disable-line rule:line-length
13- command : ["bash", "-c", "cd /tmp && for month in 2020-01 2020-02 2020-03 2020-04 2020-05 2020-06 2020-07 2020-08 2020-09 2020-10 2020-11 2020-12 2021-01 2021-02 2021-03 2021-04 2021-05 2021-06 2021-07 2021-08 2021-09 2021-10 2021-11 2021-12 2022-01 2022-02 2022-03 2022-04; do curl -O https://repo.stackable.tech/repository/misc/ny-taxi-data/yellow_tripdata_$month.parquet && mc --insecure alias set minio http://minio:9000/ $(cat /minio-s3-credentials/accessKey) $(cat /minio-s3-credentials/secretKey) && mc cp yellow_tripdata_$month.parquet minio/demo/ny-taxi-data/raw/; done"]
13+ command :
14+ - bash
15+ - -ce
16+ - |
17+ # Copy the CA cert from the "tls" SecretClass
18+ cp -v /etc/minio/mc/original_certs/ca.crt /.mc/certs/CAs/public.crt
19+
20+ MINIO_ENDPOINT="https://minio.default.svc.cluster.local:9000/"
21+ MINIO_ACCESS_KEY=$(cat /minio-s3-credentials/accessKey)
22+ MINIO_SECRET_KEY=$(cat /minio-s3-credentials/secretKey)
23+
24+ cd /tmp
25+ for month in \
26+ 2020-01 2020-02 2020-03 2020-04 2020-05 2020-06 2020-07 2020-08 2020-09 2020-10 \
27+ 2020-11 2020-12 2021-01 2021-02 2021-03 2021-04 2021-05 2021-06 2021-07 2021-08 \
28+ 2021-09 2021-10 2021-11 2021-12 2022-01 2022-02 2022-03 2022-04; do
29+ curl -O "https://repo.stackable.tech/repository/misc/ny-taxi-data/yellow_tripdata_$month.parquet"
30+ mc alias set minio "$MINIO_ENDPOINT" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
31+ mc cp "yellow_tripdata_$month.parquet" minio/demo/ny-taxi-data/raw/
32+ done
1433 volumeMounts :
1534 - name : minio-s3-credentials
1635 mountPath : /minio-s3-credentials
36+ # Mount the certificate generated by the secret-operator
37+ - name : tls
38+ mountPath : /etc/minio/mc/original_certs
39+ # On startup, we will rename the certs and move them here:
40+ - mountPath : /.mc/certs/CAs
41+ name : certs
42+
1743 volumes :
1844 - name : minio-s3-credentials
1945 secret :
2046 secretName : minio-s3-credentials
47+ # Request a TLS certificate from the secret-operator
48+ - name : tls
49+ ephemeral :
50+ volumeClaimTemplate :
51+ metadata :
52+ annotations :
53+ secrets.stackable.tech/class : tls
54+ secrets.stackable.tech/scope : |-
55+ service=minio
56+ spec :
57+ storageClassName : secrets.stackable.tech
58+ accessModes :
59+ - ReadWriteOnce
60+ resources :
61+ requests :
62+ storage : 1
63+ # Create an in-memory emptyDir to copy the certs to (to avoid permission errors)
64+ - name : certs
65+ emptyDir :
66+ sizeLimit : 5Mi
67+ medium : Memory
2168 restartPolicy : OnFailure
2269 backoffLimit : 50
0 commit comments