Skip to content

Commit 3b44ce1

Browse files
authored
fix: data lakehouse demo (#183)
* fix: Use Minio with TLS for data-lakehouse demo * fix: trino resources / hive downgrade / volume name * chore: newline at end of file
1 parent eb22237 commit 3b44ce1

File tree

9 files changed

+863
-11
lines changed

9 files changed

+863
-11
lines changed

demos/data-lakehouse-iceberg-trino-spark/create-spark-ingestion-job.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ data:
6767
- name: script
6868
configMap:
6969
name: write-iceberg-table-script
70-
- name: tls
70+
- name: spark-tls
7171
ephemeral:
7272
volumeClaimTemplate:
7373
metadata:
@@ -101,7 +101,7 @@ data:
101101
volumeMounts:
102102
- name: script
103103
mountPath: /stackable/spark/jobs
104-
- name: tls
104+
- name: spark-tls
105105
mountPath: /stackable/tls
106106
executor:
107107
replicas: 4
@@ -115,7 +115,7 @@ data:
115115
volumeMounts:
116116
- name: script
117117
mountPath: /stackable/spark/jobs
118-
- name: tls
118+
- name: spark-tls
119119
mountPath: /stackable/tls
120120
---
121121
apiVersion: v1

demos/data-lakehouse-iceberg-trino-spark/load-test-data.yaml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ spec:
1616
- pipefail
1717
- -c
1818
- |
19-
mc --insecure alias set minio http://minio:9000/ $(cat /minio-s3-credentials/accessKey) $(cat /minio-s3-credentials/secretKey)
19+
# Copy the CA cert from the "tls" SecretClass
20+
cp -v /etc/minio/mc/original_certs/ca.crt /.mc/certs/CAs/public.crt
21+
22+
mc alias set minio https://minio.default.svc.cluster.local:9000/ $(cat /minio-s3-credentials/accessKey) $(cat /minio-s3-credentials/secretKey)
2023
cd /tmp
2124
2225
curl -sO https://repo.stackable.tech/repository/misc/datasets/open-postcode-geo/open-postcode-geo.csv
@@ -69,9 +72,36 @@ spec:
6972
volumeMounts:
7073
- name: minio-s3-credentials
7174
mountPath: /minio-s3-credentials
75+
# Mount the certificate generated by the secret-operator
76+
- name: tls
77+
mountPath: /etc/minio/mc/original_certs
78+
# On startup, we will rename the certs and move them here:
79+
- mountPath: /.mc/certs/CAs
80+
name: certs
7281
volumes:
7382
- name: minio-s3-credentials
7483
secret:
7584
secretName: minio-s3-credentials
85+
# Request a TLS certificate from the secret-operator
86+
- name: tls
87+
ephemeral:
88+
volumeClaimTemplate:
89+
metadata:
90+
annotations:
91+
secrets.stackable.tech/class: tls
92+
secrets.stackable.tech/scope: |-
93+
service=minio,pod
94+
spec:
95+
storageClassName: secrets.stackable.tech
96+
accessModes:
97+
- ReadWriteOnce
98+
resources:
99+
requests:
100+
storage: "1"
101+
# Create an in-memory emptyDir to copy the certs to (to avoid permission errors)
102+
- name: certs
103+
emptyDir:
104+
sizeLimit: 5Mi
105+
medium: Memory
76106
restartPolicy: OnFailure
77107
backoffLimit: 50
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# MinIO with TLS from secret-operator
2+
3+
MinIO has a severe limitation whereby the TLS certificates must be named `public.crt`
4+
and `private.key`. This goes against Kubernetes naming of `tls.crt` and `tls.key`.
5+
6+
The upstream minio chart is also too limited:
7+
8+
- No way to add initContainers (to rename cert files in a shared volume).
9+
- No way to edit the container command (to rename cert files before starting minio).
10+
11+
Therefore, we will render the upstream chart here, and then apply the necessary
12+
customizations on top.
13+
14+
```yaml
15+
helm template minio minio/minio -f values.yaml > rendered-chart.yaml
16+
```

0 commit comments

Comments
 (0)