From eb564362a82cc54e9862dc235b40e5fe07030a3e Mon Sep 17 00:00:00 2001 From: Jeev B Date: Fri, 9 Apr 2021 11:16:43 -0700 Subject: [PATCH] Add init container that will pre-create buckets in minio --- deployment/sandbox/flyte_generated.yaml | 11 ++++++++++- deployment/test/flyte_generated.yaml | 11 ++++++++++- kustomize/base/addons/storage/kustomization.yaml | 4 ++++ kustomize/base/addons/storage/storage.yaml | 11 ++++++++++- 4 files changed, 34 insertions(+), 3 deletions(-) diff --git a/deployment/sandbox/flyte_generated.yaml b/deployment/sandbox/flyte_generated.yaml index 8073b2a3f51..a6276ebb7b8 100644 --- a/deployment/sandbox/flyte_generated.yaml +++ b/deployment/sandbox/flyte_generated.yaml @@ -3060,7 +3060,7 @@ spec: value: minio - name: MINIO_SECRET_KEY value: miniostorage - image: minio/minio:RELEASE.2020-12-16T05-05-17Z + image: minio/minio:RELEASE.2021-04-06T23-11-00Z name: minio ports: - containerPort: 9000 @@ -3068,6 +3068,15 @@ spec: volumeMounts: - mountPath: /data name: minio-storage + initContainers: + - command: + - mkdir + - /data/my-s3-bucket + image: minio/minio:RELEASE.2021-04-06T23-11-00Z + name: create-bucket + volumeMounts: + - mountPath: /data + name: minio-storage volumes: - emptyDir: {} name: minio-storage diff --git a/deployment/test/flyte_generated.yaml b/deployment/test/flyte_generated.yaml index d0f417a8fa8..62205adc455 100644 --- a/deployment/test/flyte_generated.yaml +++ b/deployment/test/flyte_generated.yaml @@ -880,7 +880,7 @@ spec: value: minio - name: MINIO_SECRET_KEY value: miniostorage - image: minio/minio:RELEASE.2020-12-16T05-05-17Z + image: minio/minio:RELEASE.2021-04-06T23-11-00Z name: minio ports: - containerPort: 9000 @@ -888,6 +888,15 @@ spec: volumeMounts: - mountPath: /data name: minio-storage + initContainers: + - command: + - mkdir + - /data/my-s3-bucket + image: minio/minio:RELEASE.2021-04-06T23-11-00Z + name: create-bucket + volumeMounts: + - mountPath: /data + name: minio-storage volumes: - emptyDir: {} name: minio-storage diff --git a/kustomize/base/addons/storage/kustomization.yaml b/kustomize/base/addons/storage/kustomization.yaml index 9a80610c4e1..88042a91089 100644 --- a/kustomize/base/addons/storage/kustomization.yaml +++ b/kustomize/base/addons/storage/kustomization.yaml @@ -1,2 +1,6 @@ resources: - storage.yaml + +images: + - name: minio/minio + newTag: RELEASE.2021-04-06T23-11-00Z diff --git a/kustomize/base/addons/storage/storage.yaml b/kustomize/base/addons/storage/storage.yaml index b14b37be81c..132a338cb84 100644 --- a/kustomize/base/addons/storage/storage.yaml +++ b/kustomize/base/addons/storage/storage.yaml @@ -16,8 +16,17 @@ spec: volumes: - name: minio-storage emptyDir: {} + initContainers: + - image: minio/minio + name: create-bucket + command: + - mkdir + - /data/my-s3-bucket + volumeMounts: + - name: minio-storage + mountPath: /data containers: - - image: "minio/minio:RELEASE.2020-12-16T05-05-17Z" + - image: minio/minio name: minio env: - name: MINIO_ACCESS_KEY