added bucket creating initcontainer to minio pod
This commit is contained in:
@@ -262,6 +262,31 @@ spec:
|
||||
app.kubernetes.io/instance: outline
|
||||
app.kubernetes.io/name: minio
|
||||
spec:
|
||||
initContainers:
|
||||
- name: create-bucket
|
||||
image: minio/mc:latest
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
until mc alias set myminio http://localhost:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; do
|
||||
echo "Waiting for MinIO..."
|
||||
sleep 2
|
||||
done
|
||||
mc mb --ignore-existing myminio/outline
|
||||
mc anonymous set private myminio/outline
|
||||
echo "Bucket created successfully"
|
||||
env:
|
||||
- name: MINIO_ROOT_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-minio
|
||||
key: root-user
|
||||
- name: MINIO_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-minio
|
||||
key: root-password
|
||||
containers:
|
||||
- name: minio
|
||||
image: minio/minio:latest
|
||||
|
||||
Reference in New Issue
Block a user